UI: Add retina support and updated icons
OBS Studio currently does not support retina rendering for any of the images in the app. This adds support for retina pixmap rendering as well as adding higher resolution versions of each icon that was not a high enough resolution to support 2x. The icons work when switching themes and will only render the 2x versions when the device pixel ratio is greater than or equal to 2. I also added credits to the readme for images that were already being used that require credit to the author. If the OBS community has paid for these images already, I can remove the credits from the readme. The credit is for the invisible, visible, and gear icons.
@ -47,3 +47,9 @@ Contributing
|
||||
you fully understand -- bad advice is worse than no advice. When it
|
||||
comes to something that you don't fully know or understand, please
|
||||
defer to the official help or official channels.
|
||||
|
||||
Credits
|
||||
-------
|
||||
- Icons made by [Freepik](http://www.freepik.com) from
|
||||
[www.flaticon.com](https://www.flaticon.com/) is licensed by
|
||||
[CC 3.0 BY](http://creativecommons.org/licenses/by/3.0/)
|
||||
|
BIN
UI/data/themes/Acri/cogwheel@2x.png
Normal file
After Width: | Height: | Size: 741 B |
BIN
UI/data/themes/Dark/cogwheel@2x.png
Normal file
After Width: | Height: | Size: 741 B |
BIN
UI/forms/images/configuration21_16@2x.png
Normal file
After Width: | Height: | Size: 728 B |
BIN
UI/forms/images/invisible_mask@2x.png
Normal file
After Width: | Height: | Size: 815 B |
BIN
UI/forms/images/locked_mask@2x.png
Normal file
After Width: | Height: | Size: 478 B |
BIN
UI/forms/images/properties@2x.png
Normal file
After Width: | Height: | Size: 728 B |
BIN
UI/forms/images/settings/advanced@2x.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
UI/forms/images/settings/applications-system-2@2x.png
Normal file
After Width: | Height: | Size: 5.7 KiB |
BIN
UI/forms/images/settings/decibel_audio_player@2x.png
Normal file
After Width: | Height: | Size: 5.6 KiB |
BIN
UI/forms/images/settings/network-bluetooth@2x.png
Normal file
After Width: | Height: | Size: 3.7 KiB |
BIN
UI/forms/images/settings/network@2x.png
Normal file
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 3.8 KiB |
BIN
UI/forms/images/settings/preferences-system-network-3@2x.png
Normal file
After Width: | Height: | Size: 5.6 KiB |
BIN
UI/forms/images/settings/system-settings-3@2x.png
Normal file
After Width: | Height: | Size: 4.5 KiB |
BIN
UI/forms/images/settings/video-display-3@2x.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
UI/forms/images/unlocked_mask@2x.png
Normal file
After Width: | Height: | Size: 501 B |
BIN
UI/forms/images/visible_mask@2x.png
Normal file
After Width: | Height: | Size: 610 B |
@ -4,30 +4,44 @@
|
||||
<file>images/unmute.png</file>
|
||||
<file>images/refresh.png</file>
|
||||
<file>images/configuration21_16.png</file>
|
||||
<file>images/configuration21_16@2x.png</file>
|
||||
<file>images/invisible_mask.png</file>
|
||||
<file>images/invisible_mask@2x.png</file>
|
||||
<file>images/visible_mask.png</file>
|
||||
<file>images/visible_mask@2x.png</file>
|
||||
<file>images/list_remove.png</file>
|
||||
<file>images/add.png</file>
|
||||
<file>images/down.png</file>
|
||||
<file>images/editscene.png</file>
|
||||
<file>images/live.png</file>
|
||||
<file>images/properties.png</file>
|
||||
<file>images/properties@2x.png</file>
|
||||
<file>images/up.png</file>
|
||||
<file>images/obs.png</file>
|
||||
<file>images/tray_active.png</file>
|
||||
<file>images/locked_mask.png</file>
|
||||
<file>images/locked_mask@2x.png</file>
|
||||
<file>images/unlocked_mask.png</file>
|
||||
<file>images/unlocked_mask@2x.png</file>
|
||||
<file>images/collapse.png</file>
|
||||
<file>images/expand.png</file>
|
||||
</qresource>
|
||||
<qresource prefix="/settings">
|
||||
<file>images/settings/advanced.png</file>
|
||||
<file>images/settings/advanced@2x.png</file>
|
||||
<file>images/settings/network.png</file>
|
||||
<file>images/settings/network@2x.png</file>
|
||||
<file>images/settings/video-display-3.png</file>
|
||||
<file>images/settings/video-display-3@2x.png</file>
|
||||
<file>images/settings/decibel_audio_player.png</file>
|
||||
<file>images/settings/decibel_audio_player@2x.png</file>
|
||||
<file>images/settings/applications-system-2.png</file>
|
||||
<file>images/settings/applications-system-2@2x.png</file>
|
||||
<file>images/settings/system-settings-3.png</file>
|
||||
<file>images/settings/system-settings-3@2x.png</file>
|
||||
<file>images/settings/network-bluetooth.png</file>
|
||||
<file>images/settings/network-bluetooth@2x.png</file>
|
||||
<file>images/settings/preferences-desktop-keyboard-shortcuts.png</file>
|
||||
<file>images/settings/preferences-desktop-keyboard-shortcuts@2x.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
@ -7,10 +7,17 @@
|
||||
|
||||
LockedCheckBox::LockedCheckBox() : QCheckBox()
|
||||
{
|
||||
lockedImage =
|
||||
QPixmap::fromImage(QImage(":/res/images/locked_mask.png"));
|
||||
unlockedImage =
|
||||
QPixmap::fromImage(QImage(":/res/images/unlocked_mask.png"));
|
||||
QString lockedFile;
|
||||
QString unlockedFile;
|
||||
if (devicePixelRatio() >= 2) {
|
||||
lockedFile = ":/res/images/locked_mask@2x.png";
|
||||
unlockedFile = ":/res/images/unlocked_mask@2x.png";
|
||||
} else {
|
||||
lockedFile = ":/res/images/locked_mask.png";
|
||||
unlockedFile = ":/res/images/unlocked_mask.png";
|
||||
}
|
||||
lockedImage = QPixmap::fromImage(QImage(lockedFile));
|
||||
unlockedImage = QPixmap::fromImage(QImage(unlockedFile));
|
||||
setMinimumSize(16, 16);
|
||||
|
||||
setStyleSheet("outline: none;");
|
||||
@ -31,6 +38,5 @@ void LockedCheckBox::paintEvent(QPaintEvent *event)
|
||||
palette().color(foregroundRole()));
|
||||
|
||||
QPainter p(this);
|
||||
p.drawPixmap(0, 0, image.width(), image.height(),
|
||||
QPixmap::fromImage(image));
|
||||
p.drawPixmap(0, 0, 16, 16, QPixmap::fromImage(image));
|
||||
}
|
||||
|
@ -1213,6 +1213,8 @@ bool OBSApp::OBSInit()
|
||||
{
|
||||
ProfileScope("OBSApp::OBSInit");
|
||||
|
||||
setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||
|
||||
bool licenseAccepted = config_get_bool(globalConfig, "General",
|
||||
"LicenseAccepted");
|
||||
OBSLicenseAgreement agreement(nullptr);
|
||||
|
@ -7,10 +7,17 @@
|
||||
|
||||
VisibilityCheckBox::VisibilityCheckBox() : QCheckBox()
|
||||
{
|
||||
checkedImage =
|
||||
QPixmap::fromImage(QImage(":/res/images/visible_mask.png"));
|
||||
uncheckedImage =
|
||||
QPixmap::fromImage(QImage(":/res/images/invisible_mask.png"));
|
||||
QString checkedFile;
|
||||
QString uncheckedFile;
|
||||
if (devicePixelRatio() >= 2) {
|
||||
checkedFile = ":/res/images/visible_mask@2x.png";
|
||||
uncheckedFile = ":/res/images/invisible_mask@2x.png";
|
||||
} else {
|
||||
checkedFile = ":/res/images/visible_mask.png";
|
||||
uncheckedFile = ":/res/images/invisible_mask.png";
|
||||
}
|
||||
checkedImage = QPixmap::fromImage(QImage(checkedFile));
|
||||
uncheckedImage = QPixmap::fromImage(QImage(uncheckedFile));
|
||||
setMinimumSize(16, 16);
|
||||
|
||||
setStyleSheet("outline: none;");
|
||||
@ -31,6 +38,5 @@ void VisibilityCheckBox::paintEvent(QPaintEvent *event)
|
||||
palette().color(foregroundRole()));
|
||||
|
||||
QPainter p(this);
|
||||
p.drawPixmap(0, 0, image.width(), image.height(),
|
||||
QPixmap::fromImage(image));
|
||||
p.drawPixmap(0, 0, 16, 16, QPixmap::fromImage(image));
|
||||
}
|
||||
|