1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-04-19 19:34:24 +02:00

feat(music): add css selector for button contents

This commit is contained in:
Jake Stanger 2023-05-02 23:08:13 +01:00
parent bc87c7f0d4
commit 2a155b9aa8
No known key found for this signature in database
GPG key ID: C51FC8F9CB0BEA61
2 changed files with 7 additions and 1 deletions

View file

@ -136,6 +136,7 @@ and will be replaced with values from the currently playing track:
| Selector | Description |
|-------------------------------------|------------------------------------------|
| `#music` | Tray widget button |
| `#music #contents` | Tray widget button contents box |
| `#popup-music` | Popup box |
| `#popup-music #album-art` | Album art image inside popup box |
| `#popup-music #title` | Track title container inside popup box |

View file

@ -154,7 +154,12 @@ impl Module<Button> for MusicModule {
info: &ModuleInfo,
) -> Result<ModuleWidget<Button>> {
let button = Button::new();
let button_contents = gtk::Box::new(Orientation::Horizontal, 5);
let button_contents = gtk::Box::builder()
.orientation(Orientation::Horizontal)
.spacing(5)
.name("contents")
.build();
button.add(&button_contents);
let icon_play = new_icon_label(&self.icons.play, info.icon_theme, self.icon_size);