New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Theme options, save theme preference and oscdark enhancements #92
base: master
Are you sure you want to change the base?
Conversation
-Save theme options for the next startup -Improve link readability in 'about' page
-Fix link color to a lighter shade for dark theme compatibility
xosc_dl.py
Outdated
QMessageBox.about(self, f"About OSCDL","""<style> | ||
|
||
a{ | ||
color:#0F8EC2; | ||
text-decoration: none; | ||
} | ||
</style>""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The styling here should probably be a part of the stylesheet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was my original intention, I am just not sure it's doable
I did not find any ways to edit a QMessageBox html text through the stylesheet. I even found some forum posts specifically claiming you can't change link colors in qt MessageBoxes, so any solution must be hard-coded. I'll look into it further.
Plus, I haven't found any other links anywhere one the app, so it's not like we will be saving any time by placing the styling on the stylesheet (although I get it on principle)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update: I am currently omitting this from the changes as you can see in the newest commit. I'll try to create a solution that is theme specific, but I have read from several sources that QLabel and QMessageBox links are not customizable through stylesheets. Would you prefer an app-wide solution (people online prefer customizing the QPalette), or just keep the original dark blue and somewhat hinder readability on one page for the dark theme?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might have to keep the dark blue here for now.
There's another hyperlink in the program in the main window, you can find it by clicking on the icon next to the author name when selecting an app.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work. I have a few things to comment.
All @techydude0713 changes applied and tested on dev. Thanks for the feedback Co-authored-by: techydude0713 <39745188+techydude0713@users.noreply.github.com>
# Conflicts: # assets/themes/oscdark.qss # xosc_dl.py
New commits should correctly implement theme file loading on dev and frozen, using resource_path correctly. Also, @dhtdht020 was right, the program path join was unnecessary, I previously misunderstood the resource_path function |
Sorry for the long wait, will look at this again in the coming days. |
Adds support for switching back to the System Default after enabling dark mode, as well as saving the user preference for the next startup.
2 small changes were also made to the dark theme, for improved readability. Links are now a light blue shade (similar to discord or JetBrains links on dark mode). The 'Download' dialog is now correctly dark.
A few new code snippets are missing comments. It is because I am already working on a pull request that slightly changes them and adds proper documentation.