Changeset View
Changeset View
Standalone View
Standalone View
lookandfeel/contents/components/ActionButton.qml
Show All 24 Lines | 24 | Item { | |||
---|---|---|---|---|---|
25 | id: root | 25 | id: root | ||
26 | property alias text: label.text | 26 | property alias text: label.text | ||
27 | property alias iconSource: icon.source | 27 | property alias iconSource: icon.source | ||
28 | property alias containsMouse: mouseArea.containsMouse | 28 | property alias containsMouse: mouseArea.containsMouse | ||
29 | property alias font: label.font | 29 | property alias font: label.font | ||
30 | property alias labelRendering: label.renderType | 30 | property alias labelRendering: label.renderType | ||
31 | property alias circleOpacity: iconCircle.opacity | 31 | property alias circleOpacity: iconCircle.opacity | ||
32 | property alias circleVisiblity: iconCircle.visible | 32 | property alias circleVisiblity: iconCircle.visible | ||
33 | property int fontSize: config.fontSize | ||||
33 | readonly property bool softwareRendering: GraphicsInfo.api === GraphicsInfo.Software | 34 | readonly property bool softwareRendering: GraphicsInfo.api === GraphicsInfo.Software | ||
34 | signal clicked | 35 | signal clicked | ||
35 | 36 | | |||
36 | activeFocusOnTab: true | 37 | activeFocusOnTab: true | ||
37 | 38 | | |||
38 | property int iconSize: units.gridUnit * 3 | 39 | property int iconSize: units.gridUnit * 3 | ||
39 | 40 | | |||
40 | implicitWidth: Math.max(iconSize + units.largeSpacing * 2, label.contentWidth) | 41 | implicitWidth: Math.max(iconSize + units.largeSpacing * 2, label.contentWidth) | ||
Show All 33 Lines | 68 | PlasmaCore.IconItem { | |||
74 | height: iconSize | 75 | height: iconSize | ||
75 | 76 | | |||
76 | colorGroup: PlasmaCore.ColorScope.colorGroup | 77 | colorGroup: PlasmaCore.ColorScope.colorGroup | ||
77 | active: mouseArea.containsMouse || root.activeFocus | 78 | active: mouseArea.containsMouse || root.activeFocus | ||
78 | } | 79 | } | ||
79 | 80 | | |||
80 | PlasmaComponents.Label { | 81 | PlasmaComponents.Label { | ||
81 | id: label | 82 | id: label | ||
82 | font.pointSize: theme.defaultFont.pointSize + 1 | 83 | font.pointSize: Math.max(fontSize + 1,theme.defaultFont.pointSize + 1) | ||
83 | anchors { | 84 | anchors { | ||
84 | top: icon.bottom | 85 | top: icon.bottom | ||
85 | topMargin: (softwareRendering ? 1.5 : 1) * units.smallSpacing | 86 | topMargin: (softwareRendering ? 1.5 : 1) * units.smallSpacing | ||
86 | left: parent.left | 87 | left: parent.left | ||
87 | right: parent.right | 88 | right: parent.right | ||
88 | } | 89 | } | ||
89 | style: softwareRendering ? Text.Outline : Text.Normal | 90 | style: softwareRendering ? Text.Outline : Text.Normal | ||
90 | styleColor: softwareRendering ? PlasmaCore.ColorScope.backgroundColor : "transparent" //no outline, doesn't matter | 91 | styleColor: softwareRendering ? PlasmaCore.ColorScope.backgroundColor : "transparent" //no outline, doesn't matter | ||
Show All 21 Lines |