mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
BUGZ-1342: Add lock icon to Emote tray when it's locked open; Make tray close when unlocking it
This commit is contained in:
parent
3134332513
commit
4098dd9999
2 changed files with 39 additions and 2 deletions
|
@ -139,6 +139,28 @@ Rectangle {
|
||||||
opacity: emoteIndicator.source.toString().indexOf("Icon.svg") > -1 ? 1.0 : 0.0
|
opacity: emoteIndicator.source.toString().indexOf("Icon.svg") > -1 ? 1.0 : 0.0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Image {
|
||||||
|
id: lockIcon
|
||||||
|
width: 12
|
||||||
|
height: 12
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.topMargin: 2
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: 0
|
||||||
|
source: "images/lock_Icon.svg"
|
||||||
|
fillMode: Image.PreserveAspectFit
|
||||||
|
mipmap: true
|
||||||
|
visible: false
|
||||||
|
}
|
||||||
|
|
||||||
|
ColorOverlay {
|
||||||
|
id: lockIconColorOverlay
|
||||||
|
anchors.fill: lockIcon
|
||||||
|
source: lockIcon
|
||||||
|
color: "#ffffff"
|
||||||
|
visible: drawerContainer.keepDrawerExpanded
|
||||||
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: emoteIndicatorMouseArea
|
id: emoteIndicatorMouseArea
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
@ -147,14 +169,21 @@ Rectangle {
|
||||||
onClicked: {
|
onClicked: {
|
||||||
Tablet.playSound(TabletEnums.ButtonClick);
|
Tablet.playSound(TabletEnums.ButtonClick);
|
||||||
drawerContainer.keepDrawerExpanded = !drawerContainer.keepDrawerExpanded;
|
drawerContainer.keepDrawerExpanded = !drawerContainer.keepDrawerExpanded;
|
||||||
|
// If the drawer is no longer expanded, disable this MouseArea (which will close
|
||||||
|
// the emote tray) until the user's cursor leaves the MouseArea (see `onExited()` below).
|
||||||
|
if (!drawerContainer.keepDrawerExpanded) {
|
||||||
|
emoteIndicatorMouseArea.enabled = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onEntered: {
|
onEntered: {
|
||||||
Tablet.playSound(TabletEnums.ButtonHover);
|
Tablet.playSound(TabletEnums.ButtonHover);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
onExited: {
|
||||||
|
emoteIndicatorMouseArea.enabled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Row {
|
Row {
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 23.0.6, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
|
viewBox="0 0 42 64" style="enable-background:new 0 0 42 64;" xml:space="preserve">
|
||||||
|
<path d="M36.8,22.8v-7.1C36.8,7,29.7,0,21,0S5.2,7,5.2,15.7v7.1C2.2,23.8,0,26.7,0,30v26.3C0,60.5,3.5,64,7.8,64h26.5
|
||||||
|
c4.3,0,7.8-3.5,7.8-7.7V30C42,26.7,39.8,23.8,36.8,22.8z M27.1,50.5c0,3.3-2.8,6.1-6.1,6.1s-6.1-2.7-6.1-6.1v-2.3
|
||||||
|
c0-3.3,2.8-6.1,6.1-6.1s6.1,2.7,6.1,6.1V50.5z M30,22.4H12v-6.7c0-4.9,4-8.9,9-8.9s9,4,9,8.9V22.4z"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 686 B |
Loading…
Reference in a new issue