|
|
@ -451,30 +451,30 @@ Item {
|
|
|
|
updateIndexes();
|
|
|
|
updateIndexes();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//! It is used only when the user chooses different alignment types
|
|
|
|
//! It is used only when the user chooses different alignment types and not during startup
|
|
|
|
//! and not during startup
|
|
|
|
|
|
|
|
Connections {
|
|
|
|
Connections {
|
|
|
|
target: myView
|
|
|
|
target: latteView ? latteView : null
|
|
|
|
onAlignmentChanged: {
|
|
|
|
onAlignmentChanged: {
|
|
|
|
if (!root.editMode) {
|
|
|
|
if (latteView.alignment === LatteCore.Types.NoneAlignment) {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (root.editMode){
|
|
|
|
var previousalignment = plasmoid.configuration.alignment;
|
|
|
|
if (root.myView.alignment===LatteCore.Types.Justify) {
|
|
|
|
|
|
|
|
layouter.appletsInParentChange = true;
|
|
|
|
if (latteView.alignment===LatteCore.Types.Justify && previousalignment!==LatteCore.Types.Justify) { // main -> justify
|
|
|
|
fastLayoutManager.addJustifySplittersInMainLayout();
|
|
|
|
layouter.appletsInParentChange = true;
|
|
|
|
console.log("LAYOUTS: Moving applets from MAIN to THREE Layouts mode...");
|
|
|
|
fastLayoutManager.addJustifySplittersInMainLayout();
|
|
|
|
fastLayoutManager.moveAppletsBasedOnJustifyAlignment();
|
|
|
|
console.log("LAYOUTS: Moving applets from MAIN to THREE Layouts mode...");
|
|
|
|
layouter.appletsInParentChange = false;
|
|
|
|
fastLayoutManager.moveAppletsBasedOnJustifyAlignment();
|
|
|
|
} else {
|
|
|
|
layouter.appletsInParentChange = false;
|
|
|
|
layouter.appletsInParentChange = true;
|
|
|
|
} else if (latteView.alignment!==LatteCore.Types.Justify && previousalignment===LatteCore.Types.Justify ) { // justify ->main
|
|
|
|
console.log("LAYOUTS: Moving applets from THREE to MAIN Layout mode...");
|
|
|
|
layouter.appletsInParentChange = true;
|
|
|
|
fastLayoutManager.joinLayoutsToMainLayout();
|
|
|
|
console.log("LAYOUTS: Moving applets from THREE to MAIN Layout mode...");
|
|
|
|
layouter.appletsInParentChange = false;
|
|
|
|
fastLayoutManager.joinLayoutsToMainLayout();
|
|
|
|
}
|
|
|
|
layouter.appletsInParentChange = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
plasmoid.configuration.alignment = latteView.alignment;
|
|
|
|
fastLayoutManager.save();
|
|
|
|
fastLayoutManager.save();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|