[Notifications] Workaround NativeRendering with non-integer scaling

Since it is a custom `TextEdit` to make text selectable the workaround in the style didn't apply to it.

Differential Revision: https://phabricator.kde.org/D22858
wilder-5.17
Kai Uwe Broulik 7 years ago
parent ccdc3851bb
commit e3035bbceb
  1. 5
      applets/notifications/package/contents/ui/SelectableLabel.qml

@ -20,6 +20,7 @@
*/
import QtQuick 2.8
import QtQuick.Window 2.2
import QtQuick.Layouts 1.1
import org.kde.plasma.core 2.0 as PlasmaCore
@ -73,7 +74,9 @@ Item {
font.underline: theme.defaultFont.underline
font.weight: theme.defaultFont.weight
font.wordSpacing: theme.defaultFont.wordSpacing
renderType: Text.NativeRendering
// Work around Qt bug where NativeRendering breaks for non-integer scale factors
// https://bugreports.qt.io/browse/QTBUG-67007
renderType: Screen.devicePixelRatio % 1 !== 0 ? Text.QtRendering : Text.NativeRendering
selectByMouse: true
readOnly: true
wrapMode: Text.Wrap

Loading…
Cancel
Save