proper icon margins

This commit is contained in:
Marco Martin 2012-10-11 13:30:24 +02:00
parent 456db61aa0
commit 6209ca2527
2 changed files with 14 additions and 9 deletions

View File

@ -137,12 +137,14 @@ Item {
Component { Component {
id: roundButtonComponent id: roundButtonComponent
Item { Item {
id: roundButtonDelegate
parent: delegate
anchors.fill: parent anchors.fill: parent
property QtObject margins: QtObject { property QtObject margins: QtObject {
property int left: width/8 property int left: delegate.width/8
property int top: width/8 property int top: delegate.width/8
property int right: width/8 property int right: delegate.width/8
property int bottom: width/8 property int bottom: delegate.width/8
} }
Private.RoundShadow { Private.RoundShadow {
id: roundShadow id: roundShadow

View File

@ -163,6 +163,7 @@ Item {
Component { Component {
id: buttonComponent id: buttonComponent
Item { Item {
parent: delegate
anchors.fill: parent anchors.fill: parent
property alias margins: surface.margins property alias margins: surface.margins
Private.ButtonShadow { Private.ButtonShadow {
@ -190,12 +191,14 @@ Item {
Component { Component {
id: roundButtonComponent id: roundButtonComponent
Item { Item {
id: roundButtonDelegate
parent: delegate
anchors.fill: parent anchors.fill: parent
property QtObject margins: QtObject { property QtObject margins: QtObject {
property int left: width/8 property int left: delegate.width/8
property int top: width/8 property int top: delegate.width/8
property int right: width/8 property int right: delegate.width/8
property int bottom: width/8 property int bottom: delegate.width/8
} }
Private.RoundShadow { Private.RoundShadow {
id: roundShadow id: roundShadow