From d2f82e9350d7ab241e187eea21053559a382af8c Mon Sep 17 00:00:00 2001 From: Xiao Yi Fang Date: Wed, 10 Jul 2024 17:13:12 +0800 Subject: [PATCH] opt: valid zoomfactor range from 0.25 to 5 --- src/ui/mainwindow.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ui/mainwindow.cc b/src/ui/mainwindow.cc index 5f22c249..4bc15396 100644 --- a/src/ui/mainwindow.cc +++ b/src/ui/mainwindow.cc @@ -3383,11 +3383,11 @@ void MainWindow::adjustCurrentZoomFactor() { if ( cfg.preferences.zoomFactor >= 5 ) cfg.preferences.zoomFactor = 5; - else if ( cfg.preferences.zoomFactor <= 0.1 ) - cfg.preferences.zoomFactor = 0.1; + else if ( cfg.preferences.zoomFactor <= 0.25 ) + cfg.preferences.zoomFactor = 0.25; zoomIn->setEnabled( cfg.preferences.zoomFactor < 5 ); - zoomOut->setEnabled( cfg.preferences.zoomFactor > 0.1 ); + zoomOut->setEnabled( cfg.preferences.zoomFactor > 0.25 ); zoomBase->setEnabled( !qFuzzyCompare( cfg.preferences.zoomFactor, 1.0 ) ); }