From b95258f419c62f7f38ec6128568df5897e4f5696 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Fri, 4 Apr 2025 22:15:41 +0200 Subject: adw: clean up property definitions --- adw/include/adwaitamm/switchrow.hpp | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) (limited to 'adw/include/adwaitamm/switchrow.hpp') diff --git a/adw/include/adwaitamm/switchrow.hpp b/adw/include/adwaitamm/switchrow.hpp index 37e2e05..622b58a 100644 --- a/adw/include/adwaitamm/switchrow.hpp +++ b/adw/include/adwaitamm/switchrow.hpp @@ -3,11 +3,11 @@ #include "helpers/gobj_mixin.hpp" #include "adwaitamm/actionrow.hpp" -#include "adwaitamm/helpers/properties.hpp" #include #include #include +#include #include #include @@ -57,27 +57,17 @@ namespace Adwaita auto static get_type() -> GType; auto static get_base_type() -> GType; - auto get_active(this auto && self) noexcept; + auto get_active() const noexcept -> bool; + auto set_active(bool value) noexcept -> void; - auto get_active(Gtk::Widget & widget) noexcept -> CppObjectType &; - - auto property_active(this auto && self); + auto property_active() -> Glib::PropertyProxy; + auto property_active() const -> Glib::PropertyProxy_ReadOnly; protected: explicit SwitchRow(Glib::ConstructParams const & params); explicit SwitchRow(BaseObjectType * gobj); }; - auto SwitchRow::get_active(this auto && self) noexcept - { - return self.property_active().value(); - } - - auto SwitchRow::property_active(this auto && self) - { - return helpers::make_property_proxy(self, "active"); - } - } // namespace Adwaita namespace Glib -- cgit v1.2.3