summaryrefslogtreecommitdiffstats
path: root/scene/gui/option_button.cpp
diff options
context:
space:
mode:
authorMichael Alexsander <michaelalexsander@protonmail.com>2022-02-06 23:07:08 -0300
committerMichael Alexsander <michaelalexsander@protonmail.com>2022-02-06 23:07:08 -0300
commit8bde86da10eacff9221a19a2806eb2ece789de03 (patch)
tree9243c476e79ebc7ec4366f05e5e83710ceb621f8 /scene/gui/option_button.cpp
parent8aa4ed8b5b22881661f1355cf90871c4e25c68e2 (diff)
downloadredot-engine-8bde86da10eacff9221a19a2806eb2ece789de03.tar.gz
Make popups from `MenuButton`, `OptionButton`, and submenus obey the layout direction
Diffstat (limited to 'scene/gui/option_button.cpp')
-rw-r--r--scene/gui/option_button.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/scene/gui/option_button.cpp b/scene/gui/option_button.cpp
index 9984ab240a..31f3b306b7 100644
--- a/scene/gui/option_button.cpp
+++ b/scene/gui/option_button.cpp
@@ -92,7 +92,10 @@ void OptionButton::_notification(int p_what) {
arrow->draw(ci, ofs, clr);
} break;
case NOTIFICATION_TRANSLATION_CHANGED:
- case NOTIFICATION_LAYOUT_DIRECTION_CHANGED:
+ case NOTIFICATION_LAYOUT_DIRECTION_CHANGED: {
+ popup->set_layout_direction((Window::LayoutDirection)get_layout_direction());
+ [[fallthrough]];
+ }
case NOTIFICATION_THEME_CHANGED: {
if (has_theme_icon(SNAME("arrow"))) {
if (is_layout_rtl()) {