From c6804b034d5812122fee49361657ae1a59136319 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Fri, 18 Sep 2015 20:17:07 +0200 Subject: [PATCH] consider devicepixelration in standalone scrollbar Change-Id: I06e55738cde060f7ff372c039be20f5dad72d070 --- .../plasmacomponents/qml/private/ScrollBarDelegate.qml | 4 ++-- .../plasmacomponents/qml/private/ScrollDecoratorDelegate.qml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/declarativeimports/plasmacomponents/qml/private/ScrollBarDelegate.qml b/src/declarativeimports/plasmacomponents/qml/private/ScrollBarDelegate.qml index 658d27221..db9f28f00 100644 --- a/src/declarativeimports/plasmacomponents/qml/private/ScrollBarDelegate.qml +++ b/src/declarativeimports/plasmacomponents/qml/private/ScrollBarDelegate.qml @@ -28,8 +28,8 @@ PlasmaCore.FrameSvgItem { imagePath:"widgets/scrollbar" prefix: internalLoader.isVertical ? "background-vertical" : "background-horizontal" - property int implicitWidth: scrollbarSvg.hasElement("hint-scrollbar-size") ? scrollbarSvg.elementSize("hint-scrollbar-size").width : scrollbarSvg.elementSize("arrow-up").width - property int implicitHeight: scrollbarSvg.hasElement("hint-scrollbar-size") ? scrollbarSvg.elementSize("hint-scrollbar-size").height : scrollbarSvg.elementSize("arrow-left").height + property int implicitWidth: (scrollbarSvg.hasElement("hint-scrollbar-size") ? scrollbarSvg.elementSize("hint-scrollbar-size").width : scrollbarSvg.elementSize("arrow-up").width) * Math.max(1, Math.floor(units.devicePixelRatio)) + property int implicitHeight: (scrollbarSvg.hasElement("hint-scrollbar-size") ? scrollbarSvg.elementSize("hint-scrollbar-size").height : scrollbarSvg.elementSize("arrow-left").height) * Math.max(1, Math.floor(units.devicePixelRatio)) Keys.onUpPressed: { if (!enabled || !internalLoader.isVertical) diff --git a/src/declarativeimports/plasmacomponents/qml/private/ScrollDecoratorDelegate.qml b/src/declarativeimports/plasmacomponents/qml/private/ScrollDecoratorDelegate.qml index c2746c8e5..fbf9d7d27 100644 --- a/src/declarativeimports/plasmacomponents/qml/private/ScrollDecoratorDelegate.qml +++ b/src/declarativeimports/plasmacomponents/qml/private/ScrollDecoratorDelegate.qml @@ -28,8 +28,8 @@ PlasmaCore.FrameSvgItem { imagePath:"widgets/scrollbar" prefix: internalLoader.isVertical ? "background-vertical" : "background-horizontal" - property int implicitWidth: scrollbarSvg.hasElement("hint-scrollbar-size") ? scrollbarSvg.elementSize("hint-scrollbar-size").width : 12 - property int implicitHeight: scrollbarSvg.hasElement("hint-scrollbar-size") ? scrollbarSvg.elementSize("hint-scrollbar-size").height : 12 + property int implicitWidth: scrollbarSvg.hasElement("hint-scrollbar-size") ? scrollbarSvg.elementSize("hint-scrollbar-size").width * Math.max(1, Math.floor(units.devicePixelRatio)) : 12 + property int implicitHeight: scrollbarSvg.hasElement("hint-scrollbar-size") ? scrollbarSvg.elementSize("hint-scrollbar-size").height * Math.max(1, Math.floor(units.devicePixelRatio)) : 12 opacity: 0 Behavior on opacity {