volume: let GTK theme control icon sizes, remove icon-size config

parent 6d5edff4
:root {
--widget-volume-row-icon-size: 24px;
}
.widget-volume {
}
.widget-volume>box>button {}
/* Each row app icon */
.widget-volume row image {
-gtk-icon-size: var(--widget-volume-row-icon-size);
}
.per-app-volume {
background-color: var(--noti-bg-alt);
margin: $margin;
......
......@@ -682,12 +682,6 @@
"default": "⇩",
"description": "Label displayed on button to hide per app volume control"
},
"icon-size": {
"type": "integer",
"deprecated": true,
"default": -1,
"description": "deprecated (change the CSS root variable \"--widget-volume-row-icon-size\"): Size of the application icon in per app volume control"
},
"animation-type": {
"type": "string",
"default": "slide_down",
......
......@@ -13,7 +13,7 @@ namespace XimperShellNotificationCenter.Widgets {
private bool show_per_app_label;
public SinkInputRow (PulseSinkInput sink_input, PulseDaemon client,
int icon_size, bool show_per_app_icon, bool show_per_app_label) {
bool show_per_app_icon, bool show_per_app_label) {
this.client = client;
this.show_per_app_icon = show_per_app_icon;
this.show_per_app_label = show_per_app_label;
......@@ -25,8 +25,6 @@ namespace XimperShellNotificationCenter.Widgets {
scale.draw_value = false;
scale.set_hexpand (true);
icon.set_pixel_size (icon_size);
container = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0);
if (show_per_app_icon) {
......
......@@ -21,8 +21,6 @@ namespace XimperShellNotificationCenter.Widgets {
string ?expand_label = null;
string ?collapse_label = null;
[Version (deprecated = true, replacement = "CSS root variable")]
int icon_size = -1;
Gtk.RevealerTransitionType revealer_type = Gtk.RevealerTransitionType.SLIDE_DOWN;
int revealer_duration = 250;
......@@ -99,11 +97,6 @@ namespace XimperShellNotificationCenter.Widgets {
collapse_label = l2;
}
int i = int.max (get_prop<int> (config, "icon-size"), 0);
if (i != 0) {
icon_size = i;
}
revealer_duration = int.max (0, get_prop<int> (config, "animation-duration"));
if (revealer_duration == 0) {
revealer_duration = 250;
......@@ -154,7 +147,7 @@ namespace XimperShellNotificationCenter.Widgets {
foreach (var item in this.client.active_sinks.values) {
SinkInputRow row = new SinkInputRow (item, client,
icon_size, show_per_app_icon,
show_per_app_icon,
show_per_app_label);
list_box_controller.append (row);
}
......@@ -245,7 +238,7 @@ namespace XimperShellNotificationCenter.Widgets {
list_box_controller.remove ((Gtk.Widget) label);
}
SinkInputRow row = new SinkInputRow (sink, client,
icon_size, show_per_app_icon,
show_per_app_icon,
show_per_app_label);
list_box_controller.append (row);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment