diff --git a/data/images/buttons/bluecurve/back.png b/data/images/buttons/bluecurve/back.png new file mode 100644 index 00000000..8ba8bf3c Binary files /dev/null and b/data/images/buttons/bluecurve/back.png differ diff --git a/data/images/buttons/bluecurve/cancel.gif b/data/images/buttons/bluecurve/cancel.gif deleted file mode 100644 index eadf3b3e..00000000 Binary files a/data/images/buttons/bluecurve/cancel.gif and /dev/null differ diff --git a/data/images/buttons/bluecurve/new.gif b/data/images/buttons/bluecurve/new.gif deleted file mode 100644 index 04ddcc41..00000000 Binary files a/data/images/buttons/bluecurve/new.gif and /dev/null differ diff --git a/data/images/buttons/bluecurve/ok.gif b/data/images/buttons/bluecurve/ok.gif deleted file mode 100644 index 8438d93d..00000000 Binary files a/data/images/buttons/bluecurve/ok.gif and /dev/null differ diff --git a/data/images/buttons/bluecurve/reset.png b/data/images/buttons/bluecurve/reset.png new file mode 100644 index 00000000..3aac5f6a Binary files /dev/null and b/data/images/buttons/bluecurve/reset.png differ diff --git a/data/images/buttons/remix/back.png b/data/images/buttons/remix/back.png new file mode 100644 index 00000000..a3abfa05 Binary files /dev/null and b/data/images/buttons/remix/back.png differ diff --git a/data/images/buttons/remix/cancel.png b/data/images/buttons/remix/cancel.png new file mode 100644 index 00000000..88eeed83 Binary files /dev/null and b/data/images/buttons/remix/cancel.png differ diff --git a/data/images/buttons/remix/new.png b/data/images/buttons/remix/new.png new file mode 100644 index 00000000..cb7f59f9 Binary files /dev/null and b/data/images/buttons/remix/new.png differ diff --git a/data/images/buttons/remix/ok.png b/data/images/buttons/remix/ok.png new file mode 100644 index 00000000..cd4f24f5 Binary files /dev/null and b/data/images/buttons/remix/ok.png differ diff --git a/data/images/buttons/remix/reset.png b/data/images/buttons/remix/reset.png new file mode 100644 index 00000000..e09286fd Binary files /dev/null and b/data/images/buttons/remix/reset.png differ diff --git a/po/de_pysol.po b/po/de_pysol.po index ea2ea76a..4cc098a3 100644 --- a/po/de_pysol.po +++ b/po/de_pysol.po @@ -3,7 +3,7 @@ msgstr "" "Project-Id-Version: PySol 0.0.1\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-12-10 10:19-0500\n" -"PO-Revision-Date: 2024-06-22 12:14-0400\n" +"PO-Revision-Date: 2024-06-30 10:00-0400\n" "Last-Translator: H. Schaekel \n" "Language-Team: German\n" "Language: de\n" @@ -5443,6 +5443,9 @@ msgid "Othe&r graphics" msgstr "" #: pysollib/ui/tktile/menubar.py:637 +msgid "&Button icons" +msgstr "" + msgid "&Demo logo" msgstr "&Demo logo" diff --git a/po/fr_pysol.po b/po/fr_pysol.po index b98d4c2c..00341c35 100644 --- a/po/fr_pysol.po +++ b/po/fr_pysol.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: 1.02\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-12-10 10:19-0500\n" -"PO-Revision-Date: 2024-06-22 12:14-0400\n" +"PO-Revision-Date: 2024-06-30 09:59-0400\n" "Last-Translator: Eric Rausch \n" "Language-Team: French\n" "Language: fr\n" @@ -5489,6 +5489,9 @@ msgid "Othe&r graphics" msgstr "" #: pysollib/ui/tktile/menubar.py:637 +msgid "&Button icons" +msgstr "" + msgid "&Demo logo" msgstr "Logo de &démo" diff --git a/po/it_pysol.po b/po/it_pysol.po index 278da00b..27d38502 100644 --- a/po/it_pysol.po +++ b/po/it_pysol.po @@ -12,7 +12,7 @@ msgstr "" "Project-Id-Version: it_pysol\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-12-10 10:19-0500\n" -"PO-Revision-Date: 2024-06-22 12:14-0400\n" +"PO-Revision-Date: 2024-06-30 09:59-0400\n" "Last-Translator: Giuliano Colla \n" "Language-Team: Italiano \n" "Language: it\n" @@ -5554,6 +5554,9 @@ msgid "Othe&r graphics" msgstr "" #: pysollib/ui/tktile/menubar.py:637 +msgid "&Button icons" +msgstr "" + msgid "&Demo logo" msgstr "&Demo logo" diff --git a/po/pl_pysol.po b/po/pl_pysol.po index a0708daf..e5768ebd 100644 --- a/po/pl_pysol.po +++ b/po/pl_pysol.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PySolFC\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-12-10 10:19-0500\n" -"PO-Revision-Date: 2024-06-22 12:14-0400\n" +"PO-Revision-Date: 2024-06-30 09:58-0400\n" "Last-Translator: Jerzy Trzeciak \n" "Language-Team: Polish \n" "Language: pl\n" @@ -5505,6 +5505,9 @@ msgid "Othe&r graphics" msgstr "" #: pysollib/ui/tktile/menubar.py:637 +msgid "&Button icons" +msgstr "" + msgid "&Demo logo" msgstr "&Demo logo" diff --git a/po/pt_BR_pysol.po b/po/pt_BR_pysol.po index 39b61999..bbf8c9c3 100644 --- a/po/pt_BR_pysol.po +++ b/po/pt_BR_pysol.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-12-10 10:19-0500\n" -"PO-Revision-Date: 2024-06-22 12:15-0400\n" +"PO-Revision-Date: 2024-06-30 09:58-0400\n" "Last-Translator: Matheus Knack \n" "Language-Team: \n" "Language: pt_BR\n" @@ -5511,6 +5511,9 @@ msgid "Othe&r graphics" msgstr "" #: pysollib/ui/tktile/menubar.py:637 +msgid "&Button icons" +msgstr "" + msgid "&Demo logo" msgstr "&Logo da demo" diff --git a/po/pysol.pot b/po/pysol.pot index 85978441..9f527269 100644 --- a/po/pysol.pot +++ b/po/pysol.pot @@ -5237,6 +5237,9 @@ msgid "Othe&r graphics" msgstr "" #: pysollib/ui/tktile/menubar.py:637 +msgid "&Button icons" +msgstr "" + msgid "&Demo logo" msgstr "" diff --git a/po/ru_pysol.po b/po/ru_pysol.po index 6a182ed9..e58ec416 100644 --- a/po/ru_pysol.po +++ b/po/ru_pysol.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-12-10 10:19-0500\n" -"PO-Revision-Date: 2024-06-22 12:16-0400\n" +"PO-Revision-Date: 2024-06-30 09:58-0400\n" "Last-Translator: Skomoroh \n" "Language-Team: Russian \n" "Language: ru\n" @@ -5579,6 +5579,9 @@ msgid "Othe&r graphics" msgstr "" #: pysollib/ui/tktile/menubar.py:637 +msgid "&Button icons" +msgstr "" + msgid "&Demo logo" msgstr "Д&емо лого" diff --git a/pysollib/app.py b/pysollib/app.py index faffeb44..aa64d3bd 100644 --- a/pysollib/app.py +++ b/pysollib/app.py @@ -524,12 +524,19 @@ class Application: MfxMessageDialog.img[f] = im # load button images - if 0 and TOOLKIT == 'tk': - dirname = os.path.join('images', 'buttons', 'bluecurve') + MfxDialog.button_img = {} + if TOOLKIT == 'tk' and self.opt.button_icon_style != 'none': + dirname = os.path.join('images', 'buttons', + self.opt.button_icon_style) for n, f in ( (_('&OK'), 'ok'), + (_('&Select'), 'ok'), (_('&Cancel'), 'cancel'), + (_('&Close'), 'cancel'), (_('&New game'), 'new'), + (_('&Back to game'), 'back'), + (_('&Reset...'), 'reset'), + (_('&Restart'), 'reset'), ): fn = self.dataloader.findImage(f, dirname) im = loadImage(fn) diff --git a/pysollib/options.py b/pysollib/options.py index a7fe48ee..da6c94ee 100644 --- a/pysollib/options.py +++ b/pysollib/options.py @@ -100,6 +100,7 @@ pause_text_style = string redeal_icon_style = string dialog_icon_style = string tree_icon_style = string +button_icon_style = string tile_theme = string default_tile_theme = string toolbar = integer(0, 4) @@ -270,6 +271,7 @@ class Options: ('redeal_icon_style', 'str'), ('dialog_icon_style', 'str'), ('tree_icon_style', 'str'), + ('button_icon_style', 'str'), ('tile_theme', 'str'), ('default_tile_theme', 'str'), ('toolbar', 'int'), @@ -376,6 +378,7 @@ class Options: self.redeal_icon_style = 'modern' self.dialog_icon_style = 'remix' self.tree_icon_style = 'remix' + self.button_icon_style = 'none' self.tile_theme = 'default' self.default_tile_theme = 'default' self.toolbar = 1 # 0 == hide, 1,2,3,4 == top, bottom, left, right diff --git a/pysollib/ui/tktile/menubar.py b/pysollib/ui/tktile/menubar.py index bfa4b898..5a147259 100644 --- a/pysollib/ui/tktile/menubar.py +++ b/pysollib/ui/tktile/menubar.py @@ -88,6 +88,20 @@ def createStatusbarMenu(menubar, menu): def createOtherGraphicsMenu(menubar, menu): tearoff = menu.cget('tearoff') + data_dir = os.path.join(menubar.app.dataloader.dir, 'images', 'buttons') + submenu = MfxMenu(menu, label=n_('&Button icons'), tearoff=tearoff) + styledirs = os.listdir(data_dir) + styledirs.append("none") + styledirs.sort() + for f in styledirs: + d = os.path.join(data_dir, f) + if (os.path.isdir(d) and os.path.exists(os.path.join(d))) \ + or f == "none": + name = f.replace('_', ' ').capitalize() + submenu.add_radiobutton( + label=name, + variable=menubar.tkopt.button_icon_style, + value=f, command=menubar.mOptButtonIconStyle) data_dir = os.path.join(menubar.app.dataloader.dir, 'images', 'demo') submenu = MfxMenu(menu, label=n_('&Demo logo'), tearoff=tearoff) styledirs = os.listdir(data_dir) @@ -326,6 +340,7 @@ class PysolMenubarTkCommon: num_cards=tkinter.BooleanVar(), helpbar=tkinter.BooleanVar(), splashscreen=tkinter.BooleanVar(), + button_icon_style=tkinter.StringVar(), demo_logo=tkinter.BooleanVar(), demo_logo_style=tkinter.StringVar(), pause_text_style=tkinter.StringVar(), @@ -395,6 +410,7 @@ class PysolMenubarTkCommon: tkopt.statusbar.set(opt.statusbar) # tkopt.num_cards.set(opt.num_cards) # tkopt.helpbar.set(opt.helpbar) + tkopt.button_icon_style.set(opt.button_icon_style) tkopt.demo_logo.set(opt.demo_logo) if opt.demo_logo: tkopt.demo_logo_style.set(opt.demo_logo_style) @@ -1946,6 +1962,9 @@ Unsupported game for import. def mOptStatusbarConfig(self, w): self.statusbarConfig(w, self.tkopt.statusbar_vars[w].get()) + def mOptButtonIconStyle(self, *event): + self.setButtonIconStyle(self.tkopt.button_icon_style.get()) + def mOptDemoLogoStyle(self, *event): self.setDemoLogoStyle(self.tkopt.demo_logo_style.get()) @@ -2048,6 +2067,14 @@ Unsupported game for import. self.game.updateStatus(player=self.app.opt.player) self.top.update_idletasks() + def setButtonIconStyle(self, style): + if self._cancelDrag(break_pause=False): + return + self.app.opt.button_icon_style = style + self.tkopt.button_icon_style.set(style) # update radiobutton + self.app.loadImages1() + self.app.loadImages4() + def setDemoLogoStyle(self, style): if self._cancelDrag(break_pause=False): return