From 962dc3ffeb88bd4a8a8d7b48e9db48949ca76f65 Mon Sep 17 00:00:00 2001 From: Joe R Date: Fri, 19 Nov 2021 17:57:59 -0500 Subject: [PATCH] Re-enabled toolbar style selection option. --- data/images/toolbar/remix/info.txt | 1 + data/images/toolbar/remix/small/autodrop.png | Bin 0 -> 258 bytes data/images/toolbar/remix/small/new.png | Bin 0 -> 99 bytes data/images/toolbar/remix/small/open.png | Bin 0 -> 154 bytes data/images/toolbar/remix/small/pause.png | Bin 0 -> 91 bytes data/images/toolbar/remix/small/quit.png | Bin 0 -> 187 bytes data/images/toolbar/remix/small/redo.png | Bin 0 -> 273 bytes data/images/toolbar/remix/small/restart.png | Bin 0 -> 413 bytes data/images/toolbar/remix/small/rules.png | Bin 0 -> 449 bytes data/images/toolbar/remix/small/save.png | Bin 0 -> 152 bytes data/images/toolbar/remix/small/shuffle.png | Bin 0 -> 220 bytes .../images/toolbar/remix/small/statistics.png | Bin 0 -> 180 bytes data/images/toolbar/remix/small/undo.png | Bin 0 -> 270 bytes pysollib/ui/tktile/menubar.py | 33 +++++++++--------- 14 files changed, 17 insertions(+), 17 deletions(-) create mode 100644 data/images/toolbar/remix/info.txt create mode 100644 data/images/toolbar/remix/small/autodrop.png create mode 100644 data/images/toolbar/remix/small/new.png create mode 100644 data/images/toolbar/remix/small/open.png create mode 100644 data/images/toolbar/remix/small/pause.png create mode 100644 data/images/toolbar/remix/small/quit.png create mode 100644 data/images/toolbar/remix/small/redo.png create mode 100644 data/images/toolbar/remix/small/restart.png create mode 100644 data/images/toolbar/remix/small/rules.png create mode 100644 data/images/toolbar/remix/small/save.png create mode 100644 data/images/toolbar/remix/small/shuffle.png create mode 100644 data/images/toolbar/remix/small/statistics.png create mode 100644 data/images/toolbar/remix/small/undo.png 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 0000000000000000000000000000000000000000..ad72dae932b21874fb11f274e9201d63f433ac2f GIT binary patch literal 258 zcmV+d0sa1oP)Nb-@0g0X=X?1?cH*23P2GZPabbOzuZw zOtrCc!GKg7D;G4%@3=K^H(+PET#S}BS*=}NNPNRgZq`Kf0TaE2RazDoTL1t607*qo IM6N<$f^O(#ivR!s literal 0 HcmV?d00001 diff --git a/data/images/toolbar/remix/small/new.png b/data/images/toolbar/remix/small/new.png new file mode 100644 index 0000000000000000000000000000000000000000..0fcaa69daede054c64aeb20d459b364a2e3c302d GIT binary patch literal 99 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjTAnVBAs(H{2@G+KMLe_ w(^a^q5cKiE#)b(;O_&#p^)PU|9TZ?;@Y!vAR_^A+=RjQyp00i_>zopr0HYWjS^xk5 literal 0 HcmV?d00001 diff --git a/data/images/toolbar/remix/small/open.png b/data/images/toolbar/remix/small/open.png new file mode 100644 index 0000000000000000000000000000000000000000..df1ed0c9d32573647c2f95ef280621d05f4355e2 GIT binary patch literal 154 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjiJmTwAs(G?rx8~s08T6J7dT%joHSX8ijxf4@g6Z;8SVF8`Sdk@cw?^w&&=}>#{jH;2qR>p?z zkLGou>}faUf1Ivm)Ry~jfU_~RdD+b=%12Azc8Dx5SbR7oaGfL2G6qjqKbLh*2~7ad C**FIP literal 0 HcmV?d00001 diff --git a/data/images/toolbar/remix/small/pause.png b/data/images/toolbar/remix/small/pause.png new file mode 100644 index 0000000000000000000000000000000000000000..dcf4f380c729f67c6f87c028ff73b8c7f07b7a9d GIT binary patch literal 91 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjN}eu`As(H{2@Sc=lT4>gEs?C}2fBvA)78&qol`;+0D@&g_y7O^ literal 0 HcmV?d00001 diff --git a/data/images/toolbar/remix/small/redo.png b/data/images/toolbar/remix/small/redo.png new file mode 100644 index 0000000000000000000000000000000000000000..6cbeab15ce5d18684a8131835d48f988575f1a8d GIT binary patch literal 273 zcmV+s0q*{ZP)6^}6oui>R+1npkcbuZ9V#jj2n^u`5EYx6+9o_e1rk|7f<^EmR5igOkQE37h|XqF z>`ucZkZ_XgPR^gXH*>fF^^vCvf5Z-ll#mfN0rGKmkPKriunhrqrgB{mc*9Rb=;>6x z;_JjbLl3Pp{yz4>|5+9O8jKsfRGDMLGyDc~o$z){IDZE%)>2n_-Ef!(z%T+3rSAZE zN(ER2KqnQTSkWLApg8h06(Cc#<8vxVuKZ}pAWLOcOwdL1l7I%@u@+x+QTk6^-xa4L X^1EZ_!=U9l00000NkvXXu0mjfQc`Pj literal 0 HcmV?d00001 diff --git a/data/images/toolbar/remix/small/restart.png b/data/images/toolbar/remix/small/restart.png new file mode 100644 index 0000000000000000000000000000000000000000..67ea63016434c77db332f1f76afa685fa7c7f03c GIT binary patch literal 413 zcmV;O0b>4%P)0>NM~m>iphU^EzXa}Fla@PdJ0AQ+4Wg3Vww5DY{DfuKpF!C)Zb#wOtf zlM)OB0s+D~Z|~yn<9aX2dA2*k`Op8KbMMc2@E@WI+yM8$07!ry&;m|?XcgiPFms$P zaO6u~2Bu2z0o(%nKv7RR)le~Gpzb43K(3+*tT}MkMl%;K;$1BQSodfsR*^AKS_XUu zt~`j%I76oBk@N6}3it*#14Ys|so9cEGH0{`1Cba!A+$+dwRyYtsmL zRe;xCF{0sWumntyzkTdMTrhsiF7PEX#S~c^%dRU@d}4?=BQ2V!&;S{Ik8EAU^AtjEPE$j6OM6e&_zq{t&!1dSl1h=rnHVJ!$2K?Jo4K7ysC z<<&Nd9Fii%S?qV*x$NFu0yY`gX1;I!?9A*eEV`6{7H|gyK&TT)*Aizg*#Yi>DCax^ zd$VTU1156t4x9i@paN8t`A}FSZm(#7LmB-5m%v5_cO5tfzGc(Tb6!tn-m$P{pbhK; zs}|M(rn0U3oR@%CIls2BHtV~5g@Tmb@sO&4g%1Ma5ARR~;0p}BO){oskAwIIE=iAR*F{*tEUpOi z{AUetDr^kYJe)tPqTwSsWS3-BY~_)U6yOs$1J*LQHB9CovNtA00000NkvXXu0mjfrCYqb literal 0 HcmV?d00001 diff --git a/data/images/toolbar/remix/small/save.png b/data/images/toolbar/remix/small/save.png new file mode 100644 index 0000000000000000000000000000000000000000..0bcb4649e8782a8210ed8de7b3a2d1b5ce671037 GIT binary patch literal 152 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gj@t!V@As(H{2@bR} z!g?gaVckQ6I}U4DmqeU6aNvNzp#uj#%$ArxA)E2cr2jxg_cK!&&HggyGpXau6A7)=uO?1tkocV-RZHLBn z3AM-vA)cEKdh8Ng8z`jr!>std=v#wV!ghx@HoZ4|Cp=FhI!=RIa*~OVU5^c8PfA+s U{>}+TK<6@ey85}Sb4q9e0N^oH=Kufz literal 0 HcmV?d00001 diff --git a/data/images/toolbar/remix/small/statistics.png b/data/images/toolbar/remix/small/statistics.png new file mode 100644 index 0000000000000000000000000000000000000000..1054d77e496a20fa6f2ba27c18dd8144595b948d GIT binary patch literal 180 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gj)t)YnAs(G?&)?-dpuofOKzadl z%AUT9e`O98zUgjE5cb`$RNqqI&%xg!Cs;23@_1m}z%XYw1EWRH-&^lzpWu2h$w*<- zo^PcR6I6W_-hGlZnD$|h%PC!l>W4q1!*{Zs*>^tuT@mjNF@2Tf`@9B1TAfVm)fmk; eSpQ=->c7*Ho-u>Jvf>@k84RATelF{r5}E+v+D2Re literal 0 HcmV?d00001 diff --git a/data/images/toolbar/remix/small/undo.png b/data/images/toolbar/remix/small/undo.png new file mode 100644 index 0000000000000000000000000000000000000000..a1cfba20a4bd76a88780cf3868eccbc467924a9e GIT binary patch literal 270 zcmV+p0rCEcP)|pW2 zwD<1WH*&C5KrMN>y$P4U`D3z!=K<;s8wP}e|G zp2Hn}IM)LDz_J9|0JSP1K{0TWJ7W#t6{3l0Eaxv6W|Cq{(n27K;f_fI0j#_LkpTAI zfSnhhhjWWU@?3`8p@_68rWSMakM>Ospi9w~T+Fv9SA})i9e^p&)P9}Yy8i2}9;$$2 U(7UAuLI3~&07*qoM6N<$g5nr)`2YX_ literal 0 HcmV?d00001 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)) # ************************************************************************