Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
f320be39 by wurstsalat at 2025-07-20T12:34:45+02:00
change: Preview audio visualizer: Use Adw accent color
Closes #12373
- - - - -
1 changed file:
- gajim/gtk/preview_audio_visualizer.py
Changes:
=====================================
gajim/gtk/preview_audio_visualizer.py
=====================================
@@ -8,6 +8,7 @@
import math
from statistics import mean
+from gi.repository import Adw
from gi.repository import Graphene
from gi.repository import Gsk
from gi.repository import Gtk
@@ -15,8 +16,6 @@
from gajim.common import app
from gajim.common.preview import AudioSampleT
-from gajim.gtk.util.styling import make_rgba
-
log = logging.getLogger("gajim.gtk.preview_audio_visualizer")
@@ -45,17 +44,24 @@ def __init__(
self._waveform_path = None
- # TODO: Hard code colors for now
- self._color_default = make_rgba("rgb(170,180,200)")
- self._color_progress = make_rgba("rgb(30,144,255)")
- self._color_seek = make_rgba("rgb(77,166,255)")
+ style_manager = Adw.StyleManager.get_default()
+ accent_color = style_manager.get_accent_color_rgba()
+
+ self._color_progress = accent_color
+
+ color_seek = accent_color.copy()
+ color_seek.alpha = color_seek.alpha - 0.2
+ self._color_seek = color_seek
+
+ color_default = accent_color.copy()
+ color_default.alpha = color_default.alpha - 0.4
+ self._color_default = color_default
def do_unroot(self) -> None:
Gtk.Widget.do_unroot(self)
app.check_finalize(self)
def set_parameters(self, position: float, animation_period: int = 1) ->
None:
-
self._position = position
self._animation_period = animation_period
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/f320be39dadd3ad1e1924ecb59a23be5a13ade24
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/f320be39dadd3ad1e1924ecb59a23be5a13ade24
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]