Re: HiDPI issues with KDE applications
28.09.2019 18:04, Christoph Cullmann пишет: Hi, I just checked again the HIDPI support of Kate/KWrite on Windows and it "sucked". It seems we never properly did setup the stuff to auto-scale, e.g. the QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true); call was missing, we only had the QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true); part that we sprinkled in most of KDE's things in the past. I now rectified that for Kate/KWrite, shall we do this for all our applications? Hi, This is wrong to set it manually, cause it's equivalent to setting QT_AUTO_SCREEN_SCALE_FACTOR=1, which in turn conflicts with setting QT_SCREEN_SCALE_FACTORS (Scale Display button in KScreen module). See also https://doc.qt.io/qt-5/highdpi.html#high-dpi-support-in-qt And please, use phabricator.
Re: HiDPI issues with KDE applications
28.09.2019 18:04, Christoph Cullmann пишет: Hi, I just checked again the HIDPI support of Kate/KWrite on Windows and it "sucked". It seems we never properly did setup the stuff to auto-scale, e.g. the QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true); call was missing, we only had the QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true); part that we sprinkled in most of KDE's things in the past. I now rectified that for Kate/KWrite, shall we do this for all our applications? Hi, This is wrong to set it manually, cause it's equivalent to setting QT_AUTO_SCREEN_SCALE_FACTOR=1, which in turn conflicts with setting QT_SCREEN_SCALE_FACTORS (Scale Display button in KScreen module). See also https://doc.qt.io/qt-5/highdpi.html#high-dpi-support-in-qt And please, use phabricator.
Re: HiDPI issues with KDE applications
On Sat, Sep 28, 2019 at 3:04 PM Christoph Cullmann wrote: > > Hi, > > I just checked again the HIDPI support of Kate/KWrite on Windows and it > "sucked". > > It seems we never properly did setup the stuff to auto-scale, e.g. the > > QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true); > Makes sense, from a Plasma POV this will make no difference, positive or negative. And if it didn't work on high DPI it would be broken on plasma anyway. David
Re: HiDPI issues with KDE applications
While were on this topic https://bugreports.qt.io/browse/QTBUG-75039 It seems qt has a few bugs related to this. Make sure multi monitor setups are tested as well. On Sat, Sep 28, 2019, 11:05 AM Christoph Cullmann wrote: > Hi, > > I just checked again the HIDPI support of Kate/KWrite on Windows and it > "sucked". > > It seems we never properly did setup the stuff to auto-scale, e.g. the > > QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true); > > call was missing, we only had the > > QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true); > > part that we sprinkled in most of KDE's things in the past. > > I now rectified that for Kate/KWrite, shall we do this for all our > applications? > > Greetings > Christoph > > -- > Ignorance is bliss... > https://cullmann.io | https://kate-editor.org >
Re: HiDPI issues with KDE applications
If this has to be done for all apps, why isn't it done at Qt level? On Sat, Sep 28, 2019 at 5:05 PM Christoph Cullmann wrote: > > Hi, > > I just checked again the HIDPI support of Kate/KWrite on Windows and it > "sucked". > > It seems we never properly did setup the stuff to auto-scale, e.g. the > > QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true); > > call was missing, we only had the > > QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true); > > part that we sprinkled in most of KDE's things in the past. > > I now rectified that for Kate/KWrite, shall we do this for all our > applications? > > Greetings > Christoph > > -- > Ignorance is bliss... > https://cullmann.io | https://kate-editor.org
Re: HiDPI issues with KDE applications
On 2019-09-28 18:23, Michael Reeves wrote: While were on this topic https://bugreports.qt.io/browse/QTBUG-75039 It seems qt has a few bugs related to this. Make sure multi monitor setups are tested as well. I have no multi-monitor different DPI setup available. But if somebody has, for sure, testing there would be appreciated. I can only tell, that without the below change, already on one screen it looks horrible :=) Greetings Christoph On Sat, Sep 28, 2019, 11:05 AM Christoph Cullmann wrote: Hi, I just checked again the HIDPI support of Kate/KWrite on Windows and it "sucked". It seems we never properly did setup the stuff to auto-scale, e.g. the QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true); call was missing, we only had the QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true); part that we sprinkled in most of KDE's things in the past. I now rectified that for Kate/KWrite, shall we do this for all our applications? Greetings Christoph -- Ignorance is bliss... https://cullmann.io | https://kate-editor.org -- Ignorance is bliss... https://cullmann.io | https://kate-editor.org
Re: HiDPI issues with KDE applications
On 2019-09-28 17:37, Christoph Cullmann wrote: On 2019-09-28 17:34, Albert Vaca Cintora wrote: If this has to be done for all apps, why isn't it done at Qt level? Because in some cases, that breaks the application, e.g. if it expects pixel to be real physical pixel 1:1. Therefore, after changing that, one needs to try the application if it behaves OK. (I did that for KWrite/Kate) Still not properly scaled seem to be things that get painted via QStyle, like the KMultiTabBar buttons: QStyleOptionButton opt; opt.initFrom(this); opt.icon = icon(); opt.iconSize = iconSize(); // removes the QStyleOptionButton::HasMenu ButtonFeature opt.features = QStyleOptionButton::Flat; QPainter painter(this); style()->drawControl(QStyle::CE_PushButton, , , this); => here I still see artifacts, both on Linux and Windows (easy to try with some export QT_SCALE_FACTOR=3) Greetings Christoph On Sat, Sep 28, 2019 at 5:05 PM Christoph Cullmann wrote: Hi, I just checked again the HIDPI support of Kate/KWrite on Windows and it "sucked". It seems we never properly did setup the stuff to auto-scale, e.g. the QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true); call was missing, we only had the QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true); part that we sprinkled in most of KDE's things in the past. I now rectified that for Kate/KWrite, shall we do this for all our applications? Greetings Christoph -- Ignorance is bliss... https://cullmann.io | https://kate-editor.org -- Ignorance is bliss... https://cullmann.io | https://kate-editor.org
Re: HiDPI issues with KDE applications
On 2019-09-28 17:34, Albert Vaca Cintora wrote: If this has to be done for all apps, why isn't it done at Qt level? Because in some cases, that breaks the application, e.g. if it expects pixel to be real physical pixel 1:1. Therefore, after changing that, one needs to try the application if it behaves OK. (I did that for KWrite/Kate) Greetings Christoph On Sat, Sep 28, 2019 at 5:05 PM Christoph Cullmann wrote: Hi, I just checked again the HIDPI support of Kate/KWrite on Windows and it "sucked". It seems we never properly did setup the stuff to auto-scale, e.g. the QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true); call was missing, we only had the QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true); part that we sprinkled in most of KDE's things in the past. I now rectified that for Kate/KWrite, shall we do this for all our applications? Greetings Christoph -- Ignorance is bliss... https://cullmann.io | https://kate-editor.org -- Ignorance is bliss... https://cullmann.io | https://kate-editor.org
HiDPI issues with KDE applications
Hi, I just checked again the HIDPI support of Kate/KWrite on Windows and it "sucked". It seems we never properly did setup the stuff to auto-scale, e.g. the QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true); call was missing, we only had the QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true); part that we sprinkled in most of KDE's things in the past. I now rectified that for Kate/KWrite, shall we do this for all our applications? Greetings Christoph -- Ignorance is bliss... https://cullmann.io | https://kate-editor.org