mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 19:24:08 +00:00
optimize: float number compare precision
optimize: float number compare precision
This commit is contained in:
parent
f06fc48b40
commit
7e2231805f
|
@ -254,7 +254,7 @@ void HelpWindow::applyZoomFactor()
|
||||||
|
|
||||||
zoomInAction->setEnabled( cfg.preferences.helpZoomFactor < 5 );
|
zoomInAction->setEnabled( cfg.preferences.helpZoomFactor < 5 );
|
||||||
zoomOutAction->setEnabled( cfg.preferences.helpZoomFactor > 0.2 );
|
zoomOutAction->setEnabled( cfg.preferences.helpZoomFactor > 0.2 );
|
||||||
zoomBaseAction->setEnabled( cfg.preferences.helpZoomFactor != 1.0 );
|
zoomBaseAction->setEnabled( !qFuzzyCompare(cfg.preferences.helpZoomFactor, 1.0) );
|
||||||
|
|
||||||
if( fontSize > 0 )
|
if( fontSize > 0 )
|
||||||
{
|
{
|
||||||
|
|
|
@ -3720,7 +3720,7 @@ void MainWindow::adjustCurrentZoomFactor()
|
||||||
|
|
||||||
zoomIn->setEnabled( cfg.preferences.zoomFactor < 5 );
|
zoomIn->setEnabled( cfg.preferences.zoomFactor < 5 );
|
||||||
zoomOut->setEnabled( cfg.preferences.zoomFactor > 0.1 );
|
zoomOut->setEnabled( cfg.preferences.zoomFactor > 0.1 );
|
||||||
zoomBase->setEnabled( cfg.preferences.zoomFactor != 1.0 );
|
zoomBase->setEnabled( !qFuzzyCompare( cfg.preferences.zoomFactor, 1.0 ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::scaleArticlesByCurrentZoomFactor()
|
void MainWindow::scaleArticlesByCurrentZoomFactor()
|
||||||
|
|
Loading…
Reference in a new issue