-
Notifications
You must be signed in to change notification settings - Fork 0
/
customtheme.py
35 lines (24 loc) · 889 Bytes
/
customtheme.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
"""Example of using a custom theme with the Terminals widget.
Both the `Terminals` and `Terminal` widgets support custom theming.
Note that the themes are subclasses of the `Theme` class; it provides
a simple interface for customizing the appearance of the terminals."""
import tkinter as tk
from mono import Terminals, Theme
root = tk.Tk()
root.geometry("800x300")
class Light(Theme):
bg = "#FFFFFF"
fg = "#000000"
abg = "#CCCCCC"
afg = "#000000"
border = "#DDDDDD"
# further overriding the __init__ will give more control over specific widgets:
#
# def __init__(self, master=None, **kwargs):
# super().__init__(master, **kwargs)
# self.tabs = (self.bg, 'red')
terminals = Terminals(root, theme=Light())
terminals.pack(fill="both", expand=True)
terminals.open_python()
terminals.open_another_terminal()
root.mainloop()