aboutsummaryrefslogtreecommitdiff
path: root/src/game_tab/left_panel/board/Theme.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game_tab/left_panel/board/Theme.cpp')
-rw-r--r--src/game_tab/left_panel/board/Theme.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/game_tab/left_panel/board/Theme.cpp b/src/game_tab/left_panel/board/Theme.cpp
index 6ecbafc..0c05fa1 100644
--- a/src/game_tab/left_panel/board/Theme.cpp
+++ b/src/game_tab/left_panel/board/Theme.cpp
@@ -130,10 +130,13 @@ void Theme::ResizeSquares(std::uint32_t width) {
skin_scaled['3']->SetMask(RoundedMask(width, 3));
}
-void Theme::Zoom(int amount) {
+bool Theme::Zoom(int amount) {
double width = skin_scaled['s']->GetWidth() + amount;
+ if(width<=20)
+ return false;
ResizeSquares(std::max(width, 1.0));
ResizePieces(std::max(width * PIECE_SIZE_FACTOR, 1.0));
+ return true;
}
void Theme::SetSquareRadius(std::uint8_t radius) {