mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-23 20:14:05 +00:00
Merge pull request #1667 from xiaoyifang/opt/zoomfactor-range
opt: valid zoomfactor range from 0.25 to 5
This commit is contained in:
commit
029c09633b
|
@ -3400,11 +3400,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 ) );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue