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:
parent
782b9554a2
commit
d03c752f9a
2 changed files with 15 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue