Port from theme iconsize to units.iconSizes.*

This commit is contained in:
Sebastian Kügler 2014-01-23 00:24:38 +01:00
parent e10b77f236
commit cc7bd8e11e
8 changed files with 10 additions and 10 deletions

View File

@ -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

View File

@ -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 {

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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 {

View File

@ -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 {

View File

@ -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) {