diff options
Diffstat (limited to 'jfr_playoff')
-rw-r--r-- | jfr_playoff/gui/__init__.py | 16 | ||||
-rw-r--r-- | jfr_playoff/gui/icons/playoff.gif | bin | 0 -> 2312 bytes |
2 files changed, 8 insertions, 8 deletions
diff --git a/jfr_playoff/gui/__init__.py b/jfr_playoff/gui/__init__.py index 637e35c..546e1a1 100644 --- a/jfr_playoff/gui/__init__.py +++ b/jfr_playoff/gui/__init__.py @@ -26,17 +26,11 @@ class PlayoffGUI(tk.Tk): ttk.Style().configure('TLabelframe.Label', foreground='black') ttk.Style().configure('TLabelframe', padding=5) self.geometry('920x640') - try: - self.iconbitmap(GuiImage.get_path('icons', 'playoff', 'ico')) - except tk.TclError: - pass # sometimes it fails on Linux, just ignore + self._setWindowIcon(self, GuiImage.get_icon('playoff')) self.tabs = {} self.logWindow = LogWindow(self) self.logWindow.title('Dziennik komunikatów') - try: - self.logWindow.iconbitmap(GuiImage.get_path('icons', 'playoff', 'ico')) - except tk.TclError: - pass # sometimes it fails on Linux, just ignore + self._setWindowIcon(self.logWindow, GuiImage.get_icon('playoff')) self._buildMenu() self.newFileIndex = 0 self._title = tk.StringVar() @@ -65,6 +59,12 @@ class PlayoffGUI(tk.Tk): self.bind('<<BracketError>>', self._onBracketError, add='+') self.mainloop() + def _setWindowIcon(self, window, icon): + try: + self.tk.call('wm', 'iconphoto', window._w, icon) + except tk.TclError: + pass # sometimes it fails on Linux, just ignore + def _onFileChange(self, *args): self._dirty.set(True) diff --git a/jfr_playoff/gui/icons/playoff.gif b/jfr_playoff/gui/icons/playoff.gif Binary files differnew file mode 100644 index 0000000..2e86704 --- /dev/null +++ b/jfr_playoff/gui/icons/playoff.gif |