Skip to content

Commit

Permalink
revert: keep id and class on original box
Browse files Browse the repository at this point in the history
  • Loading branch information
haug1 committed May 3, 2024
1 parent 49fcfb1 commit 12146ab
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/group.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ Group::Group(const std::string& name, const std::string& id, const Json::Value&
: AModule(config, name, id, true, true),
box{vertical ? Gtk::ORIENTATION_VERTICAL : Gtk::ORIENTATION_HORIZONTAL, 0},
revealer_box{vertical ? Gtk::ORIENTATION_VERTICAL : Gtk::ORIENTATION_HORIZONTAL, 0} {
event_box_.set_name(name_);
box.set_name(name_);
if (!id.empty()) {
event_box_.get_style_context()->add_class(id);
box.get_style_context()->add_class(id);
}

// default orientation: orthogonal to parent
Expand Down Expand Up @@ -84,13 +84,13 @@ Group::Group(const std::string& name, const std::string& id, const Json::Value&
}

bool Group::handleMouseEnter(GdkEventCrossing* const& e) {
event_box_.set_state_flags(Gtk::StateFlags::STATE_FLAG_PRELIGHT);
box.set_state_flags(Gtk::StateFlags::STATE_FLAG_PRELIGHT);
revealer.set_reveal_child(true);
return false;
}

bool Group::handleMouseLeave(GdkEventCrossing* const& e) {
event_box_.unset_state_flags(Gtk::StateFlags::STATE_FLAG_PRELIGHT);
box.unset_state_flags(Gtk::StateFlags::STATE_FLAG_PRELIGHT);
revealer.set_reveal_child(false);
return false;
}
Expand Down

0 comments on commit 12146ab

Please sign in to comment.