diff options
Diffstat (limited to 'Userland/Libraries/LibGUI/Widget.h')
-rw-r--r-- | Userland/Libraries/LibGUI/Widget.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGUI/Widget.h b/Userland/Libraries/LibGUI/Widget.h index 830007fa8e..f856f137b6 100644 --- a/Userland/Libraries/LibGUI/Widget.h +++ b/Userland/Libraries/LibGUI/Widget.h @@ -52,6 +52,13 @@ enum class VerticalDirection { Down }; +constexpr VerticalDirection operator!(VerticalDirection const& other) +{ + if (other == VerticalDirection::Up) + return VerticalDirection::Down; + return VerticalDirection::Up; +} + constexpr VerticalDirection key_code_to_vertical_direction(KeyCode const& key) { if (key == Key_Up) |