diff options
author | thankyouverycool <66646555+thankyouverycool@users.noreply.github.com> | 2021-04-02 12:13:43 -0400 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-04-02 22:23:21 +0200 |
commit | 14e074cd2499e017ea690319a649235191e484d0 (patch) | |
tree | 4f0d680502bae2de01549cae89ae897bdbfe3492 /Userland/Services/Taskbar | |
parent | 7d8d45e757ec16a73406746e179ab611a90a32d1 (diff) | |
download | serenity-14e074cd2499e017ea690319a649235191e484d0.zip |
LibGUI+Calendar: Inherit from Frame class
Fixes incorrect painting with variable thickness and cuts down
on some layout boilerplate.
Diffstat (limited to 'Userland/Services/Taskbar')
-rw-r--r-- | Userland/Services/Taskbar/ClockWidget.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/Userland/Services/Taskbar/ClockWidget.cpp b/Userland/Services/Taskbar/ClockWidget.cpp index 3e980f3f48..c25035946c 100644 --- a/Userland/Services/Taskbar/ClockWidget.cpp +++ b/Userland/Services/Taskbar/ClockWidget.cpp @@ -139,15 +139,11 @@ ClockWidget::ClockWidget() auto& separator1 = root_container.add<GUI::HorizontalSeparator>(); separator1.set_fixed_height(2); - auto& calendar_frame_container = root_container.add<GUI::Widget>(); - calendar_frame_container.set_layout<GUI::HorizontalBoxLayout>(); - calendar_frame_container.layout()->set_margins({ 4, 4, 5, 4 }); + auto& calendar_container = root_container.add<GUI::Widget>(); + calendar_container.set_layout<GUI::HorizontalBoxLayout>(); + calendar_container.layout()->set_margins({ 4, 4, 5, 4 }); - auto& calendar_frame = calendar_frame_container.add<GUI::Frame>(); - calendar_frame.set_layout<GUI::VerticalBoxLayout>(); - calendar_frame.layout()->set_margins({ 2, 2, 2, 2 }); - - m_calendar = calendar_frame.add<GUI::Calendar>(); + m_calendar = calendar_container.add<GUI::Calendar>(); m_selected_calendar_button->set_text(m_calendar->formatted_date()); m_calendar->on_tile_click = [&] { |