From 021ca8c08ae7f3eaf142a670312b14f66f1b4105 Mon Sep 17 00:00:00 2001 From: Viranch Mehta Date: Wed, 4 Apr 2012 15:40:23 +0530 Subject: [PATCH] Fix the SVGs in QML Scrollbar component: * The hover and non-hover arrow images in vertical scrollbar are the same. * The pressed/hover/normal states of down/right arrows are connected to mouse area of up/left arrows. * The mouse areas of the arrows do not have hoverEnabled property set to true. This is required to use their containsMouse property. REVIEW: 104402 --- .../plasmacomponents/qml/private/ScrollBarDelegate.qml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/declarativeimports/plasmacomponents/qml/private/ScrollBarDelegate.qml b/declarativeimports/plasmacomponents/qml/private/ScrollBarDelegate.qml index 15ee7aa68..14c1ee797 100644 --- a/declarativeimports/plasmacomponents/qml/private/ScrollBarDelegate.qml +++ b/declarativeimports/plasmacomponents/qml/private/ScrollBarDelegate.qml @@ -129,7 +129,7 @@ PlasmaCore.FrameSvgItem { if (scrollbar.activeFocus || leftMouseArea.containsMouse) { return internalLoader.isVertical ? "mouseover-arrow-up" : "mouseover-arrow-left" } else { - return internalLoader.isVertical ? "mouseover-arrow-up" : "arrow-left" + return internalLoader.isVertical ? "arrow-up" : "arrow-left" } } @@ -138,6 +138,7 @@ PlasmaCore.FrameSvgItem { anchors.fill: parent enabled: scrollbar.enabled + hoverEnabled: true Timer { id: leftTimer interval: scrollbar.scrollButtonInterval; @@ -169,14 +170,14 @@ PlasmaCore.FrameSvgItem { height: 18 svg: scrollbarSvg elementId: { - if (leftMouseArea.pressed) { + if (rightMouseArea.pressed) { return internalLoader.isVertical ? "sunken-arrow-down" : "sunken-arrow-right" } - if (scrollbar.activeFocus || leftMouseArea.containsMouse) { + if (scrollbar.activeFocus || rightMouseArea.containsMouse) { return internalLoader.isVertical ? "mouseover-arrow-down" : "mouseover-arrow-right" } else { - return internalLoader.isVertical ? "mouseover-arrow-down" : "arrow-right" + return internalLoader.isVertical ? "arrow-down" : "arrow-right" } } @@ -185,6 +186,7 @@ PlasmaCore.FrameSvgItem { anchors.fill: parent enabled: scrollbar.enabled + hoverEnabled: true Timer { id: rightTimer interval: scrollbar.scrollButtonInterval;