24 constexpr static auto prefix = super::prefix;
29 button_widget_attribute
auto&&...attributes) noexcept :
32 this->
alignment = alignment::middle_left();
33 this->set_attributes<0>(
hi_forward(attributes)...);
44 _label_constraints = super::update_constraints();
47 hilet spacing = theme<prefix>.spacing_horizontal(
this);
50 auto constraints = _label_constraints + extra_size;
51 constraints.margins = 0;
55 void set_layout(
widget_layout const& context)
noexcept override
58 hilet spacing = theme<prefix>.spacing_horizontal(
this);
59 hilet label_rectangle =
aarectanglei{spacing, 0, context.width() - spacing * 2, context.height()};
60 this->_on_label_shape = this->_off_label_shape = this->_other_label_shape =
61 box_shape{_label_constraints, label_rectangle, theme<prefix>.cap_height(
this)};
63 super::set_layout(context);
69 draw_toolbar_button(context);
70 this->draw_button(context);
74 [[nodiscard]]
bool accepts_keyboard_focus(keyboard_focus_group group)
const noexcept override
86 this->layout.rectangle(),
87 theme<prefix>.background_color(
this),
88 theme<prefix>.border_color(
this),
89 theme<prefix>.border_width(
this),
bool compare_store(T &lhs, U &&rhs) noexcept
Compare then store if there was a change.
Definition utility.hpp:212