fixed typo in canvas dialog variable, updated theming to make label frame have a relief groove border

This commit is contained in:
Blake Harnden 2019-11-13 12:11:37 -08:00
parent 1e642b6302
commit 40b2c270e4
2 changed files with 5 additions and 4 deletions

View file

@ -8,7 +8,7 @@ from coretk.dialogs.canvasbackground import ScaleOption
from coretk.dialogs.dialog import Dialog from coretk.dialogs.dialog import Dialog
DRAW_OBJECT_TAGS = ["edge", "node", "nodename", "linkinfo", "antenna"] DRAW_OBJECT_TAGS = ["edge", "node", "nodename", "linkinfo", "antenna"]
FRAME_BAD = 5 FRAME_PAD = 5
PAD = (0, 0, 5, 0) PAD = (0, 0, 5, 0)
PADX = 5 PADX = 5
@ -52,7 +52,7 @@ class SizeAndScaleDialog(Dialog):
self.draw_buttons() self.draw_buttons()
def draw_size(self): def draw_size(self):
label_frame = ttk.Labelframe(self.top, text="Size", padding=FRAME_BAD) label_frame = ttk.Labelframe(self.top, text="Size", padding=FRAME_PAD)
label_frame.grid(sticky="ew") label_frame.grid(sticky="ew")
label_frame.columnconfigure(0, weight=1) label_frame.columnconfigure(0, weight=1)
@ -89,7 +89,7 @@ class SizeAndScaleDialog(Dialog):
label.grid(row=0, column=4, sticky="w") label.grid(row=0, column=4, sticky="w")
def draw_scale(self): def draw_scale(self):
label_frame = ttk.Labelframe(self.top, text="Scale", padding=FRAME_BAD) label_frame = ttk.Labelframe(self.top, text="Scale", padding=FRAME_PAD)
label_frame.grid(sticky="ew") label_frame.grid(sticky="ew")
label_frame.columnconfigure(0, weight=1) label_frame.columnconfigure(0, weight=1)
@ -105,7 +105,7 @@ class SizeAndScaleDialog(Dialog):
def draw_reference_point(self): def draw_reference_point(self):
label_frame = ttk.Labelframe( label_frame = ttk.Labelframe(
self.top, text="Reference Point", padding=FRAME_BAD self.top, text="Reference Point", padding=FRAME_PAD
) )
label_frame.grid(sticky="ew") label_frame.grid(sticky="ew")
label_frame.columnconfigure(0, weight=1) label_frame.columnconfigure(0, weight=1)

View file

@ -86,6 +86,7 @@ def load(style):
"padding": (2, 0), "padding": (2, 0),
} }
}, },
"TLabelframe": {"configure": {"relief": tk.GROOVE}},
"TNotebook.Tab": { "TNotebook.Tab": {
"configure": {"padding": (6, 2, 6, 2)}, "configure": {"padding": (6, 2, 6, 2)},
"map": {"background": [("selected", Colors.lighter)]}, "map": {"background": [("selected", Colors.lighter)]},