summaryrefslogtreecommitdiff
path: root/adw/include/adwaitamm/switchrow.hpp
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@gmail.com>2025-04-04 22:15:41 +0200
committerFelix Morgner <felix.morgner@gmail.com>2025-04-04 22:15:41 +0200
commitb95258f419c62f7f38ec6128568df5897e4f5696 (patch)
treecb8a0820980b624a1e502a7a7500583242b536e7 /adw/include/adwaitamm/switchrow.hpp
parentc563d8c5b0a4d46676ea21920381c32dbdd66159 (diff)
downloadturns-b95258f419c62f7f38ec6128568df5897e4f5696.tar.xz
turns-b95258f419c62f7f38ec6128568df5897e4f5696.zip
adw: clean up property definitions
Diffstat (limited to 'adw/include/adwaitamm/switchrow.hpp')
-rw-r--r--adw/include/adwaitamm/switchrow.hpp20
1 files changed, 5 insertions, 15 deletions
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 <glibmm/class.h>
#include <glibmm/object.h>
#include <glibmm/objectbase.h>
+#include <glibmm/propertyproxy.h>
#include <glibmm/refptr.h>
#include <glibmm/ustring.h>
@@ -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<bool>;
+ auto property_active() const -> Glib::PropertyProxy_ReadOnly<bool>;
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<bool>(self, "active");
- }
-
} // namespace Adwaita
namespace Glib