diff --git a/data/images/toolbar/remix/info.txt b/data/images/toolbar/remix/info.txt new file mode 100644 index 00000000..2031affb --- /dev/null +++ b/data/images/toolbar/remix/info.txt @@ -0,0 +1 @@ +Icons by remixicon.com \ No newline at end of file diff --git a/data/images/toolbar/remix/small/autodrop.png b/data/images/toolbar/remix/small/autodrop.png new file mode 100644 index 00000000..ad72dae9 Binary files /dev/null and b/data/images/toolbar/remix/small/autodrop.png differ diff --git a/data/images/toolbar/remix/small/new.png b/data/images/toolbar/remix/small/new.png new file mode 100644 index 00000000..0fcaa69d Binary files /dev/null and b/data/images/toolbar/remix/small/new.png differ diff --git a/data/images/toolbar/remix/small/open.png b/data/images/toolbar/remix/small/open.png new file mode 100644 index 00000000..df1ed0c9 Binary files /dev/null and b/data/images/toolbar/remix/small/open.png differ diff --git a/data/images/toolbar/remix/small/pause.png b/data/images/toolbar/remix/small/pause.png new file mode 100644 index 00000000..dcf4f380 Binary files /dev/null and b/data/images/toolbar/remix/small/pause.png differ diff --git a/data/images/toolbar/remix/small/quit.png b/data/images/toolbar/remix/small/quit.png new file mode 100644 index 00000000..b07c9995 Binary files /dev/null and b/data/images/toolbar/remix/small/quit.png differ diff --git a/data/images/toolbar/remix/small/redo.png b/data/images/toolbar/remix/small/redo.png new file mode 100644 index 00000000..6cbeab15 Binary files /dev/null and b/data/images/toolbar/remix/small/redo.png differ diff --git a/data/images/toolbar/remix/small/restart.png b/data/images/toolbar/remix/small/restart.png new file mode 100644 index 00000000..67ea6301 Binary files /dev/null and b/data/images/toolbar/remix/small/restart.png differ diff --git a/data/images/toolbar/remix/small/rules.png b/data/images/toolbar/remix/small/rules.png new file mode 100644 index 00000000..456e04d0 Binary files /dev/null and b/data/images/toolbar/remix/small/rules.png differ diff --git a/data/images/toolbar/remix/small/save.png b/data/images/toolbar/remix/small/save.png new file mode 100644 index 00000000..0bcb4649 Binary files /dev/null and b/data/images/toolbar/remix/small/save.png differ diff --git a/data/images/toolbar/remix/small/shuffle.png b/data/images/toolbar/remix/small/shuffle.png new file mode 100644 index 00000000..5bf41acd Binary files /dev/null and b/data/images/toolbar/remix/small/shuffle.png differ diff --git a/data/images/toolbar/remix/small/statistics.png b/data/images/toolbar/remix/small/statistics.png new file mode 100644 index 00000000..1054d77e Binary files /dev/null and b/data/images/toolbar/remix/small/statistics.png differ diff --git a/data/images/toolbar/remix/small/undo.png b/data/images/toolbar/remix/small/undo.png new file mode 100644 index 00000000..a1cfba20 Binary files /dev/null and b/data/images/toolbar/remix/small/undo.png differ diff --git a/pysollib/ui/tktile/menubar.py b/pysollib/ui/tktile/menubar.py index 866ee33b..06389013 100644 --- a/pysollib/ui/tktile/menubar.py +++ b/pysollib/ui/tktile/menubar.py @@ -22,21 +22,27 @@ from six.moves import tkinter_tkfiledialog def createToolbarMenu(menubar, menu): tearoff = menu.cget('tearoff') -# data_dir = os.path.join(menubar.app.dataloader.dir, 'images', 'toolbar') -# submenu = MfxMenu(menu, label=n_('Style'), tearoff=tearoff) -# for f in os.listdir(data_dir): -# d = os.path.join(data_dir, f) -# if os.path.isdir(d) and os.path.exists(os.path.join(d, 'small')): -# name = f.replace('_', ' ').capitalize() -# submenu.add_radiobutton( -# label=name, -# variable=menubar.tkopt.toolbar_style, -# value=f, command=menubar.mOptToolbarStyle) + data_dir = os.path.join(menubar.app.dataloader.dir, 'images', 'toolbar') + submenu = MfxMenu(menu, label=n_('Style'), tearoff=tearoff) + for f in os.listdir(data_dir): + d = os.path.join(data_dir, f) + if os.path.isdir(d) and os.path.exists(os.path.join(d, 'small')): + name = f.replace('_', ' ').capitalize() + submenu.add_radiobutton( + label=name, + variable=menubar.tkopt.toolbar_style, + value=f, command=menubar.mOptToolbarStyle) submenu = MfxMenu(menu, label=n_('Compound'), tearoff=tearoff) for comp, label in COMPOUNDS: submenu.add_radiobutton( label=label, variable=menubar.tkopt.toolbar_compound, value=comp, command=menubar.mOptToolbarCompound) + submenu = MfxMenu(menu, label=n_('Visible buttons'), tearoff=tearoff) + for w in TOOLBAR_BUTTONS: + submenu.add_checkbutton( + label=_(w.capitalize()), + variable=menubar.tkopt.toolbar_vars[w], + command=lambda m=menubar, w=w: m.mOptToolbarConfig(w)) menu.add_separator() menu.add_radiobutton(label=n_("Hide"), variable=menubar.tkopt.toolbar, value=0, @@ -60,13 +66,6 @@ def createToolbarMenu(menubar, menu): # menu.add_radiobutton(label=n_("Large icons"), # variable=menubar.tkopt.toolbar_size, value=1, # command=menubar.mOptToolbarSize) - menu.add_separator() - submenu = MfxMenu(menu, label=n_('Visible buttons'), tearoff=tearoff) - for w in TOOLBAR_BUTTONS: - submenu.add_checkbutton( - label=_(w.capitalize()), - variable=menubar.tkopt.toolbar_vars[w], - command=lambda m=menubar, w=w: m.mOptToolbarConfig(w)) # ************************************************************************