mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 10:57:35 +00:00
LibGUI+WindowServer+DisplaySettings: Add Tooltips to SystemEffects
Tooltips can now be toggled on and off system-wide.
This commit is contained in:
parent
d286bf85e6
commit
a74f512f6b
5 changed files with 20 additions and 0 deletions
|
@ -147,6 +147,8 @@ Action* Application::action_for_shortcut(Shortcut const& shortcut) const
|
|||
|
||||
void Application::show_tooltip(String tooltip, Widget const* tooltip_source_widget)
|
||||
{
|
||||
if (!Desktop::the().system_effects().tooltips())
|
||||
return;
|
||||
m_tooltip_source_widget = tooltip_source_widget;
|
||||
if (!m_tooltip_window) {
|
||||
m_tooltip_window = TooltipWindow::construct();
|
||||
|
@ -166,6 +168,8 @@ void Application::show_tooltip(String tooltip, Widget const* tooltip_source_widg
|
|||
|
||||
void Application::show_tooltip_immediately(String tooltip, Widget const* tooltip_source_widget)
|
||||
{
|
||||
if (!Desktop::the().system_effects().tooltips())
|
||||
return;
|
||||
m_tooltip_source_widget = tooltip_source_widget;
|
||||
if (!m_tooltip_window) {
|
||||
m_tooltip_window = TooltipWindow::construct();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue