D7188: Use Qt scaling in Plamsa
davidedmundson added a comment. @notmart If this was generic code, we should care about that. For plasmashell we can be sure we're launched via startplasma and have the env vars that set. If they're not there, it's the user's fault for being weird. I might make it an expliticit env var and sell it as a feature so we can re-test X easier. REPOSITORY R120 Plasma Workspace REVISION DETAIL https://phabricator.kde.org/D7188 To: davidedmundson, #plasma, mart Cc: graesslin, cfeck, mart, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, lukas
D7188: Use Qt scaling in Plamsa
mart added a comment. wonder if we'll have to end up adding a command line switch for it? :( REPOSITORY R120 Plasma Workspace REVISION DETAIL https://phabricator.kde.org/D7188 To: davidedmundson, #plasma, mart Cc: graesslin, cfeck, mart, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, lukas
D7188: Use Qt scaling in Plamsa
mart added a comment. In https://phabricator.kde.org/D7188#133604, @graesslin wrote: > You could check for env variable QT_QPA_PLATFORM what about when is undefined but platform undetected? REPOSITORY R120 Plasma Workspace REVISION DETAIL https://phabricator.kde.org/D7188 To: davidedmundson, #plasma, mart Cc: graesslin, cfeck, mart, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, lukas
D7188: Use Qt scaling in Plamsa
graesslin added a comment. You could check for env variable QT_QPA_PLATFORM REPOSITORY R120 Plasma Workspace REVISION DETAIL https://phabricator.kde.org/D7188 To: davidedmundson, #plasma, mart Cc: graesslin, cfeck, mart, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, lukas
D7188: Use Qt scaling in Plamsa
davidedmundson added a comment. Oh bother. There's something majorly wrong with that check, which I added in at the last minute. Ironically to reduce potential breakages. KWindowSystem::platform() can only be called after qApp is made ; otherwise the result is...weird. QCoreApplication::setAttribute can only be called before qApp is made I'm stuck on finding a neat solution. REPOSITORY R120 Plasma Workspace REVISION DETAIL https://phabricator.kde.org/D7188 To: davidedmundson, #plasma, mart Cc: cfeck, mart, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, lukas
D7188: Use Qt scaling in Plamsa
davidedmundson added a comment. How embarassing, fixed. Thanks REPOSITORY R120 Plasma Workspace REVISION DETAIL https://phabricator.kde.org/D7188 To: davidedmundson, #plasma, mart Cc: cfeck, mart, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, lukas
D7188: Use Qt scaling in Plamsa
cfeck added a comment. Add some #include KWindowSystem, otherwise the symbol is not defined. REPOSITORY R120 Plasma Workspace REVISION DETAIL https://phabricator.kde.org/D7188 To: davidedmundson, #plasma, mart Cc: cfeck, mart, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, lukas
D7188: Use Qt scaling in Plamsa
This revision was automatically updated to reflect the committed changes. Closed by commit R120:bbf7aaf34485: Use Qt scaling in Plamsa (authored by davidedmundson). REPOSITORY R120 Plasma Workspace CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D7188?vs=17833=17851 REVISION DETAIL https://phabricator.kde.org/D7188 AFFECTED FILES shell/main.cpp To: davidedmundson, #plasma, mart Cc: mart, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, lukas
D7188: Use Qt scaling in Plamsa
davidedmundson added a comment. Effectively. The scale factor is part of the wl_output protocol, which is set by kwin and read by the QtQPA. This all mostly works already. No need for env vars. . REPOSITORY R120 Plasma Workspace BRANCH python REVISION DETAIL https://phabricator.kde.org/D7188 To: davidedmundson, #plasma, mart Cc: mart, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, lukas
D7188: Use Qt scaling in Plamsa
mart accepted this revision. mart added a comment. This revision is now accepted and ready to land. making fractional scalings work correctly will be fun... sounds fun :) btw, the final plan is using QT_SCREEN_SCALE_FACTORS with potentially different scalings per screen, right? REPOSITORY R120 Plasma Workspace BRANCH python REVISION DETAIL https://phabricator.kde.org/D7188 To: davidedmundson, #plasma, mart Cc: mart, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, lukas
D7188: Use Qt scaling in Plamsa
davidedmundson created this revision. Restricted Application added a project: Plasma. Restricted Application added a subscriber: plasma-devel. REVISION 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 TEST PLAN Had this for about a week on my laptop. Haven't noticed a single problem. REPOSITORY R120 Plasma Workspace BRANCH python REVISION DETAIL https://phabricator.kde.org/D7188 AFFECTED FILES shell/main.cpp To: davidedmundson, #plasma Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart, lukas