Skip to content

Commit

Permalink
Windows icon scale default back to 2
Browse files Browse the repository at this point in the history
  • Loading branch information
dougmassay committed Sep 11, 2016
1 parent 93a8ceb commit fb98925
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/MainUI/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4105,12 +4105,17 @@ void MainWindow::PlatformSpecificTweaks()
ui.actionClose->setVisible(false);
// attempt to grow icons for high dpi displays on Windows and Linux
QString envvar = Utility::GetEnvironmentVar("SIGIL_ICON_SCALE_FACTOR");
double iconscalefactor = 1.8;
#ifdef Q_OS_WIN32
double defaultmultiplier = 2;
#else
double defaultmultiplier = 1.8;
#endif
double iconscalefactor = defaultmultiplier;
if (!envvar.isEmpty()) {
bool ok;
iconscalefactor = envvar.toDouble(&ok);
if (!ok || iconscalefactor > 3 || iconscalefactor < 1) {
iconscalefactor = 1.8;
iconscalefactor = defaultmultiplier;
}
}
int iconsize = QFontMetrics(QFont()).lineSpacing() * iconscalefactor;
Expand Down

0 comments on commit fb98925

Please sign in to comment.