Changeset View
Changeset View
Standalone View
Standalone View
shell/main.cpp
Show All 35 Lines | |||||
36 | #include "standaloneappcorona.h" | 36 | #include "standaloneappcorona.h" | ||
37 | #include "shellmanager.h" | 37 | #include "shellmanager.h" | ||
38 | #include "coronatesthelper.h" | 38 | #include "coronatesthelper.h" | ||
39 | 39 | | |||
40 | #include <QDir> | 40 | #include <QDir> | ||
41 | 41 | | |||
42 | int main(int argc, char *argv[]) | 42 | int main(int argc, char *argv[]) | ||
43 | { | 43 | { | ||
44 | // Devive pixel ratio has some problems in plasmashell currently. | 44 | //Plasma scales itself to font DPI | ||
45 | // - dialog continually expands (347951) | 45 | //on X, where we don't have compositor scaling, this generally works fine. | ||
46 | // - Text element text is screwed (QTBUG-42606) | 46 | //also there are bugs on older Qt, especially when it comes to fractional scaling | ||
47 | // - Panel struts (350614) | 47 | //there's advantages to disabling, and (other than small context menu icons) few advantages in enabling | ||
48 | // This variable should possibly be removed when all are fixed | 48 | | ||
49 | 49 | //On wayland, it's different. Everything is simpler as all co-ordinates are in the same co-ordinate system | |||
50 | //we don't have fractional scaling on the client so don't hit most the remaining bugs and | ||||
51 | //even if we don't use Qt scaling the compositor will try to scale us anyway so we have no choice | ||||
52 | if (KWindowSystem::isPlatformX11()) { | ||||
50 | qunsetenv("QT_DEVICE_PIXEL_RATIO"); | 53 | qunsetenv("QT_DEVICE_PIXEL_RATIO"); | ||
51 | QCoreApplication::setAttribute(Qt::AA_DisableHighDpiScaling); | 54 | QCoreApplication::setAttribute(Qt::AA_DisableHighDpiScaling); | ||
55 | } | ||||
52 | 56 | | |||
53 | QQuickWindow::setDefaultAlphaBuffer(true); | 57 | QQuickWindow::setDefaultAlphaBuffer(true); | ||
54 | 58 | | |||
55 | KLocalizedString::setApplicationDomain("plasmashell"); | 59 | KLocalizedString::setApplicationDomain("plasmashell"); | ||
56 | 60 | | |||
57 | QApplication app(argc, argv); | 61 | QApplication app(argc, argv); | ||
58 | 62 | | |||
59 | KQuickAddons::QtQuickSettings::init(); | 63 | KQuickAddons::QtQuickSettings::init(); | ||
▲ Show 20 Lines • Show All 101 Lines • Show Last 20 Lines |