diff --git a/src/declarativeimports/kirigamiplasmadesktopstyle/Units.qml b/src/declarativeimports/kirigamiplasmadesktopstyle/Units.qml --- a/src/declarativeimports/kirigamiplasmadesktopstyle/Units.qml +++ b/src/declarativeimports/kirigamiplasmadesktopstyle/Units.qml @@ -27,6 +27,10 @@ pragma Singleton +/** + * A set of values to define semantically sizes and durations + * @inherit QtQuick.QtObject + */ QtObject { id: unitsRoot @@ -85,7 +89,7 @@ * 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 @@ */ 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 --- a/src/declarativeimports/kirigamiplasmastyle/Units.qml +++ b/src/declarativeimports/kirigamiplasmastyle/Units.qml @@ -23,6 +23,10 @@ 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 @@ */ 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 /**