diff --git a/libs/ui/include/psemek/ui/element.hpp b/libs/ui/include/psemek/ui/element.hpp index 5b76f2ba..748abdf5 100644 --- a/libs/ui/include/psemek/ui/element.hpp +++ b/libs/ui/include/psemek/ui/element.hpp @@ -70,8 +70,8 @@ namespace psemek::ui virtual std::shared_ptr set_style(std::shared_ptr st); virtual std::shared_ptr set_own_style(std::shared_ptr st); - virtual void style_updated(); - virtual void own_style_updated(); + virtual void style_updated() const; + virtual void own_style_updated() const; virtual std::optional const & hint() const { return hint_; } virtual std::optional set_hint(std::optional hint); diff --git a/libs/ui/include/psemek/ui/label.hpp b/libs/ui/include/psemek/ui/label.hpp index 143773e7..1c866f06 100644 --- a/libs/ui/include/psemek/ui/label.hpp +++ b/libs/ui/include/psemek/ui/label.hpp @@ -72,8 +72,8 @@ namespace psemek::ui geom::interval width_constraints(float height) const override; geom::interval height_constraints(float width) const override; - void style_updated() override; - void own_style_updated() override; + void style_updated() const override; + void own_style_updated() const override; bool transparent() const override { return !hint(); } diff --git a/libs/ui/source/element.cpp b/libs/ui/source/element.cpp index 22e862fa..5f8cee7f 100644 --- a/libs/ui/source/element.cpp +++ b/libs/ui/source/element.cpp @@ -101,7 +101,7 @@ namespace psemek::ui return st; } - void element::style_updated() + void element::style_updated() const { merged_style_ = nullptr; own_style_updated(); @@ -109,7 +109,7 @@ namespace psemek::ui if (c) c->style_updated(); } - void element::own_style_updated() + void element::own_style_updated() const { merged_own_style_ = nullptr; } diff --git a/libs/ui/source/label.cpp b/libs/ui/source/label.cpp index 6a2b41ae..e3c85cd9 100644 --- a/libs/ui/source/label.cpp +++ b/libs/ui/source/label.cpp @@ -84,14 +84,14 @@ namespace psemek::ui return {state.size[1], inf}; } - void label::style_updated() + void label::style_updated() const { element::style_updated(); cached_state_.reset(); cached_state_inf_.reset(); } - void label::own_style_updated() + void label::own_style_updated() const { element::own_style_updated(); cached_state_.reset();