diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2025-04-04 20:20:32 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2025-04-04 20:23:04 +0200 |
| commit | 17d4b2f4cd0b1f2f7a3fe0948995206a9c64bd00 (patch) | |
| tree | 07057af77267a5bf1a0a24a79e09ac4ed43098aa /src | |
| parent | 29028ac7f3bfd3c719a08e5994d52e766c6c578f (diff) | |
| download | libadwaitamm-17d4b2f4cd0b1f2f7a3fe0948995206a9c64bd00.tar.xz libadwaitamm-17d4b2f4cd0b1f2f7a3fe0948995206a9c64bd00.zip | |
adw: move LengthType and RatioType
Diffstat (limited to 'src')
| -rw-r--r-- | src/breakpoint.cpp | 10 | ||||
| -rw-r--r-- | src/enums.cpp | 10 |
2 files changed, 12 insertions, 8 deletions
diff --git a/src/breakpoint.cpp b/src/breakpoint.cpp index a34fcf7..3907a15 100644 --- a/src/breakpoint.cpp +++ b/src/breakpoint.cpp @@ -1,5 +1,6 @@ #include "adwaitamm/breakpoint.hpp" +#include "adwaitamm/enums.hpp" #include "adwaitamm/helpers/properties.hpp" #include <glibmm/class.h> @@ -10,6 +11,7 @@ #include <glibmm/refptr.h> #include <glibmm/ustring.h> #include <glibmm/wrap.h> + #include <gtkmm/buildable.h> #include <glib-object.h> @@ -20,14 +22,6 @@ namespace Adwaita { - static_assert(static_cast<int>(BreakpointCondition::LengthType::min_width) == ADW_BREAKPOINT_CONDITION_MIN_WIDTH); - static_assert(static_cast<int>(BreakpointCondition::LengthType::max_width) == ADW_BREAKPOINT_CONDITION_MAX_WIDTH); - static_assert(static_cast<int>(BreakpointCondition::LengthType::min_height) == ADW_BREAKPOINT_CONDITION_MIN_HEIGHT); - static_assert(static_cast<int>(BreakpointCondition::LengthType::max_height) == ADW_BREAKPOINT_CONDITION_MAX_HEIGHT); - - static_assert(static_cast<int>(BreakpointCondition::RatioType::min_aspect_ratio) == ADW_BREAKPOINT_CONDITION_MIN_ASPECT_RATIO); - static_assert(static_cast<int>(BreakpointCondition::RatioType::max_aspect_ratio) == ADW_BREAKPOINT_CONDITION_MAX_ASPECT_RATIO); - BreakpointCondition::BreakpointCondition(BreakpointCondition const & other) : BreakpointCondition{adw_breakpoint_condition_copy(other.m_object)} { diff --git a/src/enums.cpp b/src/enums.cpp index 9da6bc1..9891845 100644 --- a/src/enums.cpp +++ b/src/enums.cpp @@ -33,6 +33,14 @@ namespace Adwaita static_assert(matches<ColorScheme::PreferDark, ADW_COLOR_SCHEME_PREFER_DARK>); static_assert(matches<ColorScheme::ForceDark, ADW_COLOR_SCHEME_FORCE_DARK>); + static_assert(matches<LengthType::MinWidth, ADW_BREAKPOINT_CONDITION_MIN_WIDTH>); + static_assert(matches<LengthType::MaxWidth, ADW_BREAKPOINT_CONDITION_MAX_WIDTH>); + static_assert(matches<LengthType::MinHeight, ADW_BREAKPOINT_CONDITION_MIN_HEIGHT>); + static_assert(matches<LengthType::MaxHeight, ADW_BREAKPOINT_CONDITION_MAX_HEIGHT>); + + static_assert(matches<RatioType::MinAspectRatio, ADW_BREAKPOINT_CONDITION_MIN_ASPECT_RATIO>); + static_assert(matches<RatioType::MaxAspectRatio, ADW_BREAKPOINT_CONDITION_MAX_ASPECT_RATIO>); + static_assert(matches<ResponseAppearance::Default, ADW_RESPONSE_DEFAULT>); static_assert(matches<ResponseAppearance::Suggested, ADW_RESPONSE_SUGGESTED>); static_assert(matches<ResponseAppearance::Destructive, ADW_RESPONSE_DESTRUCTIVE>); @@ -49,6 +57,8 @@ namespace Glib VALUE_SPECIALIZATION(AccentColor, accent_color) VALUE_SPECIALIZATION(ColorScheme, color_scheme) + VALUE_SPECIALIZATION(LengthType, breakpoint_condition) + VALUE_SPECIALIZATION(RatioType, breakpoint_condition) VALUE_SPECIALIZATION(ResponseAppearance, response_appearance) #undef VALUE_SPECIALIZATION |
