forked from Slicer/Slicer
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENH: Switch to new Slicer logo in module panel
Switch to the new Slicer logo: it is more compact than the old one and works with both dark and bright background (see Slicer#5367). For crisp rendering of the new icon, Qt::AA_UseHighDpiPixmaps application option is now enabled. If higher-resolution variants of icons are provided by [email protected], [email protected], ... names then they are now used on high-DPI displays. Move the logo to the module panel dockable widget's header to save space. See discussion at Slicer#5820 for more details. Co-authored-by: James Butler <[email protected]>
- Loading branch information
1 parent
5a44b5e
commit d2d11dd
Showing
6 changed files
with
28 additions
and
9 deletions.
There are no files selected for viewing
Binary file modified
BIN
-1.35 KB
(85%)
Applications/SlicerApp/Resources/Images/Slicer-ModulePanelLogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,5 +8,6 @@ | |
<file alias="SplashScreen.png">Images/Slicer-SplashScreen.png</file> | ||
<file alias="Logo.png">Images/Slicer-Logo.png</file> | ||
<file alias="ModulePanelLogo.png">Images/Slicer-ModulePanelLogo.png</file> | ||
<file alias="[email protected]">Images/[email protected]</file> | ||
</qresource> | ||
</RCC> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -130,6 +130,15 @@ void qMRMLWidget::preInitializeApplication() | |
// Enable automatic scaling based on the pixel density of the monitor | ||
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); | ||
|
||
// Enable QIcon to provide higher-resolution pixmaps than the size in device independent units. | ||
// These pixmaps render sharply on a high-dpi display. | ||
// If Qt::AA_UseHighDpiPixmaps is enabled then when an icon is loaded by the filename "base.png" then the icon | ||
// class will also look for higher-resolution variants of this image by the names [email protected], [email protected], etc. | ||
// On a high-DPI monitor (with DevicePixelRatio > 1) QIcon will actually load a higher-resolution pixmap | ||
// that best matches the DevicePixelRatio of the display, resulting in crisp rendering of the icon. | ||
// See https://doc.qt.io/qt-5/qicon.html#pixmap for more details. | ||
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); | ||
|
||
// Enables resource sharing between the OpenGL contexts used by classes like QOpenGLWidget and QQuickWidget | ||
QApplication::setAttribute(Qt::AA_ShareOpenGLContexts); | ||
} | ||
|