summaryrefslogtreecommitdiff
path: root/src/controls/ToolButton.qml
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-03-05 18:59:26 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-05 20:26:30 +0100
commit32c3e7124c1c39712f29386c80b0de5fc0288e1e (patch)
tree5040df2ddb219e6568da5e5efc2553f8b6a166b9 /src/controls/ToolButton.qml
parentf7dda7bda2e03fd555c2aaacb2a41e21d1eb99e9 (diff)
downloadqtquickcontrols-32c3e7124c1c39712f29386c80b0de5fc0288e1e.tar.gz
Implement icons for toolbutton
Change-Id: Ie4d7a8631871702d1c028f4049709646577c7c73 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Diffstat (limited to 'src/controls/ToolButton.qml')
-rw-r--r--src/controls/ToolButton.qml16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/controls/ToolButton.qml b/src/controls/ToolButton.qml
index 6f65de3b..613f925e 100644
--- a/src/controls/ToolButton.qml
+++ b/src/controls/ToolButton.qml
@@ -62,20 +62,18 @@ import "Styles/Settings.js" as Settings
BasicButton {
id: button
- /*! The image label source. */
+ /*! The image label source as file name or resource. */
property url iconSource
+ /*! The image label source as theme name.
+ When an icon from the platform icon theme is found this takes
+ precedence over iconSource.
+ */
+ property url iconName
+
/*! The label text. */
property string text
- Image {
- id: image
- anchors.centerIn: parent
- source: button.iconSource
- width: Math.min(button.width, image.implicitWidth)
- height: Math.min(button.height, image.implicitHeight)
- fillMode: Image.PreserveAspectFit
- }
Accessible.name: text
style: Qt.createComponent(Settings.THEME_PATH + "/ToolButtonStyle.qml", button)