mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:47:44 +00:00
LibGUI+Calendar: Make Calendar a common widget in LibGUI
Refactors the Calendar widget into LibGUI and updates the Calendar app interface. Calendar widget lets layout engine manage most of its geometry now and has a few new features like tile click navigation, hover highlighting and a togglable year/month mode.
This commit is contained in:
parent
918f2c592d
commit
ab3fff4211
11 changed files with 631 additions and 485 deletions
|
@ -26,7 +26,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "Calendar.h"
|
||||
#include <LibGUI/Calendar.h>
|
||||
#include <LibGUI/Dialog.h>
|
||||
#include <LibGUI/Model.h>
|
||||
#include <LibGUI/Window.h>
|
||||
|
@ -36,14 +36,14 @@ class AddEventDialog final : public GUI::Dialog {
|
|||
public:
|
||||
virtual ~AddEventDialog() override;
|
||||
|
||||
static void show(RefPtr<Calendar> calendar, Core::DateTime date_time, Window* parent_window = nullptr)
|
||||
static void show(Core::DateTime date_time, Window* parent_window = nullptr)
|
||||
{
|
||||
auto dialog = AddEventDialog::construct(calendar, date_time, parent_window);
|
||||
auto dialog = AddEventDialog::construct(date_time, parent_window);
|
||||
dialog->exec();
|
||||
}
|
||||
|
||||
private:
|
||||
AddEventDialog(RefPtr<Calendar> calendar, Core::DateTime date_time, Window* parent_window = nullptr);
|
||||
AddEventDialog(Core::DateTime date_time, Window* parent_window = nullptr);
|
||||
|
||||
class MonthListModel final : public GUI::Model {
|
||||
public:
|
||||
|
@ -65,6 +65,5 @@ private:
|
|||
MonthListModel();
|
||||
};
|
||||
|
||||
RefPtr<Calendar> m_calendar;
|
||||
Core::DateTime m_date_time;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue