LibGUI: Move tooltip position up 4 pixels to prevent cursor pop-under

This commit is contained in:
gbowser3@gmail.com 2022-07-25 19:16:56 -05:00 committed by Andreas Kling
parent 13406b83b1
commit 16d189e96b
Notes: sideshowbarker 2024-07-17 08:33:37 +09:00

View file

@ -224,7 +224,7 @@ void Application::request_tooltip_show()
int const margin = 30;
Gfx::IntPoint adjusted_pos = ConnectionToWindowServer::the().get_global_cursor_position();
adjusted_pos.translate_by(0, 18);
adjusted_pos.translate_by(0, 14);
if (adjusted_pos.x() + m_tooltip_window->width() >= desktop_rect.width() - margin) {
adjusted_pos = adjusted_pos.translated(-m_tooltip_window->width(), 0);