mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 07:15:35 +08:00
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:
committed by
Mathew Sutcliffe
parent
3d496c6df8
commit
4076722aab
@@ -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
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
QWidget {
|
||||
color: white;
|
||||
font-family: "Arial";
|
||||
font-size: 8pt;
|
||||
font-style: normal;
|
||||
font-weight: bold;
|
||||
}
|
||||
7
src/blackgui/share/qss/fonts.qss.in
Normal file
7
src/blackgui/share/qss/fonts.qss.in
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user