8000 Give the Tk toolbar buttons a flat look · matplotlib/matplotlib@5555daa · GitHub
[go: up one dir, main page]

Skip to content

Commit 5555daa

Browse files
committed
Give the Tk toolbar buttons a flat look
1 parent b3f61d1 commit 5555daa

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

lib/matplotlib/backends/_backend_tk.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,10 @@ def _set_image_for_button(self, button):
658658

659659
def _Button(self, text, image_file, toggle, command):
660660
if not toggle:
661-
b = tk.Button(master=self, text=text, command=command)
661+
b = tk.Button(
662+
master=self, text=text, command=command,
663+
relief="flat", overrelief="groove", borderwidth=1,
664+
)
662665
else:
663666
# There is a bug in tkinter included in some python 3.6 versions
664667
# that without this variable, produces a "visual" toggling of
@@ -667,8 +670,10 @@ def _Button(self, text, image_file, toggle, command):
667670
# https://bugs.python.org/issue25684
668671
var = tk.IntVar(master=self)
669672
b = tk.Checkbutton(
670-
master=self, text=text, command=command,
671-
indicatoron=False, variable=var)
673+
master=self, text=text, command=command, indicatoron=False,
674+
variable=var, offrelief="flat", overrelief="groove",
675+
borderwidth=1
676+
)
672677
b.var = var
673678
b._image_file = image_file
674679
if image_file is not None:

0 commit comments

Comments
 (0)
0