diff --git a/data/indicator.css b/data/indicator.css index 70e4aa5a..757a7dd5 100644 --- a/data/indicator.css +++ b/data/indicator.css @@ -55,3 +55,15 @@ device-scale .image-button:disabled, player-row .image-button:disabled { background: @insensitive_bg_color; } + +/* Default menuitem padding is 6px. + Reduce it on the item and increase it on the radio button to ease toggling. + Leave 1 pixel padding to not select when the mouse is "on the border" of items to avoid miss-clicks. */ +menuitem.radio-list { + padding-top: 1px; + padding-bottom: 1px; +} +menuitem.radio-list radiobutton { + padding-top: 5px; + padding-bottom: 5px; +} diff --git a/src/Widgets/DeviceItem.vala b/src/Widgets/DeviceItem.vala index 9851f32d..26fbd8e9 100644 --- a/src/Widgets/DeviceItem.vala +++ b/src/Widgets/DeviceItem.vala @@ -23,6 +23,11 @@ public class Sound.Widgets.DeviceItem : Gtk.ListBoxRow { } construct { + // Add "radio-list" CSS class + Gtk.StyleContext context; + context = get_style_context (); + context.add_class ("radio-list"); + var label = new Gtk.Label (device.display_name) { halign = START, hexpand = true,