tray is no longer pushed off the bar (#2727)

This commit is contained in:
raffael0 2022-06-14 15:35:49 +02:00 committed by GitHub
parent ca06be1d0e
commit 6a43758b5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1167,7 +1167,9 @@ bool tray_manager::on(const signals::ui::update_background&) {
} }
bool tray_manager::on(const signals::ui_tray::tray_pos_change& evt) { bool tray_manager::on(const signals::ui_tray::tray_pos_change& evt) {
m_opts.orig_x = m_bar_opts.inner_area(true).x + evt.cast(); m_opts.orig_x =
m_bar_opts.inner_area(true).x + std::max(0, std::min(evt.cast(), (int)(m_bar_opts.size.w - calculate_w())));
reconfigure_window(); reconfigure_window();
return true; return true;