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 property alias font: textArea.font
implicitWidth: textArea.paintedWidth + iconItem.width*2 + 6 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) width: Math.max(implicitWidth, parent.width)
property bool separator: false property bool separator: false

View File

@ -173,7 +173,7 @@ Item {
parent: mouseEventListener // reparent to the MouseFilter for MouseArea to work parent: mouseEventListener // reparent to the MouseFilter for MouseArea to work
id: clearButton id: clearButton
source: "edit-clear-locationbar-rtl" source: "edit-clear-locationbar-rtl"
height: Math.max(textInput.height, theme.mediumIconSize) height: Math.max(textInput.height, units.iconSizes.medium)
width: height width: height
opacity: (textInput.text != "" && clearButtonShown) ? 1 : 0 opacity: (textInput.text != "" && clearButtonShown) ? 1 : 0
Behavior on opacity { Behavior on opacity {

View File

@ -100,7 +100,7 @@ Item {
/** /**
* Smallest height this button can be to show all the contents * 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. * This signal is emitted when the button is clicked.

View File

@ -155,8 +155,8 @@ PlasmaComponents.Dialog {
PlasmaCore.IconItem { PlasmaCore.IconItem {
id: titleAreaIcon id: titleAreaIcon
width: theme.iconSizeSmall width: units.iconSizes.small
height: theme.iconSizeSmall height: units.iconSizes.small
source: titleIcon source: titleIcon
anchors.left: parent.left anchors.left: parent.left
anchors.rightMargin: 4 anchors.rightMargin: 4

View File

@ -177,7 +177,7 @@ FocusScope {
Row { Row {
id: buttonsLayout id: buttonsLayout
visible: tabBarLayout.width > root.width - backgroundFrame.margins.left - backgroundFrame.margins.right 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 { anchors {
right: parent.right right: parent.right

View File

@ -152,7 +152,7 @@ Item {
PlasmaCore.IconItem { PlasmaCore.IconItem {
id: imageLoader 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 implicitHeight: implicitWidth
anchors { anchors {

View File

@ -358,7 +358,7 @@ FocusScope {
PlasmaCore.IconItem { PlasmaCore.IconItem {
id: clearButton id: clearButton
source: "edit-clear-locationbar-rtl" source: "edit-clear-locationbar-rtl"
height: Math.max(textInput.height, theme.smallIconSize) height: Math.max(textInput.height, units.iconSizes.small)
width: height width: height
opacity: (textInput.text != "" && clearButtonShown && textField.enabled) ? 1 : 0 opacity: (textInput.text != "" && clearButtonShown && textField.enabled) ? 1 : 0
Behavior on opacity { Behavior on opacity {

View File

@ -87,12 +87,12 @@ Item {
//icon + label + left margin + right margin + spacing between icon and text //icon + label + left margin + right margin + spacing between icon and text
//here it assumesleft margin = right top = bottom, why? //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 // 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 * 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: { implicitWidth: {
if (label.text.length == 0) { if (label.text.length == 0) {