mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 12:55:33 +08:00
refs #740, GUI settings in own component
* used in client/mapping tool * reset font possible
This commit is contained in:
committed by
Mathew Sutcliffe
parent
6037ce85ed
commit
4e381a048f
@@ -190,7 +190,7 @@ namespace BlackGui
|
||||
return this->m_styleSheets.contains(fileName.toLower().trimmed());
|
||||
}
|
||||
|
||||
bool CStyleSheetUtility::updateFonts(const QFont &font)
|
||||
bool CStyleSheetUtility::updateFont(const QFont &font)
|
||||
{
|
||||
QString fs;
|
||||
if (font.pixelSize() >= 0)
|
||||
@@ -201,10 +201,10 @@ namespace BlackGui
|
||||
{
|
||||
fs.append(QString::number(font.pointSizeF())).append("pt");
|
||||
}
|
||||
return updateFonts(font.family(), fs, fontStyleAsString(font), fontWeightAsString(font), "white");
|
||||
return updateFont(font.family(), fs, fontStyleAsString(font), fontWeightAsString(font), "white");
|
||||
}
|
||||
|
||||
bool CStyleSheetUtility::updateFonts(const QString &fontFamily, const QString &fontSize, const QString &fontStyle, const QString &fontWeight, const QString &fontColor)
|
||||
bool CStyleSheetUtility::updateFont(const QString &fontFamily, const QString &fontSize, const QString &fontStyle, const QString &fontWeight, const QString &fontColor)
|
||||
{
|
||||
const QString indent(" ");
|
||||
QString fontStyleSheet;
|
||||
@@ -230,6 +230,12 @@ namespace BlackGui
|
||||
return ok;
|
||||
}
|
||||
|
||||
bool CStyleSheetUtility::resetFont()
|
||||
{
|
||||
QFile fontFile(CBuildConfig::getStylesheetsDir() + "/" + fileNameFontsModified());
|
||||
return fontFile.remove();
|
||||
}
|
||||
|
||||
QString CStyleSheetUtility::fontStyle(const QString &combinedStyleAndWeight)
|
||||
{
|
||||
static const QString n("normal");
|
||||
|
||||
Reference in New Issue
Block a user