1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-07-01 18:51:04 +02:00

feat(launcher): option to reverse order

* Add reverse order for launcher items/favorites

* Add lanucher reverse order to docs

* Add example configs for json,toml,yaml,corn

---------

Co-authored-by: SerraPi <serrapm2@gmail.com>
This commit is contained in:
SerraPi 2024-04-28 21:33:20 +00:00 committed by GitHub
parent 782b9554a2
commit d03c752f9a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 15 additions and 4 deletions

View file

@ -33,6 +33,9 @@ pub struct LauncherModule {
#[serde(default = "default_icon_size")]
icon_size: i32,
#[serde(default = "crate::config::default_false")]
reversed: bool,
#[serde(flatten)]
pub common: Option<CommonConfig>,
}
@ -338,7 +341,12 @@ impl Module<gtk::Box> for LauncherModule {
&controller_tx,
);
container.add(&button.button);
if self.reversed {
container.pack_end(&button.button, false, false, 0);
} else {
container.add(&button.button);
}
buttons.insert(item.app_id, button);
}
}