From d1b9bae155425c2d500b136111cc4f2f28fc0c16 Mon Sep 17 00:00:00 2001
From: Mavridis Philippe <mavridisf@gmail.com>
Date: Sun, 12 Dec 2021 16:24:28 +0200
Subject: KMix: system tray icon enhancements

* XDG-compliant icon names with volume level specification (low, medium, high)
  Low-Medium threshold:  33%
  Medium-High threshold: 67%
* Improved built-in icon theme with distinct volume levels (according to above)
* Choice between classic KMix icon theme, imrpoved KMix icon theme and system theme.
* New KMixDockWidget::getAvgVolume() method
  Gets average volume in %. Code actually comes from KMixDockWidget::setVolumeTip(),
  but was put into a separate method to be reused for determination of icon according
  to the volume level

(cherry picked from commit 3168c39ef1e445db1a6e22a7ba63e8cb4714e6e8)
---
 kmix/pics/CMakeLists.txt                     |   6 ++++--
 kmix/pics/crystal/CMakeLists.txt             |  13 +++++++++++++
 kmix/pics/crystal/audio-volume-error.png     | Bin 0 -> 1176 bytes
 kmix/pics/crystal/audio-volume-high.png      | Bin 0 -> 1581 bytes
 kmix/pics/crystal/audio-volume-low.png       | Bin 0 -> 1379 bytes
 kmix/pics/crystal/audio-volume-medium.png    | Bin 0 -> 1423 bytes
 kmix/pics/crystal/audio-volume-muted.png     | Bin 0 -> 809 bytes
 kmix/pics/kmixdocked.png                     | Bin 1215 -> 0 bytes
 kmix/pics/kmixdocked_error.png               | Bin 1176 -> 0 bytes
 kmix/pics/kmixdocked_mute.png                | Bin 607 -> 0 bytes
 kmix/pics/oldcrystal/CMakeLists.txt          |  13 +++++++++++++
 kmix/pics/oldcrystal/audio-volume-error.png  | Bin 0 -> 1176 bytes
 kmix/pics/oldcrystal/audio-volume-high.png   |   1 +
 kmix/pics/oldcrystal/audio-volume-low.png    | Bin 0 -> 1215 bytes
 kmix/pics/oldcrystal/audio-volume-medium.png |   1 +
 kmix/pics/oldcrystal/audio-volume-muted.png  | Bin 0 -> 607 bytes
 16 files changed, 32 insertions(+), 2 deletions(-)
 create mode 100644 kmix/pics/crystal/CMakeLists.txt
 create mode 100644 kmix/pics/crystal/audio-volume-error.png
 create mode 100644 kmix/pics/crystal/audio-volume-high.png
 create mode 100644 kmix/pics/crystal/audio-volume-low.png
 create mode 100644 kmix/pics/crystal/audio-volume-medium.png
 create mode 100644 kmix/pics/crystal/audio-volume-muted.png
 delete mode 100644 kmix/pics/kmixdocked.png
 delete mode 100644 kmix/pics/kmixdocked_error.png
 delete mode 100644 kmix/pics/kmixdocked_mute.png
 create mode 100644 kmix/pics/oldcrystal/CMakeLists.txt
 create mode 100644 kmix/pics/oldcrystal/audio-volume-error.png
 create mode 120000 kmix/pics/oldcrystal/audio-volume-high.png
 create mode 100644 kmix/pics/oldcrystal/audio-volume-low.png
 create mode 120000 kmix/pics/oldcrystal/audio-volume-medium.png
 create mode 100644 kmix/pics/oldcrystal/audio-volume-muted.png

(limited to 'kmix/pics')

diff --git a/kmix/pics/CMakeLists.txt b/kmix/pics/CMakeLists.txt
index 35ea82c5..92af67f8 100644
--- a/kmix/pics/CMakeLists.txt
+++ b/kmix/pics/CMakeLists.txt
@@ -16,8 +16,10 @@ install( FILES
     mix_microphone.png mix_midi.png mix_recmon.png
     mix_treble.png mix_unknown.png mix_volume.png
     mix_surround.png mix_video.png mix_headphone.png
-    mix_digital.png mix_ac97.png kmixdocked.png
-    kmixdocked_mute.png kmixdocked_error.png mix_record.png
+    mix_digital.png mix_ac97.png mix_record.png
     SpeakerFrontLeft.png SpeakerRearLeft.png SpeakerFrontRight.png
     SpeakerRearRight.png Listener.png
   DESTINATION ${DATA_INSTALL_DIR}/kmix/pics )
+
+add_subdirectory(oldcrystal)
+add_subdirectory(crystal)
\ No newline at end of file
diff --git a/kmix/pics/crystal/CMakeLists.txt b/kmix/pics/crystal/CMakeLists.txt
new file mode 100644
index 00000000..71f61d26
--- /dev/null
+++ b/kmix/pics/crystal/CMakeLists.txt
@@ -0,0 +1,13 @@
+################################################################################
+#  Copyright © 2024 Mavridis Philippe <mavridisf@gmail.com>                    #
+#                                                                              #
+#  This file is released under the GNU GPL version 3 or later.                 #
+#  Improvements and feedback are welcome!                                      #
+################################################################################
+
+set(theme "crystal")
+
+install(FILES audio-volume-error.png audio-volume-muted.png
+              audio-volume-low.png audio-volume-medium.png
+              audio-volume-high.png
+        DESTINATION ${DATA_INSTALL_DIR}/kmix/pics/${theme})
\ No newline at end of file
diff --git a/kmix/pics/crystal/audio-volume-error.png b/kmix/pics/crystal/audio-volume-error.png
new file mode 100644
index 00000000..b0497662
Binary files /dev/null and b/kmix/pics/crystal/audio-volume-error.png differ
diff --git a/kmix/pics/crystal/audio-volume-high.png b/kmix/pics/crystal/audio-volume-high.png
new file mode 100644
index 00000000..bfa7234b
Binary files /dev/null and b/kmix/pics/crystal/audio-volume-high.png differ
diff --git a/kmix/pics/crystal/audio-volume-low.png b/kmix/pics/crystal/audio-volume-low.png
new file mode 100644
index 00000000..e42f7c8b
Binary files /dev/null and b/kmix/pics/crystal/audio-volume-low.png differ
diff --git a/kmix/pics/crystal/audio-volume-medium.png b/kmix/pics/crystal/audio-volume-medium.png
new file mode 100644
index 00000000..4be127eb
Binary files /dev/null and b/kmix/pics/crystal/audio-volume-medium.png differ
diff --git a/kmix/pics/crystal/audio-volume-muted.png b/kmix/pics/crystal/audio-volume-muted.png
new file mode 100644
index 00000000..8ceb8690
Binary files /dev/null and b/kmix/pics/crystal/audio-volume-muted.png differ
diff --git a/kmix/pics/kmixdocked.png b/kmix/pics/kmixdocked.png
deleted file mode 100644
index 0c3f17d7..00000000
Binary files a/kmix/pics/kmixdocked.png and /dev/null differ
diff --git a/kmix/pics/kmixdocked_error.png b/kmix/pics/kmixdocked_error.png
deleted file mode 100644
index b0497662..00000000
Binary files a/kmix/pics/kmixdocked_error.png and /dev/null differ
diff --git a/kmix/pics/kmixdocked_mute.png b/kmix/pics/kmixdocked_mute.png
deleted file mode 100644
index 0dae0f15..00000000
Binary files a/kmix/pics/kmixdocked_mute.png and /dev/null differ
diff --git a/kmix/pics/oldcrystal/CMakeLists.txt b/kmix/pics/oldcrystal/CMakeLists.txt
new file mode 100644
index 00000000..47b37e11
--- /dev/null
+++ b/kmix/pics/oldcrystal/CMakeLists.txt
@@ -0,0 +1,13 @@
+################################################################################
+#  Copyright © 2024 Mavridis Philippe <mavridisf@gmail.com>                    #
+#                                                                              #
+#  This file is released under the GNU GPL version 3 or later.                 #
+#  Improvements and feedback are welcome!                                      #
+################################################################################
+
+set(theme "oldcrystal")
+
+install(FILES audio-volume-error.png audio-volume-muted.png
+              audio-volume-low.png audio-volume-medium.png
+              audio-volume-high.png
+        DESTINATION ${DATA_INSTALL_DIR}/kmix/pics/${theme})
\ No newline at end of file
diff --git a/kmix/pics/oldcrystal/audio-volume-error.png b/kmix/pics/oldcrystal/audio-volume-error.png
new file mode 100644
index 00000000..b0497662
Binary files /dev/null and b/kmix/pics/oldcrystal/audio-volume-error.png differ
diff --git a/kmix/pics/oldcrystal/audio-volume-high.png b/kmix/pics/oldcrystal/audio-volume-high.png
new file mode 120000
index 00000000..dd3d1eea
--- /dev/null
+++ b/kmix/pics/oldcrystal/audio-volume-high.png
@@ -0,0 +1 @@
+audio-volume-low.png
\ No newline at end of file
diff --git a/kmix/pics/oldcrystal/audio-volume-low.png b/kmix/pics/oldcrystal/audio-volume-low.png
new file mode 100644
index 00000000..9e8997e5
Binary files /dev/null and b/kmix/pics/oldcrystal/audio-volume-low.png differ
diff --git a/kmix/pics/oldcrystal/audio-volume-medium.png b/kmix/pics/oldcrystal/audio-volume-medium.png
new file mode 120000
index 00000000..dd3d1eea
--- /dev/null
+++ b/kmix/pics/oldcrystal/audio-volume-medium.png
@@ -0,0 +1 @@
+audio-volume-low.png
\ No newline at end of file
diff --git a/kmix/pics/oldcrystal/audio-volume-muted.png b/kmix/pics/oldcrystal/audio-volume-muted.png
new file mode 100644
index 00000000..70764025
Binary files /dev/null and b/kmix/pics/oldcrystal/audio-volume-muted.png differ
-- 
cgit v1.2.1