mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-09 09:39:39 +00:00
LibGUI: Move tooltip position up 4 pixels to prevent cursor pop-under
This commit is contained in:
parent
13406b83b1
commit
16d189e96b
Notes:
sideshowbarker
2024-07-17 08:33:37 +09:00
Author: https://github.com/gmbows 🔰
Commit: 16d189e96b
Pull-request: https://github.com/SerenityOS/serenity/pull/14695
Reviewed-by: https://github.com/MacDue
1 changed files with 1 additions and 1 deletions
|
@ -224,7 +224,7 @@ void Application::request_tooltip_show()
|
||||||
int const margin = 30;
|
int const margin = 30;
|
||||||
Gfx::IntPoint adjusted_pos = ConnectionToWindowServer::the().get_global_cursor_position();
|
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) {
|
if (adjusted_pos.x() + m_tooltip_window->width() >= desktop_rect.width() - margin) {
|
||||||
adjusted_pos = adjusted_pos.translated(-m_tooltip_window->width(), 0);
|
adjusted_pos = adjusted_pos.translated(-m_tooltip_window->width(), 0);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue