diff --git a/src/declarativeimports/plasmacomponents/platformcomponents/touch/MenuItem.qml b/src/declarativeimports/plasmacomponents/platformcomponents/touch/MenuItem.qml index c5a807da1..3b01b77a9 100644 --- a/src/declarativeimports/plasmacomponents/platformcomponents/touch/MenuItem.qml +++ b/src/declarativeimports/plasmacomponents/platformcomponents/touch/MenuItem.qml @@ -52,7 +52,7 @@ Item { property alias font: textArea.font implicitWidth: textArea.paintedWidth + iconItem.width*2 + 6 - implicitHeight: Math.max(theme.smallIconSize, textArea.paintedHeight + 6) + implicitHeight: Math.max(units.iconSizes.small, textArea.paintedHeight + 6) width: Math.max(implicitWidth, parent.width) property bool separator: false diff --git a/src/declarativeimports/plasmacomponents/platformcomponents/touch/TextField.qml b/src/declarativeimports/plasmacomponents/platformcomponents/touch/TextField.qml index 811859028..c0baa4b4f 100644 --- a/src/declarativeimports/plasmacomponents/platformcomponents/touch/TextField.qml +++ b/src/declarativeimports/plasmacomponents/platformcomponents/touch/TextField.qml @@ -173,7 +173,7 @@ Item { parent: mouseEventListener // reparent to the MouseFilter for MouseArea to work id: clearButton source: "edit-clear-locationbar-rtl" - height: Math.max(textInput.height, theme.mediumIconSize) + height: Math.max(textInput.height, units.iconSizes.medium) width: height opacity: (textInput.text != "" && clearButtonShown) ? 1 : 0 Behavior on opacity { diff --git a/src/declarativeimports/plasmacomponents/qml/Button.qml b/src/declarativeimports/plasmacomponents/qml/Button.qml index 7a2c2378a..c27a6a57f 100644 --- a/src/declarativeimports/plasmacomponents/qml/Button.qml +++ b/src/declarativeimports/plasmacomponents/qml/Button.qml @@ -100,7 +100,7 @@ Item { /** * Smallest height this button can be to show all the contents */ - property real minimumHeight: Math.max(theme.smallIconSize, label.paintedHeight) + surfaceNormal.margins.top + surfaceNormal.margins.bottom + property real minimumHeight: Math.max(units.iconSizes.small, label.paintedHeight) + surfaceNormal.margins.top + surfaceNormal.margins.bottom /** * This signal is emitted when the button is clicked. diff --git a/src/declarativeimports/plasmacomponents/qml/CommonDialog.qml b/src/declarativeimports/plasmacomponents/qml/CommonDialog.qml index 4dec5c646..4dba7ea41 100644 --- a/src/declarativeimports/plasmacomponents/qml/CommonDialog.qml +++ b/src/declarativeimports/plasmacomponents/qml/CommonDialog.qml @@ -155,8 +155,8 @@ PlasmaComponents.Dialog { PlasmaCore.IconItem { id: titleAreaIcon - width: theme.iconSizeSmall - height: theme.iconSizeSmall + width: units.iconSizes.small + height: units.iconSizes.small source: titleIcon anchors.left: parent.left anchors.rightMargin: 4 diff --git a/src/declarativeimports/plasmacomponents/qml/TabBar.qml b/src/declarativeimports/plasmacomponents/qml/TabBar.qml index fc6a8c771..44469bbd1 100644 --- a/src/declarativeimports/plasmacomponents/qml/TabBar.qml +++ b/src/declarativeimports/plasmacomponents/qml/TabBar.qml @@ -177,7 +177,7 @@ FocusScope { Row { id: buttonsLayout visible: tabBarLayout.width > root.width - backgroundFrame.margins.left - backgroundFrame.margins.right - height: Math.min(parent.height, theme.mediumIconSize) + height: Math.min(parent.height, units.iconSizes.medium) anchors { right: parent.right diff --git a/src/declarativeimports/plasmacomponents/qml/TabButton.qml b/src/declarativeimports/plasmacomponents/qml/TabButton.qml index 85b3caeb4..35b0d68e9 100644 --- a/src/declarativeimports/plasmacomponents/qml/TabButton.qml +++ b/src/declarativeimports/plasmacomponents/qml/TabButton.qml @@ -152,7 +152,7 @@ Item { PlasmaCore.IconItem { id: imageLoader - implicitWidth: internal.portrait ? Math.max(theme.smallIconSize, root.height - (label.text ? label.height : 0)) : Math.max(theme.smallIconSize, root.height) + implicitWidth: internal.portrait ? Math.max(units.iconSizes.small, root.height - (label.text ? label.height : 0)) : Math.max(units.iconSizes.small, root.height) implicitHeight: implicitWidth anchors { diff --git a/src/declarativeimports/plasmacomponents/qml/TextField.qml b/src/declarativeimports/plasmacomponents/qml/TextField.qml index 9b6fb02d3..b1f5a4d93 100644 --- a/src/declarativeimports/plasmacomponents/qml/TextField.qml +++ b/src/declarativeimports/plasmacomponents/qml/TextField.qml @@ -358,7 +358,7 @@ FocusScope { PlasmaCore.IconItem { id: clearButton source: "edit-clear-locationbar-rtl" - height: Math.max(textInput.height, theme.smallIconSize) + height: Math.max(textInput.height, units.iconSizes.small) width: height opacity: (textInput.text != "" && clearButtonShown && textField.enabled) ? 1 : 0 Behavior on opacity { diff --git a/src/declarativeimports/plasmacomponents/qml/ToolButton.qml b/src/declarativeimports/plasmacomponents/qml/ToolButton.qml index f8a47ff43..3f7a91cbd 100644 --- a/src/declarativeimports/plasmacomponents/qml/ToolButton.qml +++ b/src/declarativeimports/plasmacomponents/qml/ToolButton.qml @@ -87,12 +87,12 @@ Item { //icon + label + left margin + right margin + spacing between icon and text //here it assumesleft margin = right top = bottom, why? // because the right and bottom margins can be disabled, so they would return 0, but their actual size is still needed for size hints - property real minimumWidth: Math.max(theme.smallIconSize, height) + label.paintedWidth + delegate.margins.left + delegate.margins.left + ((icon.valid) ? delegate.margins.left : 0) + property real minimumWidth: Math.max(units.iconSizes.small, height) + label.paintedWidth + delegate.margins.left + delegate.margins.left + ((icon.valid) ? delegate.margins.left : 0) /** * The smallest height this button can be to show all the contents */ - property real minimumHeight: Math.max(theme.smallIconSize, label.paintedHeight) + delegate.margins.top + delegate.margins.top + property real minimumHeight: Math.max(units.iconSizes.small, label.paintedHeight) + delegate.margins.top + delegate.margins.top implicitWidth: { if (label.text.length == 0) {