Commit bbf7aaf3 authored by David Edmundson's avatar David Edmundson

Use Qt scaling in Plamsa

Summary:
I've done this only when on Wayland because:

On X, our own scaling to font generally works well.
There are bugs on older Qt, especially when it comes to fractional
scaling, and we can't support per screen scales anyway.
There's advantages to disabling, and (other than small context menu
icons) few advantages in enabling

On wayland, it's different. Everything is simpler as all co-ordinates
are in the same co-ordinate system
we don't have fractional scaling on the client so don't hit most the
remaining bugs and
even if we don't use Qt scaling the compositor will try to scale us
anyway so we have no choice

CCBUG: 356446

Test Plan:
Had this for about a week on my laptop.
Haven't noticed a single problem.

Reviewers: #plasma, mart

Reviewed By: #plasma, mart

Subscribers: mart, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D7188
parent 86e5422b
......@@ -41,14 +41,18 @@
int main(int argc, char *argv[])
{
// Devive pixel ratio has some problems in plasmashell currently.
// - dialog continually expands (347951)
// - Text element text is screwed (QTBUG-42606)
// - Panel struts (350614)
// This variable should possibly be removed when all are fixed
qunsetenv("QT_DEVICE_PIXEL_RATIO");
QCoreApplication::setAttribute(Qt::AA_DisableHighDpiScaling);
//Plasma scales itself to font DPI
//on X, where we don't have compositor scaling, this generally works fine.
//also there are bugs on older Qt, especially when it comes to fractional scaling
//there's advantages to disabling, and (other than small context menu icons) few advantages in enabling
//On wayland, it's different. Everything is simpler as all co-ordinates are in the same co-ordinate system
//we don't have fractional scaling on the client so don't hit most the remaining bugs and
//even if we don't use Qt scaling the compositor will try to scale us anyway so we have no choice
if (KWindowSystem::isPlatformX11()) {
qunsetenv("QT_DEVICE_PIXEL_RATIO");
QCoreApplication::setAttribute(Qt::AA_DisableHighDpiScaling);
}
QQuickWindow::setDefaultAlphaBuffer(true);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment