mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-20 04:25:42 +08:00
[5.14.1] UI adjustments
* OS native check of screen resolution (Qt free, experimental) * changed rounding * use string for scale factor so we can use fractions as 2/3 * utility functions to clean numbers, parse fractions It looks like: * my WIN10 scaling is 250% * obviously swift rounds that to 3 (device ratio) * now using FLOOR policy down-rounding to 2 * rational: scaling up (scale factor) is better as down-scaling as the factors would be clearer * 2->3 1.5, but 3->2 means 0.66667
This commit is contained in:
committed by
Mat Sutcliffe
parent
52de67a72f
commit
8f4c4a249c
@@ -284,7 +284,7 @@ namespace BlackGui
|
||||
|
||||
//! Support for high DPI screens
|
||||
//! \note Needs to be at the beginning of main
|
||||
static void highDpiScreenSupport(double scaleFactor = -1);
|
||||
static void highDpiScreenSupport(const QString &scaleFactor = {});
|
||||
|
||||
//! Uses the high DPI support?
|
||||
static bool isUsingHighDpiScreenSupport();
|
||||
@@ -300,8 +300,15 @@ namespace BlackGui
|
||||
static void modalWindowToFront();
|
||||
|
||||
//! Parse scale factor if any
|
||||
//! \deprecated using scaleFactor now
|
||||
static double parseScaleFactor(int argc, char *argv[]);
|
||||
|
||||
//! Get the scale factor
|
||||
static QString scaleFactor(int argc, char *argv[]);
|
||||
|
||||
//! Get a default scale factor
|
||||
static QString defaultScaleFactorString();
|
||||
|
||||
signals:
|
||||
//! Style sheet changed
|
||||
void styleSheetsChanged();
|
||||
|
||||
Reference in New Issue
Block a user