mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:17:35 +00:00
LibGUI+WindowServer: Add support for GWidget tooltips.
Any GWidget can have a tooltip and it will automatically pop up below the center of the widget when hovered. GActions added to GToolBars will use the action text() as their tooltip automagically. :^)
This commit is contained in:
parent
3e175c9a96
commit
7f2eeb0b35
15 changed files with 136 additions and 27 deletions
|
@ -119,6 +119,9 @@ void WSWindowFrame::paint(Painter& painter)
|
|||
if (m_window.type() == WSWindowType::Taskbar)
|
||||
return;
|
||||
|
||||
if (m_window.type() == WSWindowType::Tooltip)
|
||||
return;
|
||||
|
||||
auto& window = m_window;
|
||||
|
||||
auto titlebar_rect = title_bar_rect();
|
||||
|
@ -195,6 +198,8 @@ static Rect frame_rect_for_window_type(WSWindowType type, const Rect& rect)
|
|||
return rect;
|
||||
case WSWindowType::Taskbar:
|
||||
return rect;
|
||||
case WSWindowType::Tooltip:
|
||||
return rect;
|
||||
default:
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue