Skip to content

Commit

Permalink
feat(music): add css selector for button contents
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeStanger committed May 2, 2023
1 parent bc87c7f commit 2a155b9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/modules/Music.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
7 changes: 6 additions & 1 deletion src/modules/music/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 2a155b9

Please sign in to comment.