From dd24427d81d04765cbe3426b511b1ad05952d087 Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Sun, 1 Jan 2023 20:28:39 +0100 Subject: Debug drawing canvas --- src/game_tab/left_panel/board/BoardCanvas.cpp | 2 +- src/game_tab/left_panel/board/Theme.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src/game_tab/left_panel') diff --git a/src/game_tab/left_panel/board/BoardCanvas.cpp b/src/game_tab/left_panel/board/BoardCanvas.cpp index 5297250..0e44979 100644 --- a/src/game_tab/left_panel/board/BoardCanvas.cpp +++ b/src/game_tab/left_panel/board/BoardCanvas.cpp @@ -16,7 +16,7 @@ BoardCanvas::BoardCanvas(wxFrame *parent) ApplyPreferences(); // The following should be called when using an EVT_PAINT handler SetBackgroundStyle(wxBG_STYLE_PAINT); - adata.duration=5000; + adata.duration=200; adata.duration_fast=80; adata.fps=30; adata.buffer=new wxBitmap(500,500,32); diff --git a/src/game_tab/left_panel/board/Theme.cpp b/src/game_tab/left_panel/board/Theme.cpp index 0c05fa1..6c662dc 100644 --- a/src/game_tab/left_panel/board/Theme.cpp +++ b/src/game_tab/left_panel/board/Theme.cpp @@ -134,6 +134,8 @@ bool Theme::Zoom(int amount) { double width = skin_scaled['s']->GetWidth() + amount; if(width<=20) return false; + if(width>=180) + return false; ResizeSquares(std::max(width, 1.0)); ResizePieces(std::max(width * PIECE_SIZE_FACTOR, 1.0)); return true; -- cgit v1.2.3