[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [libkdegames/viranch/popupitem] declarativeimports/qml: Expose iconSize property to set custom size
From:       Viranch Mehta <viranch.mehta () gmail ! com>
Date:       2013-07-23 21:22:47
Message-ID: E1V1k2h-0002Ku-US () scm ! kde ! org
[Download RAW message or body]

Git commit 540f29df5ee0033817b4cd6e2b9f9508d245c12d by Viranch Mehta.
Committed on 24/04/2013 at 11:12.
Pushed by viranch into branch 'viranch/popupitem'.

Expose iconSize property to set custom size of the icon (defaults to 32)

M  +3    -2    declarativeimports/qml/PopupItem.qml

http://commits.kde.org/libkdegames/540f29df5ee0033817b4cd6e2b9f9508d245c12d

diff --git a/declarativeimports/qml/PopupItem.qml b/declarativeimports/qml/=
PopupItem.qml
index 0361320..b474228 100644
--- a/declarativeimports/qml/PopupItem.qml
+++ b/declarativeimports/qml/PopupItem.qml
@@ -26,6 +26,7 @@ Rectangle {
     property alias messageTimeout: hideTimer.interval
     property alias icon: icon.iconName
     property alias showIcon: icon.visible
+    property int iconSize: 32
     property alias hideOnMouseClick: mouseArea.enabled
     property alias sharpness: background.radius
     property alias backgroundColor: background.color
@@ -47,8 +48,8 @@ Rectangle {
         id: icon
         property string iconName: "dialog-information"
         source: "image://icon/"+iconName
-        width: visible ? 32 : 0
-        height: visible ? 32 : 0
+        width: visible ? parent.iconSize : 0
+        height: width
         anchors {
             left: parent.left
             leftMargin: parent.margin
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic