round only when square

This commit is contained in:
Marco Martin 2012-10-10 18:47:56 +02:00
parent 78a87b1da3
commit d8116afac3
2 changed files with 2 additions and 2 deletions

View File

@ -99,7 +99,7 @@ Item {
anchors.fill:parent
property QtObject margins: item.margins
sourceComponent: {
if (label.text.length == 0) {
if (label.text.length == 0 && button.width == button.height) {
return roundButtonComponent
} else {
return buttonComponent

View File

@ -152,7 +152,7 @@ Item {
property QtObject margins: item.margins
property string shadowState: "shadow"
sourceComponent: {
if (label.text.length == 0) {
if (label.text.length == 0 && button.width == button.height) {
return roundButtonComponent
} else {
return buttonComponent