mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 10:37:45 +00:00
Flood: Get the color scheme from the system theme
This commit is contained in:
parent
800c292be8
commit
1a68977457
7 changed files with 41 additions and 112 deletions
|
@ -11,20 +11,15 @@
|
|||
#include <AK/NonnullOwnPtr.h>
|
||||
#include <AK/Optional.h>
|
||||
#include <AK/RefPtr.h>
|
||||
#include <LibGUI/Frame.h>
|
||||
#include <LibGUI/Menu.h>
|
||||
#include <LibGUI/Widget.h>
|
||||
|
||||
class BoardWidget final : public GUI::Widget {
|
||||
class BoardWidget final : public GUI::Frame {
|
||||
C_OBJECT(BoardWidget);
|
||||
|
||||
public:
|
||||
Function<void(Board::RowAndColumn)> on_move;
|
||||
|
||||
virtual void paint_event(GUI::PaintEvent&) override;
|
||||
virtual void mousedown_event(GUI::MouseEvent&) override;
|
||||
|
||||
void set_background_color(Color const background);
|
||||
|
||||
int get_cell_size() const;
|
||||
Gfx::IntSize get_board_offset() const;
|
||||
|
||||
|
@ -34,8 +29,13 @@ public:
|
|||
Board* board() { return m_board.ptr(); }
|
||||
|
||||
private:
|
||||
BoardWidget(size_t rows, size_t columns, Vector<Color> colors, Color background_color);
|
||||
BoardWidget(size_t rows, size_t columns);
|
||||
void update_color_scheme();
|
||||
NonnullOwnPtr<Board> m_board;
|
||||
|
||||
Color m_background_color;
|
||||
virtual void event(Core::Event&) override;
|
||||
virtual void paint_event(GUI::PaintEvent&) override;
|
||||
virtual void mousedown_event(GUI::MouseEvent&) override;
|
||||
|
||||
Color m_background_color = Color::Black;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue