mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 17:10:23 +00:00
Minesweeper: Add little icons to the flags and timer labels.
This commit is contained in:
parent
791e8f5bb0
commit
c8e601a5d5
Notes:
sideshowbarker
2024-07-19 14:42:21 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/c8e601a5d50
3 changed files with 5 additions and 0 deletions
BIN
Base/res/icons/minesweeper/timer.png
Normal file
BIN
Base/res/icons/minesweeper/timer.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 216 B |
|
@ -188,6 +188,7 @@ void Field::paint_event(GPaintEvent& event)
|
|||
painter.add_clip_rect(event.rect());
|
||||
|
||||
auto inner_rect = frame_inner_rect();
|
||||
painter.add_clip_rect(inner_rect);
|
||||
|
||||
for (int y = inner_rect.top() - 1; y <= inner_rect.bottom(); y += square_size()) {
|
||||
Point a { inner_rect.left(), y };
|
||||
|
|
|
@ -25,8 +25,12 @@ int main(int argc, char** argv)
|
|||
container->set_size_policy(SizePolicy::Fill, SizePolicy::Fixed);
|
||||
container->set_preferred_size({ 0, 36 });
|
||||
container->set_layout(make<GBoxLayout>(Orientation::Horizontal));
|
||||
auto* flag_icon_label = new GLabel(container);
|
||||
flag_icon_label->set_icon(GraphicsBitmap::load_from_file("/res/icons/minesweeper/flag.png"));
|
||||
auto* flag_label = new GLabel(container);
|
||||
auto* face_button = new GButton(container);
|
||||
auto* time_icon_label = new GLabel(container);
|
||||
time_icon_label->set_icon(GraphicsBitmap::load_from_file("/res/icons/minesweeper/timer.png"));
|
||||
auto* time_label = new GLabel(container);
|
||||
auto* field = new Field(*flag_label, *time_label, *face_button, widget);
|
||||
|
||||
|
|
Loading…
Reference in a new issue