Fix QML widget being too wide in hidpi

We don't need to multiply by the devicePixelRatio here
This commit is contained in:
Albert Astals Cid 2024-10-12 11:48:25 +02:00 committed by Albert Vaca Cintora
parent 9ad5b56be1
commit 3242a5bebc

View file

@ -55,7 +55,7 @@ KdeConnectKcm::KdeConnectKcm(QObject *parent, const KPluginMetaData &md, const Q
sortProxyModel = new DevicesSortProxyModel(devicesModel); sortProxyModel = new DevicesSortProxyModel(devicesModel);
kcmUi.list_quick_widget->setMinimumWidth(250 * kcmUi.list_quick_widget->devicePixelRatio()); kcmUi.list_quick_widget->setMinimumWidth(250);
kcmUi.list_quick_widget->rootContext()->setContextObject(new KLocalizedContext(kcmUi.list_quick_widget)); kcmUi.list_quick_widget->rootContext()->setContextObject(new KLocalizedContext(kcmUi.list_quick_widget));
kcmUi.list_quick_widget->setClearColor(kcmUi.list_quick_widget->palette().color(QPalette::Window)); kcmUi.list_quick_widget->setClearColor(kcmUi.list_quick_widget->palette().color(QPalette::Window));
kcmUi.list_quick_widget->setSource(QUrl(QStringLiteral("qrc:/kdeconnectkcm/list.qml"))); kcmUi.list_quick_widget->setSource(QUrl(QStringLiteral("qrc:/kdeconnectkcm/list.qml")));