Add stretching of modules and modules-center toggling

This Patch allows the stretching of modules-{left,center,right} as well
add a "expand" flag to AModule. This allows one module to consume the
leftover space.
To allow the left or right modules to fully consume the center, the
changes also include a way to remove the center box (center_)
altogether.
This commit is contained in:
Lars Niesen
2024-10-30 17:04:13 +01:00
parent 8645115619
commit f9acc1fed9
49 changed files with 277 additions and 10 deletions

View File

@ -15,6 +15,7 @@ AModule::AModule(const Json::Value& config, const std::string& name, const std::
: name_(name),
config_(config),
isTooltip{config_["tooltip"].isBool() ? config_["tooltip"].asBool() : true},
isExpand{config_["expand"].isBool() ? config_["expand"].asBool() : false},
distance_scrolled_y_(0.0),
distance_scrolled_x_(0.0) {
// Configure module action Map
@ -273,6 +274,7 @@ bool AModule::handleScroll(GdkEventScroll* e) {
}
bool AModule::tooltipEnabled() const { return isTooltip; }
bool AModule::expandEnabled() const { return isExpand; }
AModule::operator Gtk::Widget&() { return event_box_; }