Skip to content

Commit f233d27

Browse files
authoredDec 28, 2020
Merge pull request #959 from dorgnarg/fix-section-css-classes
Fix for group module selectors when bar is vertical
2 parents 7fbd365 + 42e8667 commit f233d27

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed
 

‎src/bar.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -370,9 +370,6 @@ waybar::Bar::Bar(struct waybar_output* w_output, const Json::Value& w_config)
370370
window.get_style_context()->add_class(output->name);
371371
window.get_style_context()->add_class(config["name"].asString());
372372
window.get_style_context()->add_class(config["position"].asString());
373-
left_.get_style_context()->add_class("modules-left");
374-
center_.get_style_context()->add_class("modules-center");
375-
right_.get_style_context()->add_class("modules-right");
376373

377374
if (config["layer"] == "top") {
378375
layer_ = bar_layer::TOP;
@@ -389,6 +386,10 @@ waybar::Bar::Bar(struct waybar_output* w_output, const Json::Value& w_config)
389386
box_ = Gtk::Box(Gtk::ORIENTATION_VERTICAL, 0);
390387
vertical = true;
391388
}
389+
390+
left_.get_style_context()->add_class("modules-left");
391+
center_.get_style_context()->add_class("modules-center");
392+
right_.get_style_context()->add_class("modules-right");
392393

393394
uint32_t height = config["height"].isUInt() ? config["height"].asUInt() : 0;
394395
uint32_t width = config["width"].isUInt() ? config["width"].asUInt() : 0;

0 commit comments

Comments
 (0)