diff --git a/src/declarativeimports/core/units.cpp b/src/declarativeimports/core/units.cpp index 7df81c116..bf9509227 100644 --- a/src/declarativeimports/core/units.cpp +++ b/src/declarativeimports/core/units.cpp @@ -46,7 +46,6 @@ Units::Units (QObject *parent) { m_iconSizes = new QQmlPropertyMap(this); updateDevicePixelRatio(); - updateDisplayAspectRatio(); updateSpacing(); //iconLoaderSettingsChanged(); @@ -140,25 +139,11 @@ int Units::devicePixelIconSize(const int size) const // FIXME: Add special casing for < 64 cases: align to kiconloader size } -qreal Units::displayAspectRatio() const -{ - return m_displayAspectRatio; -} - qreal Units::devicePixelRatio() const { return m_devicePixelRatio; } -void Units::updateDisplayAspectRatio() -{ - QRect geometry = QGuiApplication::primaryScreen()->virtualGeometry(); - - m_displayAspectRatio = geometry.width() / geometry.height(); - - emit displayAspectRatioChanged(); -} - void Units::updateDevicePixelRatio() { // Using QGuiApplication::devicePixelRatio() gives too coarse values, diff --git a/src/declarativeimports/core/units.h b/src/declarativeimports/core/units.h index 312356fe5..25dcd1027 100644 --- a/src/declarativeimports/core/units.h +++ b/src/declarativeimports/core/units.h @@ -83,11 +83,6 @@ class Units : public QObject */ Q_PROPERTY(qreal devicePixelRatio READ devicePixelRatio NOTIFY devicePixelRatioChanged) - /** - * The ratio between the screen width and height of the main screen. - */ - Q_PROPERTY(qreal displayAspectRatio READ displayAspectRatio NOTIFY displayAspectRatioChanged) - /** * units.longDuration should be used for longer, screen-covering animations, for opening and * closing of dialogs and other "not too small" animations @@ -116,11 +111,6 @@ public: */ qreal devicePixelRatio() const; - /** - * @return The ratio between physical and device-independent pixels. - */ - qreal displayAspectRatio() const; - /** * @return map with iconsizes, indexed by name */ @@ -152,7 +142,6 @@ public: Q_SIGNALS: void devicePixelRatioChanged(); - void displayAspectRatioChanged(); void gridUnitChanged(); void iconSizesChanged(); void spacingChanged(); @@ -165,7 +154,6 @@ private Q_SLOTS: private: void updateDevicePixelRatio(); - void updateDisplayAspectRatio(); void updateSpacing(); /** * @return The dpi-adjusted size for a given icon size @@ -176,7 +164,6 @@ private: int m_gridUnit; qreal m_devicePixelRatio; - qreal m_displayAspectRatio; qreal m_dpi; QQmlPropertyMap *m_iconSizes;