-
-
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: reload default.qss when (re)loading a skin #12219
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.
I have found an issue that is also present in:
Line 323 in 2db33fd
QString style = QString::fromLocal8Bit(fileBytes); |
Can you fix both?
src/mixxxmainwindow.cpp
Outdated
QFile file(":/skins/default.qss"); | ||
if (file.open(QIODevice::ReadOnly)) { | ||
QByteArray fileBytes = file.readAll(); | ||
QString style = QString::fromLocal8Bit(fileBytes); |
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 don't think that fromLocal8Bit is correct here, because default.qss has always the same encoding on all our targets.
Is it Latin1 or Utf8?
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.
ParserM3u uses Utf8 so I picked that 🤷
I moved the redundant parsing to an inline function. We could as well move it to a member function (incl. setStyleSheet()).
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.
an inline function
That was pointless (and couldn't be built on all OS), I moved it to a member function.
fc88702
to
ff5bd28
Compare
ff5bd28
to
74c708e
Compare
74c708e
to
2608a9d
Compare
@daschuer I didn't test properly before. Now default.qss is truly reloaded without a rebuild or restart. |
This PR is marked as stale because it has been open 90 days with no activity. |
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, thank you.
This makes the workflow of tweaking
/res/skins/default.qss
a bit... faster.Previously, a
restartrebuild was required because deafult.qss is imported via /res/mixxx.qrc