First of all, thanks for providing such a nice wrapper around basic tkinter application. This modules allows to achieve a really nice looking tkinter application as opposed to using bare tkinter app.
I have noticed that Window class usage is preffered as opposed to tkinter.Tk() when creating main/root window of an application. However, I have realised that Window class is missing some argument passthrough functionality - when Window's class super(in this case - tkinter.Tk()) class init method is called, there is no possibility to pass some arguments which are available according to an official tkinter documentation.
Hence, I have added missing functionality in.
Motivation behind it is following - I am using Ubuntu with GNOME environment. When creating a tkinter window using Window class, it creates an app which name defaults to Tk when I am hovering over the icon of the running app. In order to adjust it, I must change the value of className. However, there is no way of controlling it from Window class & I am not willing to revert back to "old" way of creating a window via calling tkinter.Tk() myself. Hence, I decided to make my contribution at this stage to lift the limitation of ttkbootstrap's Window class as this is where the limitation resides.
Current behaviour on Ubuntu using GNOME:
Proposed change allows to change the pop-up text using className under Ubuntu GNOME:
Below is the minimal code that I used to achieve the result displayed above:
import ttkbootstrap as ttk
class RootWindow(ttk.Window):
def __init__(self):
super().__init__(className="My awesome app")
app = RootWindow()
app.mainloop()
Hello,
First of all, thanks for providing such a nice wrapper around basic tkinter application. This modules allows to achieve a really nice looking tkinter application as opposed to using bare tkinter app.
I have noticed that
Window
class usage is preffered as opposed totkinter.Tk()
when creating main/root window of an application. However, I have realised thatWindow
class is missing some argument passthrough functionality - whenWindow
's classsuper
(in this case -tkinter.Tk()
) class init method is called, there is no possibility to pass some arguments which are available according to an official tkinter documentation.Hence, I have added missing functionality in.
Motivation behind it is following - I am using Ubuntu with GNOME environment. When creating a tkinter window using
Window
class, it creates an app which name defaults toTk
when I am hovering over the icon of the running app. In order to adjust it, I must change the value ofclassName
. However, there is no way of controlling it fromWindow
class & I am not willing to revert back to "old" way of creating a window via calling tkinter.Tk() myself. Hence, I decided to make my contribution at this stage to lift the limitation ofttkbootstrap
'sWindow
class as this is where the limitation resides.Current behaviour on Ubuntu using GNOME:
Proposed change allows to change the pop-up text using
className
under Ubuntu GNOME:Below is the minimal code that I used to achieve the result displayed above: