fix(src/components/other/units/Units): provide same font size on mac os

This commit is contained in:
Ronan Abhamon 2017-06-08 11:12:37 +02:00
parent 865c595d3d
commit 53cd7ef3ff
2 changed files with 5 additions and 4 deletions

View file

@ -27,5 +27,9 @@
Units::Units (QObject *parent) : QObject(parent) {}
float Units::getDp () const {
#ifdef Q_OS_MACOS
return 96.0 / 72.0;
#endif // ifdef Q_OS_MACOS
return 1.0;
}

View file

@ -30,15 +30,12 @@
class Units : public QObject {
Q_OBJECT;
Q_PROPERTY(float dp READ getDp NOTIFY dpChanged);
Q_PROPERTY(float dp READ getDp CONSTANT);
public:
Units (QObject *parent = Q_NULLPTR);
~Units () = default;
signals:
void dpChanged ();
private:
float getDp () const;
};