Generate fonts.qss dynamically during build

The static font size and weight looked odd on Mac OS.
QSS does not support different platform specific styles. Hence the platform
scopes had to be added to blackgui.pro and fonts.qss generated during
build process.

refs 936
This commit is contained in:
Roland Winklmeier
2017-04-14 14:54:33 +02:00
committed by Mathew Sutcliffe
parent 3d496c6df8
commit 4076722aab
3 changed files with 24 additions and 9 deletions

View File

@@ -53,8 +53,23 @@ RESOURCES +=
DESTDIR = $$DestRoot/lib
DLLDESTDIR = $$DestRoot/bin
OTHER_FILES += ./share/qss/*.qss ./share/qss/*.css ./share/qss/*.ini *.ico *.rc
COPY_FILES += $$PWD/share/qss/*
QSS_FONT_FAMILY = "Arial"
QSS_FONT_SIZE = "8"
QSS_FONT_STYLE = "normal"
QSS_FONT_WEIGHT = "bold"
macx {
QSS_FONT_SIZE = "12"
QSS_FONT_WEIGHT = "normal"
}
fontsqss.input = share/qss/fonts.qss.in
fontsqss.output = $$DestRoot/share/qss/fonts.qss
QMAKE_SUBSTITUTES += fontsqss
OTHER_FILES += ./share/qss/*.qss ./share/qss/*.qss.in ./share/qss/*.css
COPY_FILES += $$PWD/share/qss/*.qss
COPY_FILES += $$PWD/share/qss/*.css
win32 {
dlltarget.path = $$PREFIX/bin

View File

@@ -1,7 +0,0 @@
QWidget {
color: white;
font-family: "Arial";
font-size: 8pt;
font-style: normal;
font-weight: bold;
}

View File

@@ -0,0 +1,7 @@
QWidget {
color: white;
font-family: $$QSS_FONT_FAMILY;
font-size: $$QSS_FONT_SIZE pt;
font-style: $$QSS_FONT_STYLE;
font-weight: $$QSS_FONT_WEIGHT;
}