Skip to content

Adds Theme Functionality#90

Open
Sir-Kam wants to merge 4 commits intoBigBoiCJ:mainfrom
Sir-Kam:main
Open

Adds Theme Functionality#90
Sir-Kam wants to merge 4 commits intoBigBoiCJ:mainfrom
Sir-Kam:main

Conversation

@Sir-Kam
Copy link
Copy Markdown

@Sir-Kam Sir-Kam commented Jan 17, 2025

Though I've seen no one mention this in the issues, I decided to mess around and implement it just for myself. So I thought I'd put forth a request for this addition to be merged, as I imagine others might like it :)
~

New Additions

Themes

  • Adds 'ttkbootstrap' package to the requirements.txt which allows for easy theme handling. Trying to create a solution for coloring the UI without it, while possible, was kinda fiddly- so I opted to use this package instead.
  • Using 'ttkbootstrap', 3 typical UI themes have been made usable: Light, Dark, and Black. Light is quite similar to how the UI is colored currently, Dark is your normal dark mode, and Black is a darker Dark.
  • An option to change the theme has been added to the Settings window. The theme will update the UI colors when changed and the selected theme is saved to config.

Misc

Settings Window Screen Position

  • The settings window will now open at the current position of the main (root) window. Where previously if the main window was moved to another monitor, then when the settings window was opened, it would be shown in the default position (where the main was initially shown).

Adds the typical 3 themes of Light, Dark, and Black to the program- changeable from within the settings window.
Theme value has also been added to the saved config data.
Themes required the addition of ttkbootstrap (to do it easily and cleanly). The Tk() window elements are now ttkbootstrap.Tk() windows to avoid some occasional crashing related to the 'tkinterdnd2' extension features and the Style() being a differently implementation to support the themes. Crashing probably could be been avoided if I were more familiar with how it works.
The theming addition changed the font type of the "logs_text" multiline Text UI element. Was able to override it back to the same "TkFixedFont" which was its default before.
@BigBoiCJ
Copy link
Copy Markdown
Owner

Woops! Sorry, I've been away for a while! Thanks for making this, I'll have a look at it!

@BigBoiCJ
Copy link
Copy Markdown
Owner

And I still haven't looked at it and I'm still busy... what a bad 'maintainer' I am

Copy link
Copy Markdown

@truelockmc truelockmc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but the .gitignore should be removed from the pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants