fix applets centering with new rendering

v0.6
Michail Vourlakos 8 years ago
parent 6a00fcc936
commit 9597c3c8f6

@ -352,7 +352,6 @@ Item {
property alias index: container.index property alias index: container.index
// property int pHeight: applet ? applet.Layout.preferredHeight : -10 // property int pHeight: applet ? applet.Layout.preferredHeight : -10
/*function debugLayouts(){ /*function debugLayouts(){
if(applet){ if(applet){
console.log("---------- "+ applet.pluginName +" ----------"); console.log("---------- "+ applet.pluginName +" ----------");
@ -450,8 +449,8 @@ Item {
else if(applet else if(applet
&& ( (applet.Layout.maximumHeight < root.iconSize) || (applet.Layout.preferredHeight > root.iconSize)) && ( (applet.Layout.maximumHeight < root.iconSize) || (applet.Layout.preferredHeight > root.iconSize))
&& root.isVertical && root.isVertical
&& !disableScaleWidth && !disableScaleWidth ) {
&& !root.editMode ){ //&& !root.editMode ){
disableScaleHeight = true; disableScaleHeight = true;
//this way improves performance, probably because during animation the preferred sizes update a lot //this way improves performance, probably because during animation the preferred sizes update a lot
if((applet.Layout.maximumHeight < root.iconSize)){ if((applet.Layout.maximumHeight < root.iconSize)){
@ -493,8 +492,8 @@ Item {
else if(applet else if(applet
&& ( (applet.Layout.maximumWidth < root.iconSize) || (applet.Layout.preferredWidth > root.iconSize)) && ( (applet.Layout.maximumWidth < root.iconSize) || (applet.Layout.preferredWidth > root.iconSize))
&& root.isHorizontal && root.isHorizontal
&& !disableScaleHeight && !disableScaleHeight ){
&& !root.editMode){ // && !root.editMode){
disableScaleWidth = true; disableScaleWidth = true;
//this way improves performance, probably because during animation the preferred sizes update a lot //this way improves performance, probably because during animation the preferred sizes update a lot
if((applet.Layout.maximumWidth < root.iconSize)){ if((applet.Layout.maximumWidth < root.iconSize)){
@ -536,7 +535,8 @@ Item {
AnchorChanges { AnchorChanges {
target: wrapperContainer target: wrapperContainer
anchors{ top:undefined; bottom:undefined; left:parent.left; right:undefined;} anchors{ verticalCenter:wrapper.verticalCenter; horizontalCenter:undefined;
top:undefined; bottom:undefined; left:parent.left; right:undefined;}
} }
}, },
State { State {
@ -545,7 +545,8 @@ Item {
AnchorChanges { AnchorChanges {
target: wrapperContainer target: wrapperContainer
anchors{ top:undefined; bottom:undefined; left:undefined; right:parent.right;} anchors{ verticalCenter:wrapper.verticalCenter; horizontalCenter:undefined;
top:undefined; bottom:undefined; left:undefined; right:parent.right;}
} }
}, },
State { State {
@ -554,7 +555,8 @@ Item {
AnchorChanges { AnchorChanges {
target: wrapperContainer target: wrapperContainer
anchors{ top:undefined; bottom:parent.bottom; left:undefined; right:undefined;} anchors{ verticalCenter:undefined; horizontalCenter:wrapper.horizontalCenter;
top:undefined; bottom:parent.bottom; left:undefined; right:undefined;}
} }
}, },
State { State {
@ -563,7 +565,8 @@ Item {
AnchorChanges { AnchorChanges {
target: wrapperContainer target: wrapperContainer
anchors{ top:parent.top; bottom:undefined; left:undefined; right:undefined;} anchors{ verticalCenter:undefined; horizontalCenter:wrapper.horizontalCenter;
top:parent.top; bottom:undefined; left:undefined; right:undefined;}
} }
} }
] ]

Loading…
Cancel
Save