mirror of
https://github.com/lubosz/overte.git
synced 2025-04-25 13:13:02 +02:00
changing opacity
This commit is contained in:
parent
8627a92f29
commit
f2b0e47c39
2 changed files with 8 additions and 8 deletions
|
@ -24,9 +24,9 @@ Rectangle {
|
||||||
|
|
||||||
function updateOpacity() {
|
function updateOpacity() {
|
||||||
if (ignoreRadiusEnabled) {
|
if (ignoreRadiusEnabled) {
|
||||||
bubbleRect.opacity = 0.7;
|
bubbleRect.opacity = 1.0;
|
||||||
} else {
|
} else {
|
||||||
bubbleRect.opacity = 0.3;
|
bubbleRect.opacity = 0.7;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ Rectangle {
|
||||||
}
|
}
|
||||||
drag.target: dragTarget;
|
drag.target: dragTarget;
|
||||||
onContainsMouseChanged: {
|
onContainsMouseChanged: {
|
||||||
var rectOpacity = ignoreRadiusEnabled ? (containsMouse ? 0.9 : 0.7) : (containsMouse ? 0.5 : 0.3);
|
var rectOpacity = (ignoreRadiusEnabled && containsMouse) ? 1.0 : (containsMouse ? 1.0 : 0.7);
|
||||||
if (containsMouse) {
|
if (containsMouse) {
|
||||||
Tablet.playSound(TabletEnums.ButtonHover);
|
Tablet.playSound(TabletEnums.ButtonHover);
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,14 +51,14 @@ Rectangle {
|
||||||
height: 44;
|
height: 44;
|
||||||
|
|
||||||
radius: 5;
|
radius: 5;
|
||||||
opacity: 0.7
|
opacity: 0.7;
|
||||||
|
|
||||||
onLevelChanged: {
|
onLevelChanged: {
|
||||||
var rectOpacity = muted && (level >= userSpeakingLevel) ? 0.9 : 0.3;
|
var rectOpacity = muted && (level >= userSpeakingLevel) ? 1.0 : 0.7;
|
||||||
if (pushToTalk && !pushingToTalk) {
|
if (pushToTalk && !pushingToTalk) {
|
||||||
rectOpacity = (level >= userSpeakingLevel) ? 0.9 : 0.7;
|
rectOpacity = (level >= userSpeakingLevel) ? 1.0 : 0.7;
|
||||||
} else if (mouseArea.containsMouse && rectOpacity != 0.9) {
|
} else if (mouseArea.containsMouse && rectOpacity != 1.0) {
|
||||||
rectOpacity = 0.5;
|
rectOpacity = 1.0;
|
||||||
}
|
}
|
||||||
micBar.opacity = rectOpacity;
|
micBar.opacity = rectOpacity;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue