update sizes for fillWidth/Height more regular

--this way applets wont stack up in a size that is not
following panel available size and applets Layout sizes
settings
pull/3/head
Michail Vourlakos 6 years ago
parent 174c092a58
commit 78543c84e3

@ -131,7 +131,7 @@ Item{
slotAnimationsNeedLength(1);
}
HeuristicTools.updateSizeForAppletsInFill();
layoutsContainer.updateSizeForAppletsInFill();
delayUpdateMaskArea.start();
}
@ -156,7 +156,7 @@ Item{
slotAnimationsNeedLength(1);
}
HeuristicTools.updateSizeForAppletsInFill();
layoutsContainer.updateSizeForAppletsInFill();
delayUpdateMaskArea.start();
}
@ -230,9 +230,9 @@ Item{
return no;
}
onFillAppletsChanged: HeuristicTools.updateSizeForAppletsInFill();
onShownAppletsChanged: HeuristicTools.updateSizeForAppletsInFill();
onSizeWithNoFillAppletsChanged: HeuristicTools.updateSizeForAppletsInFill();
onFillAppletsChanged: layoutsContainer.updateSizeForAppletsInFill();
onShownAppletsChanged: layoutsContainer.updateSizeForAppletsInFill();
onSizeWithNoFillAppletsChanged: layoutsContainer.updateSizeForAppletsInFill();
states:[
State {
@ -357,9 +357,9 @@ Item{
return no;
}
onFillAppletsChanged: HeuristicTools.updateSizeForAppletsInFill();
onShownAppletsChanged: HeuristicTools.updateSizeForAppletsInFill();
onSizeWithNoFillAppletsChanged: HeuristicTools.updateSizeForAppletsInFill();
onFillAppletsChanged: layoutsContainer.updateSizeForAppletsInFill();
onShownAppletsChanged: layoutsContainer.updateSizeForAppletsInFill();
onSizeWithNoFillAppletsChanged: layoutsContainer.updateSizeForAppletsInFill();
transitions: Transition {
enabled: editModeVisual.plasmaEditMode
@ -623,9 +623,9 @@ Item{
return no;
}
onFillAppletsChanged: HeuristicTools.updateSizeForAppletsInFill();
onShownAppletsChanged: HeuristicTools.updateSizeForAppletsInFill();
onSizeWithNoFillAppletsChanged: HeuristicTools.updateSizeForAppletsInFill();
onFillAppletsChanged: layoutsContainer.updateSizeForAppletsInFill();
onShownAppletsChanged: layoutsContainer.updateSizeForAppletsInFill();
onSizeWithNoFillAppletsChanged: layoutsContainer.updateSizeForAppletsInFill();
states:[
State {
@ -685,6 +685,16 @@ Item{
function updateSizeForAppletsInFill() {
HeuristicTools.updateSizeForAppletsInFill();
if (!updateSizeForAppletsInFillTimer.running) {
updateSizeForAppletsInFillTimer.start();
}
}
//! This timer is needed in order to reduce the calls to heavy cpu function
//! HeuristicTools.updateSizeForAppletsInFill()
Timer{
id: updateSizeForAppletsInFillTimer
interval: 250
onTriggered: HeuristicTools.updateSizeForAppletsInFill();
}
}

@ -261,6 +261,10 @@ Item{
}
function updateLayoutHeight(){
if (container.needsFillSpace && root.isVertical) {
layoutsContainer.updateSizeForAppletsInFill();
return;
}
if (isLattePlasmoid) {
return;
@ -309,6 +313,10 @@ Item{
}
function updateLayoutWidth(){
if (needsFillSpace && root.isHorizontal) {
layoutsContainer.updateSizeForAppletsInFill();
return;
}
if (isLattePlasmoid) {
return;

Loading…
Cancel
Save