1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 04:47:34 +00:00

DisplaySettings: Move screen number show/hide logic into widget

This is functionally the same as before, as selecting a tab fires Show
and HideEvents. But this way, we don't need to directly access the
TabWidget, which will make using SettingsWindow simpler.
This commit is contained in:
Sam Atkins 2021-11-20 15:20:42 +00:00 committed by Linus Groh
parent 9fc53017c6
commit a4af8b2a64
3 changed files with 14 additions and 3 deletions

View file

@ -179,4 +179,14 @@ void MonitorSettingsWidget::show_screen_numbers(bool show)
GUI::WindowServerConnection::the().async_show_screen_numbers(show);
}
void MonitorSettingsWidget::show_event(GUI::ShowEvent&)
{
show_screen_numbers(true);
}
void MonitorSettingsWidget::hide_event(GUI::HideEvent&)
{
show_screen_numbers(false);
}
}