Skip to content

Commit 033ee34

Browse files
fix: animate should not reverse if reversed but reverse_if_open_to_up is on
1 parent 4c2322c commit 033ee34

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/shell/contextmenu/menu_widget.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -768,10 +768,12 @@ void mb_shell::menu_widget::reset_animation(bool reverse) {
768768
// the show duration for the menu should be within 200ms
769769
float delay = std::min(200.f / children.size(), 30.f);
770770

771+
auto should_reverse = config::current->context_menu.reverse_if_open_to_up ? false : reverse;
772+
771773
for (size_t i = 0; i < children.size(); i++) {
772774
auto child = children[i];
773775
child->reset_appear_animation(delay *
774-
(reverse ? children.size() - i : i));
776+
(should_reverse ? children.size() - i : i));
775777
}
776778
}
777779
std::pair<float, float> mb_shell::mouse_menu_widget_main::calculate_position(

0 commit comments

Comments
 (0)