mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-12 23:37:14 +03:00
Add separators between plugins in main window
This commit is contained in:
parent
ebbeb000c8
commit
9f776d5a20
@ -125,6 +125,7 @@ class AppWindow:
|
|||||||
for plugin in plug.PLUGINS:
|
for plugin in plug.PLUGINS:
|
||||||
appitem = plugin.get_app(frame)
|
appitem = plugin.get_app(frame)
|
||||||
if appitem:
|
if appitem:
|
||||||
|
tk.Frame(frame, highlightthickness=1).grid(columnspan=2, sticky=tk.EW) # separator
|
||||||
if isinstance(appitem, tuple) and len(appitem)==2:
|
if isinstance(appitem, tuple) and len(appitem)==2:
|
||||||
row = frame.grid_size()[1]
|
row = frame.grid_size()[1]
|
||||||
appitem[0].grid(row=row, column=0, sticky=tk.W)
|
appitem[0].grid(row=row, column=0, sticky=tk.W)
|
||||||
@ -145,7 +146,7 @@ class AppWindow:
|
|||||||
theme.button_bind(self.theme_button, self.getandsend)
|
theme.button_bind(self.theme_button, self.getandsend)
|
||||||
|
|
||||||
for child in frame.winfo_children():
|
for child in frame.winfo_children():
|
||||||
child.grid_configure(padx=5, pady=(platform!='win32' and 2 or 0))
|
child.grid_configure(padx=5, pady=(platform!='win32' or isinstance(child, tk.Frame)) and 2 or 0)
|
||||||
|
|
||||||
self.menubar = tk.Menu()
|
self.menubar = tk.Menu()
|
||||||
if platform=='darwin':
|
if platform=='darwin':
|
||||||
@ -238,11 +239,13 @@ class AppWindow:
|
|||||||
self.theme_help_menu = tk.Label(self.theme_menubar, anchor=tk.W)
|
self.theme_help_menu = tk.Label(self.theme_menubar, anchor=tk.W)
|
||||||
self.theme_help_menu.grid(row=1, column=2, sticky=tk.W)
|
self.theme_help_menu.grid(row=1, column=2, sticky=tk.W)
|
||||||
theme.button_bind(self.theme_help_menu, lambda e: self.help_menu.tk_popup(e.widget.winfo_rootx(), e.widget.winfo_rooty() + e.widget.winfo_height()))
|
theme.button_bind(self.theme_help_menu, lambda e: self.help_menu.tk_popup(e.widget.winfo_rootx(), e.widget.winfo_rooty() + e.widget.winfo_height()))
|
||||||
|
tk.Frame(self.theme_menubar, highlightthickness=1).grid(columnspan=5, padx=5, sticky=tk.EW)
|
||||||
theme.register(self.theme_minimize) # images aren't automatically registered
|
theme.register(self.theme_minimize) # images aren't automatically registered
|
||||||
theme.register(self.theme_close)
|
theme.register(self.theme_close)
|
||||||
self.blank_menubar = tk.Frame(frame)
|
self.blank_menubar = tk.Frame(frame)
|
||||||
tk.Label(self.blank_menubar).grid()
|
tk.Label(self.blank_menubar).grid()
|
||||||
tk.Label(self.blank_menubar).grid()
|
tk.Label(self.blank_menubar).grid()
|
||||||
|
tk.Frame(self.blank_menubar, height=2).grid()
|
||||||
theme.register_alternate((self.menubar, self.theme_menubar, self.blank_menubar), {'row':0, 'columnspan':2, 'sticky':tk.NSEW})
|
theme.register_alternate((self.menubar, self.theme_menubar, self.blank_menubar), {'row':0, 'columnspan':2, 'sticky':tk.NSEW})
|
||||||
self.w.resizable(tk.TRUE, tk.FALSE)
|
self.w.resizable(tk.TRUE, tk.FALSE)
|
||||||
|
|
||||||
|
1
theme.py
1
theme.py
@ -142,6 +142,7 @@ class _Theme:
|
|||||||
elif 'background' in widget.keys():
|
elif 'background' in widget.keys():
|
||||||
# e.g. Frame
|
# e.g. Frame
|
||||||
widget.configure(background = self.current['background'])
|
widget.configure(background = self.current['background'])
|
||||||
|
widget.configure(highlightbackground = self.current['disabledforeground'])
|
||||||
|
|
||||||
for pair, gridopts in self.widgets_pair:
|
for pair, gridopts in self.widgets_pair:
|
||||||
for widget in pair:
|
for widget in pair:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user