1
0
mirror of https://github.com/KDE/latte-dock.git synced 2024-12-26 23:21:37 +03:00

basic support for no compositingActive

--this commit supports disabled compositing
but enabled for the dock a pseudo-AlwaysVisible
state in such case occurs. All hiding signals
are ignored
This commit is contained in:
Michail Vourlakos 2017-01-07 20:35:07 +02:00
parent df084b1783
commit 14e1ca01ab
3 changed files with 13 additions and 9 deletions

View File

@ -102,24 +102,24 @@ Item{
function slotMustBeHide() {
// console.log("hide....");
if(!dock.visibility.blockHiding && !dock.visibility.containsMouse) {
if(!dock.visibility.blockHiding && !dock.visibility.containsMouse && windowSystem.compositingActive) {
slidingAnimationAutoHiddenOut.init();
}
}
///test maskArea
function updateMaskArea() {
if (!windowSystem.compositingActive || !dock) {
if (!dock) {
return;
}
var localX = 0;
var localY = 0;
normalState = (root.nowDockHoveredIndex === -1) && (layoutsContainer.hoveredIndex === -1)
normalState = ((root.nowDockHoveredIndex === -1) && (layoutsContainer.hoveredIndex === -1)
&& (root.appletsAnimations === 0)
&& (root.animationsNeedBothAxis === 0) && (root.animationsNeedLength === 0)
&& (!mainLayout.animatedLength)
&& (!mainLayout.animatedLength) ) || !windowSystem.compositingActive
// debug maskArea criteria
//console.log(root.nowDockHoveredIndex + ", " + layoutsContainer.hoveredIndex + ", "
@ -144,11 +144,11 @@ Item{
tempThickness = thicknessNormalOriginal;
if (root.animationsNeedThickness > 0) {
tempThickness = thicknessMidOriginal;
tempThickness = windowSystem.compositingActive ? thicknessMidOriginal : thicknessNormalOriginal;
}
if (dock.visibility.isHidden) {
tempThickness = thicknessAutoHidden;
tempThickness = windowSystem.compositingActive ? thicknessAutoHidden : thicknessNormalOriginal;
}
//configure x,y based on plasmoid position and root.panelAlignment(Alignment)

View File

@ -133,7 +133,7 @@ DragDrop.DropArea {
layoutsContainer.height + 0.5*iconMargin : mainLayout.height + iconMargin) :
Screen.height //on unlocked state use the maximum*/
Plasmoid.backgroundHints: PlasmaCore.Types.NoBackground
Plasmoid.backgroundHints: windowSystem.compositingActive ? PlasmaCore.Types.NoBackground : PlasmaCore.Types.DefaultBackground
//// BEGIN properties in functions
property int noApplets: {
@ -970,6 +970,10 @@ DragDrop.DropArea {
////BEGIN interfaces
Latte.WindowSystem {
id:windowSystem
onCompositingActiveChanged:{
visibilityManager.updateMaskArea();
}
}
////END interfaces

View File

@ -26,9 +26,9 @@ import org.kde.plasma.core 2.0 as PlasmaCore
PlasmaCore.FrameSvgItem {
id: root
//imagePath: containment && containment.backgroundHints === PlasmaCore.Types.NoBackground ? "" : "widgets/panel-background"
imagePath: containment && containment.backgroundHints === PlasmaCore.Types.NoBackground ? "" : "widgets/panel-background"
//imagePath: "widgets/panel-background"
imagePath: ""
//imagePath: ""
prefix:""
// onRepaintNeeded: adjustPrefix();