mirror of
https://github.com/lubosz/overte.git
synced 2025-08-08 03:27:48 +02:00
MicBar tweaks
This commit is contained in:
parent
8436d0cc6b
commit
ab68c44177
1 changed files with 24 additions and 9 deletions
|
@ -19,15 +19,30 @@ Rectangle {
|
||||||
|
|
||||||
property bool standalone: false;
|
property bool standalone: false;
|
||||||
|
|
||||||
|
width: 240;
|
||||||
|
height: 50;
|
||||||
|
|
||||||
radius: 5;
|
radius: 5;
|
||||||
color: standalone ? colors.fill : "#00000000";
|
|
||||||
|
color: "#00000000";
|
||||||
border {
|
border {
|
||||||
width: (standalone || Audio.muted || mouseArea.containsMouse) ? 2 : 0;
|
width: (standalone || Audio.muted || mouseArea.containsMouse) ? 2 : 0;
|
||||||
color: colors.border;
|
color: colors.border;
|
||||||
}
|
}
|
||||||
|
|
||||||
width: 240;
|
// borders are painted over fill, so reduce the fill to fit inside the border
|
||||||
height: 50;
|
Rectangle {
|
||||||
|
color: standalone ? colors.fill : "#00000000";
|
||||||
|
width: 236;
|
||||||
|
height: 46;
|
||||||
|
|
||||||
|
radius: 5;
|
||||||
|
|
||||||
|
anchors {
|
||||||
|
verticalCenter: parent.verticalCenter;
|
||||||
|
horizontalCenter: parent.horizontalCenter;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
id: mouseArea;
|
id: mouseArea;
|
||||||
|
@ -39,10 +54,10 @@ Rectangle {
|
||||||
bottom: icon.bottom;
|
bottom: icon.bottom;
|
||||||
}
|
}
|
||||||
|
|
||||||
hoverEnabled: true
|
hoverEnabled: true;
|
||||||
preventStealing: true
|
preventStealing: true;
|
||||||
propagateComposedEvents: false
|
propagateComposedEvents: false;
|
||||||
scrollGestureEnabled: false
|
scrollGestureEnabled: false;
|
||||||
onClicked: { Audio.muted = !Audio.muted; }
|
onClicked: { Audio.muted = !Audio.muted; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,8 +70,8 @@ Rectangle {
|
||||||
readonly property string greenStart: "#39A38F";
|
readonly property string greenStart: "#39A38F";
|
||||||
readonly property string greenEnd: "#1FC6A6";
|
readonly property string greenEnd: "#1FC6A6";
|
||||||
readonly property string red: colors.muted;
|
readonly property string red: colors.muted;
|
||||||
readonly property string fill: "#4D000000";
|
readonly property string fill: "#55000000";
|
||||||
readonly property string border: "#4DFFFFFF";
|
readonly property string border: standalone ? "#80FFFFFF" : "#55FFFFFF";
|
||||||
readonly property string icon: (Audio.muted && !mouseArea.containsMouse) ? muted : unmuted;
|
readonly property string icon: (Audio.muted && !mouseArea.containsMouse) ? muted : unmuted;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue