Skip to content

Commit b63bb29

Browse files
feat(group): add reveal-by-default option
1 parent c8484eb commit b63bb29

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/group.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,17 @@ Group::Group(const std::string& name, const std::string& id, const Json::Value&
6262
const bool left_to_right = (drawer_config["transition-left-to-right"].isBool()
6363
? drawer_config["transition-left-to-right"].asBool()
6464
: true);
65+
const bool reveal_by_default =
66+
(drawer_config["reveal-by-default"].isBool() ? drawer_config["reveal-by-default"].asBool()
67+
: false);
68+
6569
click_to_reveal = drawer_config["click-to-reveal"].asBool();
6670

6771
auto transition_type = getPreferredTransitionType(vertical);
6872

6973
revealer.set_transition_type(transition_type);
7074
revealer.set_transition_duration(transition_duration);
71-
revealer.set_reveal_child(false);
75+
revealer.set_reveal_child(reveal_by_default);
7276

7377
revealer.get_style_context()->add_class("drawer");
7478

0 commit comments

Comments
 (0)