mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:07:36 +00:00
LibGfx: Unpublish Gfx::Size from the global namespace
This commit is contained in:
parent
9b87843af1
commit
f8b00aa290
29 changed files with 41 additions and 43 deletions
|
@ -119,7 +119,7 @@ public:
|
|||
bool m_chord { false };
|
||||
};
|
||||
|
||||
Field::Field(GUI::Label& flag_label, GUI::Label& time_label, GUI::Button& face_button, GUI::Widget* parent, Function<void(Size)> on_size_changed)
|
||||
Field::Field(GUI::Label& flag_label, GUI::Label& time_label, GUI::Button& face_button, GUI::Widget* parent, Function<void(Gfx::Size)> on_size_changed)
|
||||
: GUI::Frame(parent)
|
||||
, m_face_button(face_button)
|
||||
, m_flag_label(flag_label)
|
||||
|
|
|
@ -65,7 +65,7 @@ class Field final : public GUI::Frame {
|
|||
friend class Square;
|
||||
friend class SquareLabel;
|
||||
public:
|
||||
Field(GUI::Label& flag_label, GUI::Label& time_label, GUI::Button& face_button, GUI::Widget* parent, Function<void(Size)> on_size_changed);
|
||||
Field(GUI::Label& flag_label, GUI::Label& time_label, GUI::Button& face_button, GUI::Widget* parent, Function<void(Gfx::Size)> on_size_changed);
|
||||
virtual ~Field() override;
|
||||
|
||||
int rows() const { return m_rows; }
|
||||
|
@ -131,5 +131,5 @@ private:
|
|||
bool m_chord_preview { false };
|
||||
bool m_first_click { true };
|
||||
bool m_single_chording { true };
|
||||
Function<void(Size)> m_on_size_changed;
|
||||
Function<void(Gfx::Size)> m_on_size_changed;
|
||||
};
|
||||
|
|
|
@ -78,7 +78,7 @@ int main(int argc, char** argv)
|
|||
auto time_icon_label = GUI::Label::construct(container);
|
||||
time_icon_label->set_icon(Gfx::Bitmap::load_from_file("/res/icons/minesweeper/timer.png"));
|
||||
auto time_label = GUI::Label::construct(container);
|
||||
auto field = Field::construct(*flag_label, *time_label, *face_button, widget, [&](Size size) {
|
||||
auto field = Field::construct(*flag_label, *time_label, *face_button, widget, [&](auto size) {
|
||||
size.set_height(size.height() + container->preferred_size().height());
|
||||
window->resize(size);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue