mirror of
https://gitlab.gnome.org/World/Authenticator.git
synced 2025-03-04 00:34:40 +01:00
progress_icon: Use adw::StyleManager to retrieve accent color
This commit is contained in:
parent
d5645fb101
commit
59f8da0957
2 changed files with 2 additions and 5 deletions
|
@ -14,7 +14,7 @@ opt-level = 1
|
|||
opt-level = 3
|
||||
|
||||
[dependencies]
|
||||
adw = {package = "libadwaita", version = "0.7", features = ["v1_5"]}
|
||||
adw = {package = "libadwaita", version = "0.7", features = ["v1_6"]}
|
||||
aes-gcm = "0.10"
|
||||
anyhow = "1.0"
|
||||
aperture = "0.7"
|
||||
|
|
|
@ -35,10 +35,7 @@ pub(crate) mod imp {
|
|||
let size = widget.size() as f32;
|
||||
let radius = size / 2.0;
|
||||
let progress = 1.0 - widget.progress();
|
||||
let color = widget
|
||||
.style_context()
|
||||
.lookup_color("accent_color")
|
||||
.unwrap_or_else(|| gdk::RGBA::new(0.47058824, 0.68235296, 0.92941177, 1.0));
|
||||
let color = adw::StyleManager::default().accent_color_rgba();
|
||||
|
||||
let rect = graphene::Rect::new(0.0, 0.0, size, size);
|
||||
let circle = gsk::RoundedRect::from_rect(rect, radius);
|
||||
|
|
Loading…
Add table
Reference in a new issue