UI: Fix small font size on macOS and fallback font

Qt uses a default font size of 13pt for QWidgets on macOS. By setting
the default font size to 10pt, text becomes too small for comfortable
use on macOS.

This PR patches the font files copied into the macOS bundle to use a
larger font-size of 12pt. It also sets the fallback font to the more
modern SF Display-based `.AppleSystemUIFont` used by default in macOS
if Open Sans is not found.
master
PatTheMav 2022-08-05 17:30:11 +02:00 committed by Patrick Heyer
parent 896de392cd
commit b81ab5a32b
6 changed files with 16 additions and 6 deletions

View File

@ -82,7 +82,7 @@ QWidget {
selection-background-color: rgb(22,31,65);
selection-color: palette(text);
font-size: 10pt;
font-family: 'Open Sans', Helvetica, Arial, 'MS Shell Dlg', sans-serif
font-family: 'Open Sans', '.AppleSystemUIFont', Helvetica, Arial, 'MS Shell Dlg', sans-serif;
}
QWidget:disabled {

View File

@ -82,7 +82,7 @@ QWidget {
selection-background-color: rgb(40,76,184);
selection-color: palette(text);
font-size: 10pt;
font-family: 'Open Sans', Helvetica, Arial, 'MS Shell Dlg', sans-serif
font-family: 'Open Sans', '.AppleSystemUIFont', Helvetica, Arial, 'MS Shell Dlg', sans-serif;
}
QWidget:disabled {

View File

@ -82,7 +82,7 @@ QWidget {
selection-background-color: rgb(140,181,255);
selection-color: palette(text);
font-size: 10pt;
font-family: 'Open Sans', Helvetica, Arial, 'MS Shell Dlg', sans-serif
font-family: 'Open Sans', '.AppleSystemUIFont', Helvetica, Arial, 'MS Shell Dlg', sans-serif;
}
QWidget:disabled {

View File

@ -84,7 +84,7 @@ QWidget {
selection-background-color: rgb(0,188,212);
selection-color: palette(text);
font-size: 10pt;
font-family: 'Open Sans', Helvetica, Arial, 'MS Shell Dlg', sans-serif
font-family: 'Open Sans', '.AppleSystemUIFont', Helvetica, Arial, 'MS Shell Dlg', sans-serif;
}
QWidget:disabled {

View File

@ -82,7 +82,7 @@ QWidget {
selection-background-color: rgb(40,76,184);
selection-color: palette(text);
font-size: 10pt;
font-family: 'Open Sans', Helvetica, Arial, 'MS Shell Dlg', sans-serif
font-family: 'Open Sans', '.AppleSystemUIFont', Helvetica, Arial, 'MS Shell Dlg', sans-serif;
}
QWidget:disabled {

View File

@ -355,7 +355,6 @@ function(setup_obs_bundle target)
COMPONENT obs_resources)
if(ENABLE_SPARKLE_UPDATER)
add_custom_command(
TARGET ${target}
POST_BUILD
@ -388,6 +387,17 @@ function(setup_obs_bundle target)
COMPONENT obs_frameworks)
endif()
add_custom_command(
TARGET ${target}
POST_BUILD
COMMAND
/usr/bin/sed -i '' 's/font-size: 10pt\;/font-size: 12pt\;/'
"$<TARGET_BUNDLE_CONTENT_DIR:${target}>/Resources/themes/Acri.qss"
"$<TARGET_BUNDLE_CONTENT_DIR:${target}>/Resources/themes/Grey.qss"
"$<TARGET_BUNDLE_CONTENT_DIR:${target}>/Resources/themes/Light.qss"
"$<TARGET_BUNDLE_CONTENT_DIR:${target}>/Resources/themes/Rachni.qss"
"$<TARGET_BUNDLE_CONTENT_DIR:${target}>/Resources/themes/Yami.qss")
install(SCRIPT "${CMAKE_SOURCE_DIR}/cmake/bundle/macOS/bundleutils.cmake"
COMPONENT obs_resources)
endfunction()