mirror of
https://github.com/KDE/latte-dock.git
synced 2025-01-09 17:18:11 +03:00
consider preferredSize(s) only for >0 values
--do not consider preferredWidth or preferredHeight for applets when that value is <=0 otherwise that applet it may become invisible. Such case is the plasma analog clock when it is locked at a vertical dock BUG: 398098 FIXED-IN: 0.8.1
This commit is contained in:
parent
cc0e0e7c47
commit
ec0e16ca5a
@ -256,7 +256,6 @@ Item{
|
||||
}
|
||||
else{
|
||||
if(applet && (applet.Layout.minimumHeight > root.iconSize) && root.isVertical && !canBeHovered && !container.fakeIconItem){
|
||||
// return applet.Layout.minimumHeight;
|
||||
layoutHeight = applet.Layout.minimumHeight;
|
||||
} //it is used for plasmoids that need to scale only one axis... e.g. the Weather Plasmoid
|
||||
else if(applet
|
||||
@ -266,29 +265,25 @@ Item{
|
||||
&& root.isVertical
|
||||
&& !disableScaleWidth
|
||||
&& !container.fakeIconItem) {
|
||||
//&& !root.editMode ){
|
||||
|
||||
if (!container.isSpacer) {
|
||||
disableScaleHeight = true;
|
||||
}
|
||||
//this way improves performance, probably because during animation the preferred sizes update a lot
|
||||
if((applet.Layout.maximumHeight < root.iconSize)){
|
||||
layoutHeight = applet.Layout.maximumHeight;
|
||||
}
|
||||
else if (applet.Layout.minimumHeight > root.iconSize){
|
||||
} else if (applet.Layout.minimumHeight > root.iconSize){
|
||||
layoutHeight = applet.Layout.minimumHeight;
|
||||
}
|
||||
else if ((applet.Layout.preferredHeight > root.iconSize)
|
||||
|| (container.lockZoom && applet.Layout.preferredHeight !== 0 )){
|
||||
} else if ((applet.Layout.preferredHeight > root.iconSize)
|
||||
|| (container.lockZoom && applet.Layout.preferredHeight > 0 )){
|
||||
layoutHeight = applet.Layout.preferredHeight;
|
||||
}
|
||||
else{
|
||||
} else{
|
||||
layoutHeight = root.iconSize + moreHeight;
|
||||
}
|
||||
} else {
|
||||
layoutHeight = root.iconSize + moreHeight;
|
||||
}
|
||||
}
|
||||
//return root.iconSize + moreHeight;
|
||||
}
|
||||
|
||||
function updateLayoutWidth(){
|
||||
@ -310,11 +305,12 @@ Item{
|
||||
layoutWidth = applet.Layout.minimumWidth;
|
||||
} //it is used for plasmoids that need to scale only one axis... e.g. the Weather Plasmoid
|
||||
else if(applet
|
||||
&& ( (applet.Layout.maximumWidth < root.iconSize) || (applet.Layout.preferredWidth > root.iconSize))
|
||||
&& ( applet.Layout.maximumWidth < root.iconSize
|
||||
|| applet.Layout.preferredWidth > root.iconSize
|
||||
|| container.lockZoom)
|
||||
&& root.isHorizontal
|
||||
&& !disableScaleHeight
|
||||
&& !container.fakeIconItem){
|
||||
// && !root.editMode){
|
||||
|
||||
if (!container.isSpacer) {
|
||||
disableScaleWidth = true;
|
||||
@ -323,15 +319,12 @@ Item{
|
||||
if((applet.Layout.maximumWidth < root.iconSize)){
|
||||
// return applet.Layout.maximumWidth;
|
||||
layoutWidth = applet.Layout.maximumWidth;
|
||||
}
|
||||
else if (applet.Layout.minimumWidth > root.iconSize){
|
||||
} else if (applet.Layout.minimumWidth > root.iconSize){
|
||||
layoutWidth = applet.Layout.minimumWidth;
|
||||
}
|
||||
else if ((applet.Layout.preferredWidth > root.iconSize)
|
||||
|| (container.lockZoom && applet.Layout.preferredWidth !== 0 )){
|
||||
} else if ((applet.Layout.preferredWidth > root.iconSize)
|
||||
|| (container.lockZoom && applet.Layout.preferredWidth > 0 )){
|
||||
layoutWidth = applet.Layout.preferredWidth;
|
||||
}
|
||||
else{
|
||||
} else{
|
||||
layoutWidth = root.iconSize + moreWidth;
|
||||
}
|
||||
} else{
|
||||
@ -633,8 +626,8 @@ Item{
|
||||
Component.onCompleted: fixedIndex = parabolicManager.pseudoAppletIndex(index);
|
||||
|
||||
property real isValidDelayer: container.canShowAppletNumberBadge &&
|
||||
((root.showAppletsNumbers && root.unifiedGlobalShortcuts)
|
||||
|| (root.showMetaBadge && applet.id===applicationLauncherId)) ? 1 : 0
|
||||
((root.showAppletsNumbers && root.unifiedGlobalShortcuts)
|
||||
|| (root.showMetaBadge && applet.id===applicationLauncherId)) ? 1 : 0
|
||||
|
||||
Behavior on isValidDelayer {
|
||||
NumberAnimation { duration: root.durationTime*units.longDuration }
|
||||
|
Loading…
Reference in New Issue
Block a user