mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-07-01 10:41:03 +02:00
fix: vertical bars ignoring height config option
This commit is contained in:
parent
06cfad62e2
commit
75339f07ed
1 changed files with 14 additions and 7 deletions
21
src/bar.rs
21
src/bar.rs
|
@ -30,26 +30,33 @@ pub fn create_bar(
|
||||||
|
|
||||||
setup_layer_shell(&win, monitor, config.position, config.anchor_to_edges);
|
setup_layer_shell(&win, monitor, config.position, config.anchor_to_edges);
|
||||||
|
|
||||||
|
let orientation = config.position.get_orientation();
|
||||||
|
|
||||||
let content = gtk::Box::builder()
|
let content = gtk::Box::builder()
|
||||||
.orientation(config.position.get_orientation())
|
.orientation(orientation)
|
||||||
.spacing(0)
|
.spacing(0)
|
||||||
.hexpand(false)
|
.hexpand(false)
|
||||||
.height_request(config.height)
|
.name("bar");
|
||||||
.name("bar")
|
|
||||||
.build();
|
let content = if orientation == Orientation::Horizontal {
|
||||||
|
content.height_request(config.height)
|
||||||
|
} else {
|
||||||
|
content.width_request(config.height)
|
||||||
|
}
|
||||||
|
.build();
|
||||||
|
|
||||||
let start = gtk::Box::builder()
|
let start = gtk::Box::builder()
|
||||||
.orientation(config.position.get_orientation())
|
.orientation(orientation)
|
||||||
.spacing(0)
|
.spacing(0)
|
||||||
.name("start")
|
.name("start")
|
||||||
.build();
|
.build();
|
||||||
let center = gtk::Box::builder()
|
let center = gtk::Box::builder()
|
||||||
.orientation(config.position.get_orientation())
|
.orientation(orientation)
|
||||||
.spacing(0)
|
.spacing(0)
|
||||||
.name("center")
|
.name("center")
|
||||||
.build();
|
.build();
|
||||||
let end = gtk::Box::builder()
|
let end = gtk::Box::builder()
|
||||||
.orientation(config.position.get_orientation())
|
.orientation(orientation)
|
||||||
.spacing(0)
|
.spacing(0)
|
||||||
.name("end")
|
.name("end")
|
||||||
.build();
|
.build();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue