diff --git a/src/declarativeimports/kirigamiplasmadesktopstyle/Units.qml b/src/declarativeimports/kirigamiplasmadesktopstyle/Units.qml index 9ddb24a8e..397beca26 100644 --- a/src/declarativeimports/kirigamiplasmadesktopstyle/Units.qml +++ b/src/declarativeimports/kirigamiplasmadesktopstyle/Units.qml @@ -27,6 +27,10 @@ import org.kde.kirigami 2.4 pragma Singleton +/** + * A set of values to define semantically sizes and durations + * @inherit QtQuick.QtObject + */ QtObject { id: unitsRoot @@ -85,7 +89,7 @@ QtObject { * use theme.mSize(theme.defaultFont), units.smallSpacing and units.largeSpacing. * The devicePixelRatio follows the definition of "device independent pixel" by Microsoft. */ - property real devicePixelRatio: Math.max(1, (fontMetrics.font.pixelSize / fontMetrics.font.pointSize)) + property real devicePixelRatio: Math.max(1, ((fontMetrics.font.pixelSize*0.75) / fontMetrics.font.pointSize)) /** * units.longDuration should be used for longer, screen-covering animations, for opening and @@ -113,8 +117,16 @@ QtObject { */ readonly property int wheelScrollLines: __styleItem.styleHint("wheelScrollLines") + /** + * time in ms by which the display of tooltips will be delayed. + * + * @sa ToolTip.delay property + */ property int toolTipDelay: 700 + /** + * metrics used by the default font + */ property variant fontMetrics: TextMetrics { text: "M" function roundedIconSize(size) { diff --git a/src/declarativeimports/kirigamiplasmastyle/Units.qml b/src/declarativeimports/kirigamiplasmastyle/Units.qml index 19bd59d60..10672dce9 100644 --- a/src/declarativeimports/kirigamiplasmastyle/Units.qml +++ b/src/declarativeimports/kirigamiplasmastyle/Units.qml @@ -23,6 +23,10 @@ import QtQuick 2.4 import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.kirigami 2.4 +/** + * A set of values to define semantically sizes and durations + * @inherit QtQuick.QtObject + */ QtObject { /** * The fundamental unit of space that should be used for sizes, expressed in pixels. @@ -105,6 +109,11 @@ QtObject { */ property int wheelScrollLines: 3 + /** + * time in ms by which the display of tooltips will be delayed. + * + * @sa ToolTip.delay property + */ property int toolTipDelay: Settings.tabletMode ? Qt.styleHints.mousePressAndHoldInterval : 700 /**