Skip to content

Commit

Permalink
Fixes: Add stretching of modules and modules-center toggling
Browse files Browse the repository at this point in the history
Thanks to tmccombs this commit fixes some inconsitencies in #3730.
These inconsitencies were:
- Fixed the oversight of missing the implementation of expand_center for
  center_ and right_
- Removes a last minut printf debugging statment I missed.
  • Loading branch information
TripleTrable committed Jan 13, 2025
1 parent a4241d7 commit f2ed236
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/bar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,6 @@ auto waybar::Bar::setupWidgets() -> void {
if (config["fixed-center"].isBool() ? config["fixed-center"].asBool() : true) {
box_.set_center_widget(center_);
} else {
spdlog::error("No fixed center_");
box_.pack_start(center_, true, expand_center);
}
}
Expand All @@ -569,13 +568,13 @@ auto waybar::Bar::setupWidgets() -> void {

if (!no_center) {
for (auto const& module : modules_center_) {
center_.pack_start(*module, false, false);
center_.pack_start(*module, module->expandEnabled(), module->expandEnabled());
}
}

std::reverse(modules_right_.begin(), modules_right_.end());
for (auto const& module : modules_right_) {
right_.pack_end(*module, false, false);
right_.pack_end(*module, module->expandEnabled(), module->expandEnabled());
}
}

Expand Down

0 comments on commit f2ed236

Please sign in to comment.