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

Taskbar+LibGUI+WindowServer: Shrink taskbar by one pixel

Make the taskbar 27 pixels tall instead of 28. This makes the button
icons and applets vertically centered.

On a related note, this required touching *way* too many places..
This commit is contained in:
Andreas Kling 2021-05-09 00:07:44 +02:00
parent fbe6c275c9
commit 9d8aa2a57a
5 changed files with 9 additions and 9 deletions

View file

@ -23,7 +23,7 @@ ClockWidget::ClockWidget()
m_time_width = font().width("22:22:22");
set_fixed_size(m_time_width + 20, 22);
set_fixed_size(m_time_width + 20, 21);
m_timer = add<Core::Timer>(1000, [this] {
static time_t last_update_time;
@ -179,7 +179,7 @@ void ClockWidget::paint_event(GUI::PaintEvent& event)
auto time_text = Core::DateTime::now().to_string("%T");
GUI::Painter painter(*this);
painter.add_clip_rect(frame_inner_rect());
painter.draw_text(event.rect(), time_text, Gfx::FontDatabase::default_font(), Gfx::TextAlignment::Center, palette().window_text());
painter.draw_text(frame_inner_rect().translated(0, 1), time_text, Gfx::FontDatabase::default_font(), Gfx::TextAlignment::Center, palette().window_text());
}
void ClockWidget::mousedown_event(GUI::MouseEvent& event)