aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Tari <robert@tari.in>2024-04-05 01:56:51 +0200
committerRobert Tari <robert@tari.in>2024-04-05 01:56:51 +0200
commit071b4b9c5f2b6039cb17aaa4f9876ba91d5ac923 (patch)
treec7d967d6757dbd0bbf670a1fb3113dc7ecb6a158
parent7299d7f1885314110c1805328ad60a58dc5be4ec (diff)
downloadayatana-indicator-sound-071b4b9c5f2b6039cb17aaa4f9876ba91d5ac923.tar.gz
ayatana-indicator-sound-071b4b9c5f2b6039cb17aaa4f9876ba91d5ac923.tar.bz2
ayatana-indicator-sound-071b4b9c5f2b6039cb17aaa4f9876ba91d5ac923.zip
src/sound-menu.vala: Fix slider precision
-rw-r--r--src/sound-menu.vala10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/sound-menu.vala b/src/sound-menu.vala
index 5cfc0a6..574e849 100644
--- a/src/sound-menu.vala
+++ b/src/sound-menu.vala
@@ -1,6 +1,6 @@
/*
* Copyright 2013 Canonical Ltd.
- * Copyright 2021-2022 Robert Tari
+ * Copyright 2021-2024 Robert Tari
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -478,6 +478,14 @@ public class SoundMenu: Object
slider.set_attribute ("min-value", "d", min);
slider.set_attribute ("max-value", "d", max);
slider.set_attribute ("step", "d", step);
+
+ bool bLomiri = AyatanaCommon.utils_is_lomiri ();
+
+ if (!bLomiri)
+ {
+ slider.set_attribute ("digits", "y", 2);
+ }
+
if (sync_action) {
slider.set_attribute ("x-ayatana-sync-action", "s", "indicator.volume-sync");
}