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
This commit is contained in:
Viranch Mehta 2012-04-04 15:40:23 +05:30
parent 027c83e27a
commit 021ca8c08a

View File

@ -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;