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:
parent
027c83e27a
commit
021ca8c08a
|
@ -129,7 +129,7 @@ PlasmaCore.FrameSvgItem {
|
||||||
if (scrollbar.activeFocus || leftMouseArea.containsMouse) {
|
if (scrollbar.activeFocus || leftMouseArea.containsMouse) {
|
||||||
return internalLoader.isVertical ? "mouseover-arrow-up" : "mouseover-arrow-left"
|
return internalLoader.isVertical ? "mouseover-arrow-up" : "mouseover-arrow-left"
|
||||||
} else {
|
} 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
|
anchors.fill: parent
|
||||||
enabled: scrollbar.enabled
|
enabled: scrollbar.enabled
|
||||||
|
hoverEnabled: true
|
||||||
Timer {
|
Timer {
|
||||||
id: leftTimer
|
id: leftTimer
|
||||||
interval: scrollbar.scrollButtonInterval;
|
interval: scrollbar.scrollButtonInterval;
|
||||||
|
@ -169,14 +170,14 @@ PlasmaCore.FrameSvgItem {
|
||||||
height: 18
|
height: 18
|
||||||
svg: scrollbarSvg
|
svg: scrollbarSvg
|
||||||
elementId: {
|
elementId: {
|
||||||
if (leftMouseArea.pressed) {
|
if (rightMouseArea.pressed) {
|
||||||
return internalLoader.isVertical ? "sunken-arrow-down" : "sunken-arrow-right"
|
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"
|
return internalLoader.isVertical ? "mouseover-arrow-down" : "mouseover-arrow-right"
|
||||||
} else {
|
} 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
|
anchors.fill: parent
|
||||||
enabled: scrollbar.enabled
|
enabled: scrollbar.enabled
|
||||||
|
hoverEnabled: true
|
||||||
Timer {
|
Timer {
|
||||||
id: rightTimer
|
id: rightTimer
|
||||||
interval: scrollbar.scrollButtonInterval;
|
interval: scrollbar.scrollButtonInterval;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user