mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 22:10:25 +02:00
Add hover state to browser window buttons
This commit is contained in:
parent
fd2535ecaf
commit
9d3b763256
1 changed files with 12 additions and 6 deletions
|
@ -62,37 +62,43 @@ ScrollingWindow {
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: 8
|
anchors.leftMargin: 8
|
||||||
HiFiGlyphs {
|
HiFiGlyphs {
|
||||||
id: back;
|
id: back
|
||||||
enabled: webview.canGoBack
|
enabled: webview.canGoBack
|
||||||
text: hifi.glyphs.backward
|
text: hifi.glyphs.backward
|
||||||
color: enabled ? hifi.colors.faintGray : hifi.colors.lightGray
|
color: enabled ? (backMouseArea.containsMouse ? hifi.colors.blueHighlight : hifi.colors.faintGray) : hifi.colors.lightGray
|
||||||
size: 48
|
size: 48
|
||||||
MouseArea {
|
MouseArea {
|
||||||
|
id: backMouseArea
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
onClicked: webview.goBack();
|
onClicked: webview.goBack();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
HiFiGlyphs {
|
HiFiGlyphs {
|
||||||
id: forward;
|
id: forward
|
||||||
enabled: webview.canGoForward
|
enabled: webview.canGoForward
|
||||||
text: hifi.glyphs.forward
|
text: hifi.glyphs.forward
|
||||||
color: enabled ? hifi.colors.faintGray : hifi.colors.lightGray
|
color: enabled ? (forwardMouseArea.containsMouse ? hifi.colors.blueHighlight : hifi.colors.faintGray) : hifi.colors.lightGray
|
||||||
size: 48
|
size: 48
|
||||||
MouseArea {
|
MouseArea {
|
||||||
|
id: forwardMouseArea
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
onClicked: webview.goForward();
|
onClicked: webview.goForward();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
HiFiGlyphs {
|
HiFiGlyphs {
|
||||||
id: reload;
|
id: reload
|
||||||
enabled: url !== ""
|
enabled: url !== ""
|
||||||
text: webview.loading ? hifi.glyphs.close : hifi.glyphs.reload
|
text: webview.loading ? hifi.glyphs.close : hifi.glyphs.reload
|
||||||
color: enabled ? hifi.colors.faintGray : hifi.colors.lightGray
|
color: enabled ? (reloadMouseArea.containsMouse ? hifi.colors.blueHighlight : hifi.colors.faintGray) : hifi.colors.lightGray
|
||||||
size: 48
|
size: 48
|
||||||
MouseArea {
|
MouseArea {
|
||||||
|
id: reloadMouseArea
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
hoverEnabled: true
|
||||||
onClicked: webview.loading ? webview.stop() : webview.reload();
|
onClicked: webview.loading ? webview.stop() : webview.reload();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue