Skip to content

Commit

Permalink
Merge dc3ce0b into 4c1f5c0
Browse files Browse the repository at this point in the history
  • Loading branch information
agarny committed Aug 14, 2018
2 parents 4c1f5c0 + dc3ce0b commit e3226bc
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 7 deletions.
2 changes: 1 addition & 1 deletion doc/downloads/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ var jsonData = { "versions": [
}
],
"changes": [
{ "change": "<strong>General:</strong> Clang code model related cleaning up (see issue <a href=\"https://github.com/opencor/opencor/issues/1747\">#1747</a>). Allow the use of another Qt style (see issue <a href=\"https://github.com/opencor/opencor/issues/1761\">#1761</a>)." },
{ "change": "<strong>General:</strong> Clang code model related cleaning up (see issue <a href=\"https://github.com/opencor/opencor/issues/1747\">#1747</a>). Allow the use of another Qt style (see issue <a href=\"https://github.com/opencor/opencor/issues/1761\">#1761</a>). Improved HiDPI support (see issue <a href=\"https://github.com/opencor/opencor/issues/1763\">#1763</a>)." },
{ "change": "<strong>Core plugin:</strong> fixed a problem with the menu items for recently opened files potentially appearing as disabled on macOS (see issue <a href=\"https://github.com/opencor/opencor/issues/1633\">#1633</a>)." },
{ "change": "<strong>Third-party libraries:</strong> upgraded the <a href=\"http://computation.llnl.gov/projects/sundials\">SUNDIALS</a> library to version 3.1.2 (see issue <a href=\"https://github.com/opencor/opencor/issues/1743\">#1743</a>). Upgraded <a href=\"https://www.openssl.org/\">OpenSSL</a> to version 1.1.0h (see issue <a href=\"https://github.com/opencor/opencor/issues/1751\">#1751</a>). Renamed our BioSignalML plugin to libBioSignalML (see issue <a href=\"https://github.com/opencor/opencor/issues/1754\">#1754</a>)." }
]
Expand Down
10 changes: 6 additions & 4 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,14 @@ int main(int pArgC, char *pArgV[])

OpenCOR::initPluginsPath(pArgC, pArgV);

// Create the GUI version of OpenCOR and make sure that it supports high DPI
// Create the GUI version of OpenCOR after making sure that we use 96 DPI no
// matter what
// Note: the use 96 DPI must be enforced before creating our GUI
// application...

OpenCOR::GuiApplication *guiApp = new OpenCOR::GuiApplication(pArgC, pArgV);
QApplication::setAttribute(Qt::AA_Use96Dpi);

guiApp->setAttribute(Qt::AA_EnableHighDpiScaling);
guiApp->setAttribute(Qt::AA_UseHighDpiPixmaps);
OpenCOR::GuiApplication *guiApp = new OpenCOR::GuiApplication(pArgC, pArgV);

// Send a message (containing the arguments that were passed to this
// instance of OpenCOR minus the first one since it corresponds to the full
Expand Down
4 changes: 4 additions & 0 deletions src/misc/guiapplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ GuiApplication::GuiApplication(int &pArgC, char **pArgV) :
SettingsPreferencesStyle,
SettingsPreferencesStyleDefault).toString());

// Add support for HiDPI screens

setAttribute(Qt::AA_EnableHighDpiScaling);

// Filter out OpenSSL warning messages

QLoggingCategory::setFilterRules("qt.network.ssl.warning=false");
Expand Down
5 changes: 5 additions & 0 deletions src/plugins/miscellaneous/Core/src/tabbarwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,11 @@ TabBarWidget::TabBarWidget(QWidget *pParent) :
#ifdef Q_OS_MAC
setStyle(new TabBarStyle());
#endif

// Force the size of the icons to be 16 by 16 pixels
// Note: this ensures that our icons have a decent size on HiDPI screens...

setIconSize(QSize(16, 16));
}

//==============================================================================
Expand Down
1 change: 1 addition & 0 deletions src/plugins/miscellaneous/Core/src/toolbarwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ ToolBarWidget::ToolBarWidget() :
"}");

// Force the size of the icons to be 20 by 20 pixels
// Note: this ensures that our icons have a decent size on HiDPI screens...

setIconSize(QSize(20, 20));
}
Expand Down
5 changes: 5 additions & 0 deletions src/plugins/miscellaneous/Core/src/treeviewwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ TreeViewWidget::TreeViewWidget(QWidget *pParent) :
#endif
setFrameShape(QFrame::NoFrame);
setItemDelegate(new StyledItemDelegate(this));

// Force the size of the icons to be 16 by 16 pixels
// Note: this ensures that our icons have a decent size on HiDPI screens...

setIconSize(QSize(16, 16));
}

//==============================================================================
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/preferencesinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ PreferencesWidget::PreferencesWidget(const QString &pName, QWidget *pParent) :
mSettings->beginGroup(pName);
}

mSettings->beginGroup("Preferences");
mSettings->beginGroup(SettingsPreferences);
}

//==============================================================================
Expand Down Expand Up @@ -97,7 +97,7 @@ QVariant PreferencesInterface::preference(const QString &pName,
settings.beginGroup(pName);
}

settings.beginGroup("Preferences");
settings.beginGroup(Preferences::SettingsPreferences);

return settings.value(pKey, pDefaultValue);
}
Expand Down
4 changes: 4 additions & 0 deletions src/plugins/preferencesinterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ namespace Preferences {

//==============================================================================

static const auto SettingsPreferences = QStringLiteral("Preferences");

//==============================================================================

static const auto GeneralPreferences = QStringLiteral("General");

//==============================================================================
Expand Down

0 comments on commit e3226bc

Please sign in to comment.