mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
Chess: Allow resizing Chess using resize_aspect_ratio(1,1)
This commit is contained in:
parent
45ed58865e
commit
274be68102
Notes:
sideshowbarker
2024-07-19 03:16:30 +09:00
Author: https://github.com/petelliott Commit: https://github.com/SerenityOS/serenity/commit/274be68102b Pull-request: https://github.com/SerenityOS/serenity/pull/3255 Reviewed-by: https://github.com/awesomekling
3 changed files with 2 additions and 7 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue