Skip to content
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

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

pavlidvg
Copy link

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.
after
before

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.

-Save theme options for the next startup
-Improve link readability in 'about' page
-Fix link color to a lighter shade for dark theme compatibility
settings Outdated Show resolved Hide resolved
@dhtdht020 dhtdht020 added the enhancement New feature or request label Jan 25, 2023
@dhtdht020 dhtdht020 linked an issue Jan 25, 2023 that may be closed by this pull request
xosc_dl.py Outdated
Comment on lines 148 to 154
QMessageBox.about(self, f"About OSCDL","""<style>

a{
color:#0F8EC2;
text-decoration: none;
}
</style>"""
Copy link
Owner

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.

Copy link
Author

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)

Copy link
Author

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?

Copy link
Owner

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.

@pavlidvg pavlidvg mentioned this pull request Jan 28, 2023
Copy link
Contributor

@techydude0713 techydude0713 left a 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.

assets/themes/oscdark.qss Outdated Show resolved Hide resolved
xosc_dl.py Outdated Show resolved Hide resolved
xosc_dl.py Outdated Show resolved Hide resolved
xosc_dl.py Outdated Show resolved Hide resolved
xosc_dl.py Outdated Show resolved Hide resolved
xosc_dl.py Show resolved Hide resolved
pavlidvg and others added 3 commits February 2, 2023 13:17
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
@pavlidvg
Copy link
Author

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

@dhtdht020
Copy link
Owner

Sorry for the long wait, will look at this again in the coming days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dark Mode adjustments
3 participants