mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:37:35 +00:00
Start working on a simple graphical font editor.
Editing fonts by editing text files is really slow and boring. A simple font editor seems like a good way to take LibGUI for a spin.
This commit is contained in:
parent
5e0b7f1a56
commit
6fc3c38324
18 changed files with 390 additions and 19 deletions
|
@ -77,7 +77,7 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
enum class GMouseButton : byte {
|
||||
enum GMouseButton : byte {
|
||||
None = 0,
|
||||
Left = 1,
|
||||
Right = 2,
|
||||
|
|
|
@ -70,7 +70,10 @@ void GWidget::paint_event(GPaintEvent& event)
|
|||
}
|
||||
for (auto* ch : children()) {
|
||||
auto* child = (GWidget*)ch;
|
||||
child->event(event);
|
||||
if (child->relative_rect().intersects(event.rect())) {
|
||||
// FIXME: Pass localized rect?
|
||||
child->event(event);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -56,6 +56,7 @@ public:
|
|||
virtual const char* class_name() const override { return "GWidget"; }
|
||||
|
||||
void set_relative_rect(const Rect&);
|
||||
void move_to(const Point& point) { set_relative_rect({ point, relative_rect().size() }); }
|
||||
|
||||
Color background_color() const { return m_background_color; }
|
||||
Color foreground_color() const { return m_foreground_color; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue