IconGroup: Correctly set highlight opacity on start (#1642)

This commit is contained in:
Leo 2023-04-11 18:09:54 +09:00 committed by GitHub
parent e0ef54ce66
commit 7c379480d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -48,14 +48,21 @@ namespace Gala {
return _active;
}
set {
if (_active == value)
if (_active == value) {
return;
if (get_transition ("backdrop-opacity") != null)
remove_transition ("backdrop-opacity");
}
_active = value;
if (get_stage () == null) {
backdrop_opacity = 40;
return;
}
if (get_transition ("backdrop-opacity") != null) {
remove_transition ("backdrop-opacity");
}
var transition = new Clutter.PropertyTransition ("backdrop-opacity") {
duration = 300,
remove_on_complete = true