Added command-line options to control the application font size.
This commit is contained in:
parent
a1fea4dae6
commit
5ca4cc8917
@ -34,8 +34,8 @@
|
||||
#define VER_LAMEXP_MINOR_HI 1
|
||||
#define VER_LAMEXP_MINOR_LO 0
|
||||
#define VER_LAMEXP_TYPE Alpha
|
||||
#define VER_LAMEXP_PATCH 1
|
||||
#define VER_LAMEXP_BUILD 1528
|
||||
#define VER_LAMEXP_PATCH 2
|
||||
#define VER_LAMEXP_BUILD 1532
|
||||
#define VER_LAMEXP_CONFG 1528
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -1101,6 +1101,20 @@ bool lamexp_init_qt(int argc, char* argv[])
|
||||
}
|
||||
}
|
||||
|
||||
//Enable larger/smaller font size
|
||||
double fontScaleFactor = 1.0;
|
||||
if(arguments.contains("--huge-font", Qt::CaseInsensitive)) fontScaleFactor = 1.500;
|
||||
if(arguments.contains("--big-font", Qt::CaseInsensitive)) fontScaleFactor = 1.250;
|
||||
if(arguments.contains("--small-font", Qt::CaseInsensitive)) fontScaleFactor = 0.875;
|
||||
if(arguments.contains("--tiny-font", Qt::CaseInsensitive)) fontScaleFactor = 0.750;
|
||||
if(!qFuzzyCompare(fontScaleFactor, 1.0))
|
||||
{
|
||||
qWarning("Application font scale factor set to: %.3f\n", fontScaleFactor);
|
||||
QFont appFont = application->font();
|
||||
appFont.setPointSizeF(appFont.pointSizeF() * fontScaleFactor);
|
||||
application->setFont(appFont);
|
||||
}
|
||||
|
||||
//Add the default translations
|
||||
lamexp_translation_init();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user