23 constexpr static auto prefix = super::prefix;
28 button_widget_attribute
auto&&...attributes) noexcept :
31 this->
alignment = alignment::middle_center();
32 this->set_attributes<0>(
hi_forward(attributes)...);
43 _label_constraints = super::update_constraints();
45 auto constraints = _label_constraints;
46 constraints.minimum.
width() += _label_constraints.margins.left() + _label_constraints.margins.right();
47 constraints.preferred.width() += _label_constraints.margins.left() + _label_constraints.margins.right();
48 constraints.maximum.width() += _label_constraints.margins.left() + _label_constraints.margins.right();
49 constraints.minimum.height() += _label_constraints.margins.bottom() + _label_constraints.margins.top();
50 constraints.preferred.height() += _label_constraints.margins.bottom() + _label_constraints.margins.top();
51 constraints.maximum.height() += _label_constraints.margins.bottom() + _label_constraints.margins.top();
52 constraints.margins = theme<prefix>.margin(
this);
56 void set_layout(
widget_layout const& context)
noexcept override
59 hilet label_rectangle =
aarectanglei{context.size()} - _label_constraints.margins;
61 this->_on_label_shape = this->_off_label_shape = this->_other_label_shape =
62 box_shape{_label_constraints, label_rectangle, theme<prefix>.cap_height(
this)};
64 super::set_layout(context);
70 draw_label_button(context);
71 this->draw_button(context);
83 this->layout.rectangle(),
84 theme<prefix>.background_color(
this),
85 theme<prefix>.border_color(
this),
86 theme<prefix>.border_width(
this),
88 theme<prefix>.border_radius(
this));
bool compare_store(T &lhs, U &&rhs) noexcept
Compare then store if there was a change.
Definition utility.hpp:212