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

fix: vertical bars ignoring height config option

This commit is contained in:
Jake Stanger 2022-10-15 16:35:31 +01:00
parent 06cfad62e2
commit 75339f07ed
No known key found for this signature in database
GPG key ID: C51FC8F9CB0BEA61

View file

@ -30,26 +30,33 @@ pub fn create_bar(
setup_layer_shell(&win, monitor, config.position, config.anchor_to_edges);
let orientation = config.position.get_orientation();
let content = gtk::Box::builder()
.orientation(config.position.get_orientation())
.orientation(orientation)
.spacing(0)
.hexpand(false)
.height_request(config.height)
.name("bar")
.build();
.name("bar");
let content = if orientation == Orientation::Horizontal {
content.height_request(config.height)
} else {
content.width_request(config.height)
}
.build();
let start = gtk::Box::builder()
.orientation(config.position.get_orientation())
.orientation(orientation)
.spacing(0)
.name("start")
.build();
let center = gtk::Box::builder()
.orientation(config.position.get_orientation())
.orientation(orientation)
.spacing(0)
.name("center")
.build();
let end = gtk::Box::builder()
.orientation(config.position.get_orientation())
.orientation(orientation)
.spacing(0)
.name("end")
.build();