-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Skins: transform qss icon urls into absolute paths #3877
Conversation
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.
LGTM, I can confirm that this doesn't break anything for me. But I'm also not affected by the bug that this is supposed to fix.
src/skin/legacyskinparser.cpp
Outdated
// This replaces relative icon urls in stylesheets (external qss or inline | ||
// <Style> nodes) with absolute file paths. | ||
// TODO Can be removed/disabled as soon as https://bugs.launchpad.net/mixxx/+bug/1922966 | ||
// is fixed on all target OS/distros, or rather all target OS have | ||
// the fixed package in their repo. |
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.
Do we have an upstream QTBUG that we can mention here?
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.
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.
And any release of kiconthemes != 5.80 will work
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.
(i.e., should we try to only apply this fix for cases where the package is installed and the wrong version?)
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.
No, I don't think this breaks anything for unaffected distros. works fine on my machine.
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.
This works on Ubuntu 21.04. Brilliant fix
e0876ac
to
4d6b69e
Compare
I mentioned the kde bug in the comment. the replace function is now separate and used for the launch image as well as the actual skin stylesheet.
thought about that, too, but I have nooo idea how to detect that. btw there are other plugins possibly interfering --or possibly helpful-- like |
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.
Checks fail.
@@ -2262,3 +2266,15 @@ void LegacySkinParser::addShortcutToToolTip(WBaseWidget* pWidget, | |||
QString LegacySkinParser::parseLaunchImageStyle(const QDomNode& node) { | |||
return m_pContext->selectString(node, "LaunchImageStyle"); | |||
} | |||
|
|||
QString LegacySkinParser::stylesheetAbsIconPaths(QString& 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.
Mutable references are confusing IMHO, but in this case it's okay I guess.
to work around missing SVG icons when broken libKF5IconThemes5 5.80 is installed
4d6b69e
to
cbfada1
Compare
ahhmm, yes...got distracted. one more Ctrl+S and it works. |
btw @ywwg the preferences icons were not affected? 'only' skin icons and the checkmarks in the manubar, right? |
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.
still works after update
preferences look fine |
alright, thanks. An affected user in the forum managed to build this PR on Ubuntu Studio 21.04 and noticed the issues I watched during my VM testing as well (Ubuntu 21.04): the launch image, logo and some icons are distorted. meeeh.. |
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.
Thanks!
thanks so much for this! |
yeah, welcome! |
work around https://bugs.launchpad.net/mixxx/+bug/1922966
actually we could use the
background
shorthand in qss instead of the affectedimage
#3863but that is a lot of work with (see that PR description) and also doesn't work satisfactory for library widgets, since
background
wouldn't scale images to the actual button size (which varies depending on the library font and the width of the preview column for example).This pr simply adds absolute file paths where we use skin:/colortheme/icons.