mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
Chess: Allow resizing Chess using resize_aspect_ratio(1,1)
This commit is contained in:
committed by
Andreas Kling
parent
45ed58865e
commit
274be68102
@@ -102,11 +102,6 @@ void ChessWidget::paint_event(GUI::PaintEvent& event)
|
||||
}
|
||||
}
|
||||
|
||||
void ChessWidget::resize_event(GUI::ResizeEvent& event)
|
||||
{
|
||||
GUI::Widget::resize_event(event);
|
||||
}
|
||||
|
||||
void ChessWidget::mousedown_event(GUI::MouseEvent& event)
|
||||
{
|
||||
GUI::Widget::mousedown_event(event);
|
||||
|
||||
@@ -43,7 +43,6 @@ public:
|
||||
virtual ~ChessWidget() override;
|
||||
|
||||
virtual void paint_event(GUI::PaintEvent&) override;
|
||||
virtual void resize_event(GUI::ResizeEvent&) override;
|
||||
virtual void mousedown_event(GUI::MouseEvent&) override;
|
||||
virtual void mouseup_event(GUI::MouseEvent&) override;
|
||||
virtual void mousemove_event(GUI::MouseEvent&) override;
|
||||
|
||||
@@ -46,7 +46,8 @@ int main(int argc, char** argv)
|
||||
auto size = config->read_num_entry("Display", "size", 512);
|
||||
window->set_title("Chess");
|
||||
window->resize(size, size);
|
||||
window->set_resizable(false);
|
||||
window->set_size_increment({ 8, 8 });
|
||||
window->set_resize_aspect_ratio(1, 1);
|
||||
|
||||
auto icon = Gfx::Bitmap::load_from_file("/res/icons/16x16/app-chess.png");
|
||||
window->set_icon(icon);
|
||||
|
||||
Reference in New Issue
Block a user