-
Notifications
You must be signed in to change notification settings - Fork 77
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
feat(Settings): remove UI scaling option panel #14741
Conversation
- as discussed with Design, do not allow the user to select the UI scale option from Settings as it causes many problems; instead rely on the OS/Qt HighDPI support to handle the scaling for us - note however, for advanced users, it's still possible to specify the UI scale manually by exporting the standard `QT_SCALE_FACTOR` prior to starting the app - in the longterm, we will come with our own scaling solution at the QML level, independent from the OS Fixes #14137
Jenkins Builds
|
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
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
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 in general, one small doubt to be considered
@@ -193,12 +179,12 @@ void dos_qtwebview_initialize() | |||
|
|||
void dos_qguiapplication_try_enable_threaded_renderer() | |||
{ | |||
if(QSysInfo::kernelType() == "darwin" && QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) | |||
if(QSysInfo::kernelType() == QLatin1String("darwin") && QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) |
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.
wrapping raw listerals into QLatin1String
makes sense only in case of QT_NO_CAST_FROM_ASCII
defined. Otherwise there is no benefit of that, so I would keep it simple as it was. (https://doc.qt.io/qt-5/qlatin1string.html#details)
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.
Nope, see https://github.com/KDE/clazy/blob/master/docs/checks/README-qstring-allocations.md, points 6 and 7; the crucial part here is that QString has an overloaded operator==
for QLatin1String
: https://doc.qt.io/qt-5/qstring.html#operator-eq-eq
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.
Hmm, it makes no sense to me bc QString has also overloaded operator==
for const char*
, no conversion is needed. Is clazy complaining about that?
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.
Yeah it does complain... I wonder why then 🤔
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.
If it complains, just wrap it up as you proposed to suppress it, I'm fine with that :)
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.
bool QString::operator==(const char *other) const
The other const char pointer is converted to a QString using the fromUtf8() function.
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.
Mystery solved :)
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.
Code looks good, though I don't know C++ that well.
I tested the branch too and it works fine.
RIP my beloved 125% zoom 😢 🙏
You can still use it; just make sure that you either export or that |
What does the PR do
QT_SCALE_FACTOR
prior to starting the appFixes #14137
Affected areas
Settings/Appearance
Screenshot of functionality (including design for comparison)