REFACTOR:change dock in containment to latteView

pull/3/head
Michail Vourlakos 6 years ago
parent d8621a9435
commit f84043d28e

@ -192,7 +192,7 @@ void View::init()
connect(m_contextMenu, &ViewPart::ContextMenu::menuChanged, this, &View::contextMenuIsShownChanged); connect(m_contextMenu, &ViewPart::ContextMenu::menuChanged, this, &View::contextMenuIsShownChanged);
///!!!!! ///!!!!!
rootContext()->setContextProperty(QStringLiteral("dock"), this); rootContext()->setContextProperty(QStringLiteral("latteView"), this);
auto *latteCorona = qobject_cast<Latte::Corona *>(this->corona()); auto *latteCorona = qobject_cast<Latte::Corona *>(this->corona());

@ -407,7 +407,7 @@ MouseArea {
configureButton.visible = !currentApplet.isInternalViewSplitter && (currentApplet.applet.pluginName !== root.plasmoidName) configureButton.visible = !currentApplet.isInternalViewSplitter && (currentApplet.applet.pluginName !== root.plasmoidName)
&& currentApplet.applet.action("configure") && currentApplet.applet.action("configure").enabled; && currentApplet.applet.action("configure") && currentApplet.applet.action("configure").enabled;
closeButton.visible = !currentApplet.isInternalViewSplitter && currentApplet.applet.action("remove") && currentApplet.applet.action("remove").enabled closeButton.visible = !currentApplet.isInternalViewSplitter && currentApplet.applet.action("remove") && currentApplet.applet.action("remove").enabled
&& !(currentApplet.applet.pluginName===root.plasmoidName && dock && dock.managedLayout.viewsWithTasks()===1 && dock.tasksPresent()); && !(currentApplet.applet.pluginName===root.plasmoidName && latteView && latteView.managedLayout.viewsWithTasks()===1 && latteView.tasksPresent());
lockButton.visible = !currentApplet.isInternalViewSplitter && (currentApplet.applet.pluginName !== "org.kde.plasma.systemtray") lockButton.visible = !currentApplet.isInternalViewSplitter && (currentApplet.applet.pluginName !== "org.kde.plasma.systemtray")
&& (currentApplet.applet.pluginName !== root.plasmoidName) && (currentApplet.applet.pluginName !== root.plasmoidName)
&& !currentApplet.isSeparator && !currentApplet.isSeparator

@ -51,7 +51,7 @@ Window{
} }
Text{ Text{
text: dock && dock.positioner ? dock.positioner.currentScreenName : "___" text: latteView && latteView.positioner ? latteView.positioner.currentScreenName : "___"
} }
Text{ Text{
@ -60,8 +60,8 @@ Window{
Text{ Text{
text: { text: {
if (dock && dock.screenGeometry){ if (latteView && latteView.screenGeometry){
return dock.screenGeometry.x+","+dock.screenGeometry.y+ " "+dock.screenGeometry.width+"x"+dock.screenGeometry.height; return latteView.screenGeometry.x+","+dock.screenGeometry.y+ " "+dock.screenGeometry.width+"x"+dock.screenGeometry.height;
} else { } else {
return "_,_ _x_"; return "_,_ _x_";
} }
@ -74,8 +74,8 @@ Window{
Text{ Text{
text: { text: {
if (dock) { if (latteView) {
return dock.x + "," + dock.y + " "+dock.width+ "x"+dock.height; return latteView.x + "," + latteView.y + " "+dock.width+ "x"+dock.height;
} else { } else {
return "_,_ _x_"; return "_,_ _x_";
} }
@ -88,7 +88,7 @@ Window{
Text{ Text{
text: { text: {
if (dock && dock.onPrimary) if (latteView && latteView.onPrimary)
return "Yes"; return "Yes";
else else
return "No"; return "No";
@ -149,8 +149,8 @@ Window{
Text{ Text{
text: { text: {
if (dock && dock.effects && dock.effects.mask) { if (latteView && latteView.effects && latteView.effects.mask) {
return dock.effects.mask.x +", "+ dock.effects.mask.y+" "+dock.effects.mask.width+"x"+dock.effects.mask.height; return latteView.effects.mask.x +", "+ latteView.effects.mask.y+" "+dock.effects.mask.width+"x"+dock.effects.mask.height;
} else { } else {
return "_,_ _x_"; return "_,_ _x_";
} }
@ -163,8 +163,8 @@ Window{
Text{ Text{
text: { text: {
if (dock && dock.absoluteGeometry) { if (latteView && latteView.absoluteGeometry) {
return dock.absoluteGeometry.x + ", " + dock.absoluteGeometry.y + " " + dock.absoluteGeometry.width + "x" + dock.absoluteGeometry.height; return latteView.absoluteGeometry.x + ", " + latteView.absoluteGeometry.y + " " + latteView.absoluteGeometry.width + "x" + latteView.absoluteGeometry.height;
} else { } else {
return "_,_ _x_"; return "_,_ _x_";
} }
@ -177,8 +177,8 @@ Window{
Text{ Text{
text: { text: {
if (dock && dock.localGeometry) { if (latteView && latteView.localGeometry) {
return dock.localGeometry.x + ", " + dock.localGeometry.y + " " + dock.localGeometry.width + "x" + dock.localGeometry.height; return latteView.localGeometry.x + ", " + latteView.localGeometry.y + " " + latteView.localGeometry.width + "x" + latteView.localGeometry.height;
} else { } else {
return "_,_ _x_"; return "_,_ _x_";
} }
@ -191,7 +191,7 @@ Window{
Text{ Text{
text: { text: {
if (dock && dock.effects && dock.effects.drawEffects) if (latteView && latteView.effects && latteView.effects.drawEffects)
return "Yes"; return "Yes";
else else
return "No"; return "No";
@ -204,8 +204,8 @@ Window{
Text{ Text{
text: { text: {
if (dock && dock.effects && dock.effects.rect) { if (latteView && latteView.effects && latteView.effects.rect) {
return dock.effects.rect.x + ", " + dock.effects.rect.y + " " +dock.effects.rect.width + "x" + dock.effects.rect.height; return latteView.effects.rect.x + ", " + latteView.effects.rect.y + " " +dock.effects.rect.width + "x" + latteView.effects.rect.height;
} else { } else {
return "_,_ _x_"; return "_,_ _x_";
} }
@ -226,7 +226,7 @@ Window{
Text{ Text{
text: { text: {
if (dock && dock.visibility && dock.visibility.isHidden) if (latteView && latteView.visibility && latteView.visibility.isHidden)
return "Yes"; return "Yes";
else else
return "No"; return "No";
@ -247,7 +247,7 @@ Window{
Text{ Text{
text: { text: {
if (dock && dock.visibility && dock.visibility.containsMouse) if (latteView && latteView.visibility && latteView.visibility.containsMouse)
return "Yes"; return "Yes";
else else
return "No"; return "No";
@ -337,10 +337,10 @@ Window{
Text{ Text{
text: { text: {
if (!dock || !dock.visibility) if (!latteView || !latteView.visibility)
return ""; return "";
switch(dock.visibility.mode){ switch(latteView.visibility.mode){
case Latte.Types.AlwaysVisible: case Latte.Types.AlwaysVisible:
return "Always Visible"; return "Always Visible";
break; break;
@ -361,7 +361,7 @@ Window{
break; break;
} }
return "<unknown> : " + dock.visibility.mode; return "<unknown> : " + latteView.visibility.mode;
} }
} }

@ -28,9 +28,9 @@ import org.kde.latte 0.2 as Latte
Item{ Item{
id: editVisual id: editVisual
width: root.isHorizontal ? (dock ? dock.width : root.width) : width: root.isHorizontal ? (latteView ? latteView.width : root.width) :
visibilityManager.thicknessNormalOriginal + theme.defaultFont.pixelSize visibilityManager.thicknessNormalOriginal + theme.defaultFont.pixelSize
height: root.isVertical ? (dock ? dock.height : root.height) : height: root.isVertical ? (latteView ? latteView.height : root.height) :
visibilityManager.thicknessNormalOriginal + theme.defaultFont.pixelSize visibilityManager.thicknessNormalOriginal + theme.defaultFont.pixelSize
opacity: 0 opacity: 0
@ -51,7 +51,7 @@ Item{
property rect efGeometry property rect efGeometry
property string layoutColor: root.dockManagedLayout ? root.dockManagedLayout.color : "blue" property string layoutColor: root.latteViewManagedLayout ? root.latteViewManagedLayout.color : "blue"
Item{ Item{
@ -158,9 +158,9 @@ Item{
opacity: editVisual.editStateOpacity opacity: editVisual.editStateOpacity
fillMode: Image.Tile fillMode: Image.Tile
source: hasBackground ? dock.managedLayout.background : "../icons/"+editVisual.layoutColor+"print.jpg" source: hasBackground ? latteView.managedLayout.background : "../icons/"+editVisual.layoutColor+"print.jpg"
readonly property bool hasBackground: (dock && dock.managedLayout && dock.managedLayout.background.startsWith("/")) ? readonly property bool hasBackground: (latteView && latteView.managedLayout && latteView.managedLayout.background.startsWith("/")) ?
true : false true : false
} }
@ -197,7 +197,7 @@ Item{
} }
function updateEffectsArea(){ function updateEffectsArea(){
if (!dock || state !== "edit" || !editAnimationEnded) if (!latteView || state !== "edit" || !editAnimationEnded)
return; return;
var rootGeometry = mapToItem(root, 0, 0); var rootGeometry = mapToItem(root, 0, 0);
@ -207,7 +207,7 @@ Item{
efGeometry.width = width; efGeometry.width = width;
efGeometry.height = height; efGeometry.height = height;
dock.effects.rect = efGeometry; latteView.effects.rect = efGeometry;
} }
@ -317,7 +317,7 @@ Item{
ScriptAction{ ScriptAction{
script: { script: {
//! remove kwin effects when starting the animation //! remove kwin effects when starting the animation
dock.effects.rect = Qt.rect(-1, -1, 0, 0); latteView.effects.rect = Qt.rect(-1, -1, 0, 0);
} }
} }

@ -31,7 +31,7 @@ import "../code/HeuristicTools.js" as HeuristicTools
Item{ Item{
id: layoutsContainer id: layoutsContainer
readonly property bool isHidden: root.inStartup || (dock && dock.visibility && dock.visibility.isHidden) readonly property bool isHidden: root.inStartup || (latteView && latteView.visibility && latteView.visibility.isHidden)
readonly property bool useMaxLength: (plasmoid.configuration.panelPosition === Latte.Types.Justify) readonly property bool useMaxLength: (plasmoid.configuration.panelPosition === Latte.Types.Justify)
&& ((!root.editMode && !root.behaveAsPlasmaPanel ) && ((!root.editMode && !root.behaveAsPlasmaPanel )
|| (behaveAsPlasmaPanel && root.editMode)) || (behaveAsPlasmaPanel && root.editMode))
@ -50,8 +50,8 @@ Item{
target: layoutsContainer target: layoutsContainer
property: "x" property: "x"
value: { value: {
if ( dock && root.isHorizontal && useMaxLength ){ if ( latteView && root.isHorizontal && useMaxLength ){
return ((dock.width/2) - (root.maxLength/2)); // + root.offset) return ((latteView.width/2) - (root.maxLength/2)); // + root.offset)
} else { } else {
if ((visibilityManager.inSlidingIn || visibilityManager.inSlidingOut) && root.isVertical){ if ((visibilityManager.inSlidingIn || visibilityManager.inSlidingOut) && root.isVertical){
return; return;
@ -78,8 +78,8 @@ Item{
target: layoutsContainer target: layoutsContainer
property: "y" property: "y"
value: { value: {
if ( dock && root.isVertical && useMaxLength ) { if ( latteView && root.isVertical && useMaxLength ) {
return ((dock.height/2) - (root.maxLength/2));// + root.offset); return ((latteView.height/2) - (root.maxLength/2));// + root.offset);
} else { } else {
if ((visibilityManager.inSlidingIn || visibilityManager.inSlidingOut) && root.isHorizontal){ if ((visibilityManager.inSlidingIn || visibilityManager.inSlidingOut) && root.isHorizontal){
return; return;
@ -122,7 +122,7 @@ Item{
secondHalfExited = ( (_endLayout.width + _mainLayout.width/2) >= root.maxLength/2 ); secondHalfExited = ( (_endLayout.width + _mainLayout.width/2) >= root.maxLength/2 );
} }
if (dock && ((contentsWidth >= root.maxLength) || firstHalfExited || secondHalfExited)) { if (latteView && ((contentsWidth >= root.maxLength) || firstHalfExited || secondHalfExited)) {
updateAutomaticIconSize(); updateAutomaticIconSize();
} }
@ -147,7 +147,7 @@ Item{
secondHalfExited = ( (_endLayout.height + _mainLayout.height/2) >= root.maxLength/2 ); secondHalfExited = ( (_endLayout.height + _mainLayout.height/2) >= root.maxLength/2 );
} }
if (dock && ((contentsHeight >= root.maxLength) || firstHalfExited || secondHalfExited)) { if (latteView && ((contentsHeight >= root.maxLength) || firstHalfExited || secondHalfExited)) {
updateAutomaticIconSize(); updateAutomaticIconSize();
} }

@ -153,7 +153,7 @@ Item{
return 1; return 1;
} }
enabledBorders: dock && dock.effects ? dock.effects.enabledBorders : PlasmaCore.FrameSvg.NoBorder enabledBorders: latteView && latteView.effects ? latteView.effects.enabledBorders : PlasmaCore.FrameSvg.NoBorder
//! set true by default in order to avoid crash on startup because imagePath is set to "" //! set true by default in order to avoid crash on startup because imagePath is set to ""
readonly property bool themeHasShadow: themeExtended ? themeExtended.hasShadow : true readonly property bool themeHasShadow: themeExtended ? themeExtended.hasShadow : true
@ -361,7 +361,7 @@ Item{
} }
function updateEffectsArea(){ function updateEffectsArea(){
if (!dock || root.editMode) if (!latteView || root.editMode)
return; return;
var rootGeometry = mapToItem(root, 0, 0); var rootGeometry = mapToItem(root, 0, 0);
@ -371,7 +371,7 @@ Item{
efGeometry.width = width; efGeometry.width = width;
efGeometry.height = height; efGeometry.height = height;
dock.effects.rect = efGeometry; latteView.effects.rect = efGeometry;
if (!Latte.WindowSystem.compositingActive) { if (!Latte.WindowSystem.compositingActive) {
visibilityManager.updateMaskArea(); visibilityManager.updateMaskArea();
@ -438,7 +438,7 @@ Item{
adjustPrefix(); adjustPrefix();
} }
enabledBorders: dock && dock.effects ? dock.effects.enabledBorders : PlasmaCore.FrameSvg.NoBorder enabledBorders: latteView && latteView.effects ? latteView.effects.enabledBorders : PlasmaCore.FrameSvg.NoBorder
Behavior on opacity{ Behavior on opacity{
enabled: Latte.WindowSystem.compositingActive enabled: Latte.WindowSystem.compositingActive
@ -479,7 +479,7 @@ Item{
Colorizer.CustomBackground { Colorizer.CustomBackground {
anchors.fill: solidBackground anchors.fill: solidBackground
opacity: root.forceColorizeFromActiveWindowScheme ? solidBackground.opacity : 0 opacity: root.forceColorizeFromActiveWindowScheme ? solidBackground.opacity : 0
backgroundColor: root.forceColorizeFromActiveWindowScheme ? dock.visibility.touchingWindowScheme.backgroundColor : "transparent" backgroundColor: root.forceColorizeFromActiveWindowScheme ? latteView.visibility.touchingWindowScheme.backgroundColor : "transparent"
roundness: { roundness: {
if (themeExtended) { if (themeExtended) {
switch(plasmoid.location) { switch(plasmoid.location) {

@ -41,7 +41,7 @@ MouseArea{
} }
onPressed: { onPressed: {
if (dock.visibility.activeWindowCanBeDragged()) { if (latteView.visibility.activeWindowCanBeDragged()) {
lastPressX = mouse.x; lastPressX = mouse.x;
lastPressY = mouse.y; lastPressY = mouse.y;
drawWindowTimer.start(); drawWindowTimer.start();
@ -60,7 +60,7 @@ MouseArea{
var tryDrag = mainArea.pressed && (stepX>threshold || stepY>threshold); var tryDrag = mainArea.pressed && (stepX>threshold || stepY>threshold);
if ( tryDrag && dock.visibility.activeWindowCanBeDragged()) { if ( tryDrag && latteView.visibility.activeWindowCanBeDragged()) {
drawWindowTimer.stop(); drawWindowTimer.stop();
activateDragging(); activateDragging();
} }
@ -69,13 +69,13 @@ MouseArea{
onDoubleClicked: { onDoubleClicked: {
drawWindowTimer.stop(); drawWindowTimer.stop();
restoreGrabberTimer.stop(); restoreGrabberTimer.stop();
dock.visibility.requestToggleMaximizeForActiveWindow(); latteView.visibility.requestToggleMaximizeForActiveWindow();
//tasksModel.requestToggleMaximized(tasksModel.activeTask); //tasksModel.requestToggleMaximized(tasksModel.activeTask);
} }
function activateDragging(){ function activateDragging(){
dock.disableGrabItemBehavior(); latteView.disableGrabItemBehavior();
dock.visibility.requestMoveActiveWindow(mainArea.mouseX, mainArea.mouseY); latteView.visibility.requestMoveActiveWindow(mainArea.mouseX, mainArea.mouseY);
restoreGrabberTimer.start(); restoreGrabberTimer.start();
} }
@ -83,7 +83,7 @@ MouseArea{
id: drawWindowTimer id: drawWindowTimer
interval: 500 interval: 500
onTriggered: { onTriggered: {
if (mainArea.pressed && dock.visibility.activeWindowCanBeDragged()) { if (mainArea.pressed && latteView.visibility.activeWindowCanBeDragged()) {
mainArea.activateDragging(); mainArea.activateDragging();
} }
} }
@ -93,7 +93,7 @@ MouseArea{
id: restoreGrabberTimer id: restoreGrabberTimer
interval: 50 interval: 50
onTriggered: { onTriggered: {
dock.restoreGrabItemBehavior(); latteView.restoreGrabItemBehavior();
mainArea.lastPressX = -1; mainArea.lastPressX = -1;
mainArea.lastPressY = -1; mainArea.lastPressY = -1;
} }

@ -155,7 +155,7 @@ Item{
readonly property real textColorLuma: 0.2126*textColorRs + 0.7152*textColorGs + 0.0722*textColorBs readonly property real textColorLuma: 0.2126*textColorRs + 0.7152*textColorGs + 0.0722*textColorBs
readonly property bool textColorIsDark: textColorLuma < 0.6 readonly property bool textColorIsDark: textColorLuma < 0.6
readonly property color textColor: dock && dock.managedLayout ? dock.managedLayout.textColor : "#D7E3FF" readonly property color textColor: latteView && latteView.managedLayout ? latteView.managedLayout.textColor : "#D7E3FF"
Behavior on width { Behavior on width {
NumberAnimation { NumberAnimation {

@ -25,7 +25,7 @@ import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.latte 0.2 as Latte import org.kde.latte 0.2 as Latte
MouseArea{ MouseArea{
enabled: root.editMode && !dock.visibility.isHidden enabled: root.editMode && !latteView.visibility.isHidden
cursorShape: { cursorShape: {
if (enabled) { if (enabled) {

@ -74,97 +74,97 @@ Item{
property int thicknessEditMode: thicknessNormalOriginalValue + theme.defaultFont.pixelSize + root.editShadow property int thicknessEditMode: thicknessNormalOriginalValue + theme.defaultFont.pixelSize + root.editShadow
Binding{ Binding{
target: dock target: latteView
property:"maxThickness" property:"maxThickness"
//! prevents updating window geometry during closing window in wayland and such fixes a crash //! prevents updating window geometry during closing window in wayland and such fixes a crash
when: dock && !inTempHiding && !inForceHiding when: latteView && !inTempHiding && !inForceHiding
value: thicknessZoomOriginal value: thicknessZoomOriginal
} }
Binding{ Binding{
target: dock target: latteView
property:"normalThickness" property:"normalThickness"
when: dock when: latteView
value: thicknessNormalOriginal value: thicknessNormalOriginal
} }
Binding{ Binding{
target: dock target: latteView
property: "behaveAsPlasmaPanel" property: "behaveAsPlasmaPanel"
when: dock when: latteView
value: root.editMode ? false : root.behaveAsPlasmaPanel value: root.editMode ? false : root.behaveAsPlasmaPanel
} }
Binding{ Binding{
target: dock target: latteView
property: "fontPixelSize" property: "fontPixelSize"
when: theme when: theme
value: theme.defaultFont.pixelSize value: theme.defaultFont.pixelSize
} }
Binding{ Binding{
target: dock target: latteView
property:"inEditMode" property:"inEditMode"
when: dock when: latteView
value: root.editMode value: root.editMode
} }
Binding{ Binding{
target: dock target: latteView
property: "maxLength" property: "maxLength"
when: dock when: latteView
value: root.editMode ? 1 : plasmoid.configuration.maxLength/100 value: root.editMode ? 1 : plasmoid.configuration.maxLength/100
} }
Binding{ Binding{
target: dock target: latteView
property: "offset" property: "offset"
when: dock when: latteView
value: plasmoid.configuration.offset value: plasmoid.configuration.offset
} }
Binding{ Binding{
target: dock target: latteView
property: "alignment" property: "alignment"
when: dock when: latteView
value: root.panelAlignment value: root.panelAlignment
} }
Binding{ Binding{
target: dock && dock.effects ? dock.effects : null target: latteView && latteView.effects ? latteView.effects : null
property: "backgroundOpacity" property: "backgroundOpacity"
when: dock && dock.effects when: latteView && latteView.effects
value: root.currentPanelTransparency value: root.currentPanelTransparency
} }
Binding{ Binding{
target: dock && dock.effects ? dock.effects : null target: latteView && latteView.effects ? latteView.effects : null
property: "colorizerEnabled" property: "colorizerEnabled"
when: dock && dock.effects when: latteView && latteView.effects
value: root.forceColorizer && plasmoid.configuration.solidBackgroundForMaximized value: root.forceColorizer && plasmoid.configuration.solidBackgroundForMaximized
} }
Binding{ Binding{
target: dock && dock.effects ? dock.effects : null target: latteView && latteView.effects ? latteView.effects : null
property: "drawEffects" property: "drawEffects"
when: dock && dock.effects when: latteView && latteView.effects
value: Latte.WindowSystem.compositingActive && value: Latte.WindowSystem.compositingActive &&
(((root.blurEnabled && root.useThemePanel) (((root.blurEnabled && root.useThemePanel)
|| (root.blurEnabled && root.forceSolidPanel && dock.visibility.existsWindowMaximized && Latte.WindowSystem.compositingActive)) || (root.blurEnabled && root.forceSolidPanel && latteView.visibility.existsWindowMaximized && Latte.WindowSystem.compositingActive))
&& (!root.inStartup || inForceHiding || inTempHiding)) && (!root.inStartup || inForceHiding || inTempHiding))
} }
Binding{ Binding{
target: dock && dock.effects ? dock.effects : null target: latteView && latteView.effects ? latteView.effects : null
property: "drawShadows" property: "drawShadows"
when: dock && dock.effects when: latteView && latteView.effects
value: root.drawShadowsExternal && (!root.inStartup || inForceHiding || inTempHiding) value: root.drawShadowsExternal && (!root.inStartup || inForceHiding || inTempHiding)
} }
Binding{ Binding{
target: dock && dock.effects ? dock.effects : null target: latteView && latteView.effects ? latteView.effects : null
property:"innerShadow" property:"innerShadow"
when: dock && dock.effects when: latteView && latteView.effects
value: { value: {
if (editModeVisual.editAnimationEnded && !root.behaveAsPlasmaPanel) { if (editModeVisual.editAnimationEnded && !root.behaveAsPlasmaPanel) {
return root.editShadow; return root.editShadow;
@ -175,9 +175,9 @@ Item{
} }
Binding{ Binding{
target: dock && dock.visibility ? dock.visibility : null target: latteView && latteView.visibility ? latteView.visibility : null
property: "enabledDynamicBackground" property: "enabledDynamicBackground"
when: dock && dock.visibility when: latteView && latteView.visibility
value: (root.backgroundOnlyOnMaximized value: (root.backgroundOnlyOnMaximized
|| plasmoid.configuration.solidBackgroundForMaximized || plasmoid.configuration.solidBackgroundForMaximized
|| root.disablePanelShadowMaximized) || root.disablePanelShadowMaximized)
@ -193,7 +193,7 @@ Item{
Connections{ Connections{
target: universalLayoutManager target: universalLayoutManager
onCurrentLayoutIsSwitching: { onCurrentLayoutIsSwitching: {
if (Latte.WindowSystem.compositingActive && root.dockManagedLayout && root.dockManagedLayout.name === layoutName) { if (Latte.WindowSystem.compositingActive && root.latteViewManagedLayout && root.latteViewManagedLayout.name === layoutName) {
manager.inTempHiding = true; manager.inTempHiding = true;
manager.inForceHiding = true; manager.inForceHiding = true;
root.clearZoom(); root.clearZoom();
@ -214,7 +214,7 @@ Item{
} }
function slotContainsMouseChanged() { function slotContainsMouseChanged() {
if(dock.visibility.containsMouse) { if(latteView.visibility.containsMouse) {
updateMaskArea(); updateMaskArea();
} }
} }
@ -233,8 +233,8 @@ Item{
} }
// console.log("hide...."); // console.log("hide....");
if((!slidingAnimationAutoHiddenOut.running && !dock.visibility.blockHiding if((!slidingAnimationAutoHiddenOut.running && !latteView.visibility.blockHiding
&& !dock.visibility.containsMouse) || inForceHiding) { && !latteView.visibility.containsMouse) || inForceHiding) {
slidingAnimationAutoHiddenOut.init(); slidingAnimationAutoHiddenOut.init();
} }
} }
@ -252,12 +252,12 @@ Item{
function sendHideDockDuringLocationChangeFinished(){ function sendHideDockDuringLocationChangeFinished(){
blockUpdateMask = false; blockUpdateMask = false;
dock.positioner.hideDockDuringLocationChangeFinished(); latteView.positioner.hideDockDuringLocationChangeFinished();
} }
///test maskArea ///test maskArea
function updateMaskArea() { function updateMaskArea() {
if (!dock || blockUpdateMask) { if (!latteView || blockUpdateMask) {
return; return;
} }
@ -265,12 +265,12 @@ Item{
var localY = 0; var localY = 0;
normalState = ((root.animationsNeedBothAxis === 0) && (root.animationsNeedLength === 0)) normalState = ((root.animationsNeedBothAxis === 0) && (root.animationsNeedLength === 0))
|| (dock.visibility.isHidden && !dock.visibility.containsMouse && root.animationsNeedThickness == 0); || (latteView.visibility.isHidden && !latteView.visibility.containsMouse && root.animationsNeedThickness == 0);
// debug maskArea criteria // debug maskArea criteria
if (debugMagager) { if (debugMagager) {
console.log(root.animationsNeedBothAxis + ", " + root.animationsNeedLength + ", " + console.log(root.animationsNeedBothAxis + ", " + root.animationsNeedLength + ", " +
root.animationsNeedThickness + ", " + dock.visibility.isHidden); root.animationsNeedThickness + ", " + latteView.visibility.isHidden);
if (previousNormalState !== normalState) { if (previousNormalState !== normalState) {
console.log("normal state changed to:" + normalState); console.log("normal state changed to:" + normalState);
@ -318,50 +318,50 @@ Item{
tempThickness = Latte.WindowSystem.compositingActive ? thicknessZoom : thicknessNormal; tempThickness = Latte.WindowSystem.compositingActive ? thicknessZoom : thicknessNormal;
} }
if (dock.visibility.isHidden && !slidingAnimationAutoHiddenOut.running ) { if (latteView.visibility.isHidden && !slidingAnimationAutoHiddenOut.running ) {
tempThickness = thicknessAutoHidden; tempThickness = thicknessAutoHidden;
} }
//configure x,y based on plasmoid position and root.panelAlignment(Alignment) //configure x,y based on plasmoid position and root.panelAlignment(Alignment)
if ((plasmoid.location === PlasmaCore.Types.BottomEdge) || (plasmoid.location === PlasmaCore.Types.TopEdge)) { if ((plasmoid.location === PlasmaCore.Types.BottomEdge) || (plasmoid.location === PlasmaCore.Types.TopEdge)) {
if (plasmoid.location === PlasmaCore.Types.BottomEdge) { if (plasmoid.location === PlasmaCore.Types.BottomEdge) {
localY = dock.visibility.isHidden && dock.visibility.supportsKWinEdges ? localY = latteView.visibility.isHidden && latteView.visibility.supportsKWinEdges ?
dock.height + tempThickness : dock.height - tempThickness; latteView.height + tempThickness : latteView.height - tempThickness;
} else if (plasmoid.location === PlasmaCore.Types.TopEdge) { } else if (plasmoid.location === PlasmaCore.Types.TopEdge) {
localY = dock.visibility.isHidden && dock.visibility.supportsKWinEdges ? localY = latteView.visibility.isHidden && latteView.visibility.supportsKWinEdges ?
-tempThickness : 0; -tempThickness : 0;
} }
if (noCompositingEdit) { if (noCompositingEdit) {
localX = 0; localX = 0;
} else if (plasmoid.configuration.panelPosition === Latte.Types.Justify) { } else if (plasmoid.configuration.panelPosition === Latte.Types.Justify) {
localX = (dock.width/2) - tempLength/2 + root.offset; localX = (latteView.width/2) - tempLength/2 + root.offset;
} else if (root.panelAlignment === Latte.Types.Left) { } else if (root.panelAlignment === Latte.Types.Left) {
localX = root.offset; localX = root.offset;
} else if (root.panelAlignment === Latte.Types.Center) { } else if (root.panelAlignment === Latte.Types.Center) {
localX = (dock.width/2) - tempLength/2 + root.offset; localX = (latteView.width/2) - tempLength/2 + root.offset;
} else if (root.panelAlignment === Latte.Types.Right) { } else if (root.panelAlignment === Latte.Types.Right) {
localX = dock.width - layoutsContainer.mainLayout.width - space - root.offset; localX = latteView.width - layoutsContainer.mainLayout.width - space - root.offset;
} }
} else if ((plasmoid.location === PlasmaCore.Types.LeftEdge) || (plasmoid.location === PlasmaCore.Types.RightEdge)){ } else if ((plasmoid.location === PlasmaCore.Types.LeftEdge) || (plasmoid.location === PlasmaCore.Types.RightEdge)){
if (plasmoid.location === PlasmaCore.Types.LeftEdge) { if (plasmoid.location === PlasmaCore.Types.LeftEdge) {
localX = dock.visibility.isHidden && dock.visibility.supportsKWinEdges ? localX = latteView.visibility.isHidden && latteView.visibility.supportsKWinEdges ?
-tempThickness : 0; -tempThickness : 0;
} else if (plasmoid.location === PlasmaCore.Types.RightEdge) { } else if (plasmoid.location === PlasmaCore.Types.RightEdge) {
localX = dock.visibility.isHidden && dock.visibility.supportsKWinEdges ? localX = latteView.visibility.isHidden && latteView.visibility.supportsKWinEdges ?
dock.width + tempThickness : dock.width - tempThickness; latteView.width + tempThickness : latteView.width - tempThickness;
} }
if (noCompositingEdit) { if (noCompositingEdit) {
localY = 0; localY = 0;
} else if (plasmoid.configuration.panelPosition === Latte.Types.Justify) { } else if (plasmoid.configuration.panelPosition === Latte.Types.Justify) {
localY = (dock.height/2) - tempLength/2 + root.offset; localY = (latteView.height/2) - tempLength/2 + root.offset;
} else if (root.panelAlignment === Latte.Types.Top) { } else if (root.panelAlignment === Latte.Types.Top) {
localY = root.offset; localY = root.offset;
} else if (root.panelAlignment === Latte.Types.Center) { } else if (root.panelAlignment === Latte.Types.Center) {
localY = (dock.height/2) - tempLength/2 + root.offset; localY = (latteView.height/2) - tempLength/2 + root.offset;
} else if (root.panelAlignment === Latte.Types.Bottom) { } else if (root.panelAlignment === Latte.Types.Bottom) {
localY = dock.height - layoutsContainer.mainLayout.height - space - root.offset; localY = latteView.height - layoutsContainer.mainLayout.height - space - root.offset;
} }
} }
} else { } else {
@ -378,14 +378,14 @@ Item{
tempThickness = editModeVisual.editAnimationEnded ? thicknessNormalOriginal + theme.defaultFont.pixelSize + root.editShadow : tempThickness = editModeVisual.editAnimationEnded ? thicknessNormalOriginal + theme.defaultFont.pixelSize + root.editShadow :
thicknessNormalOriginal + theme.defaultFont.pixelSize thicknessNormalOriginal + theme.defaultFont.pixelSize
if (dock.visibility.isHidden && !slidingAnimationAutoHiddenOut.running ) { if (latteView.visibility.isHidden && !slidingAnimationAutoHiddenOut.running ) {
tempThickness = thicknessAutoHidden; tempThickness = thicknessAutoHidden;
} else if (root.animationsNeedThickness > 0) { } else if (root.animationsNeedThickness > 0) {
tempThickness = thicknessZoomOriginal; tempThickness = thicknessZoomOriginal;
} }
} else{ } else{
//use all thickness space //use all thickness space
if (dock.visibility.isHidden && !slidingAnimationAutoHiddenOut.running ) { if (latteView.visibility.isHidden && !slidingAnimationAutoHiddenOut.running ) {
tempThickness = Latte.WindowSystem.compositingActive ? thicknessAutoHidden : thicknessNormalOriginal; tempThickness = Latte.WindowSystem.compositingActive ? thicknessAutoHidden : thicknessNormalOriginal;
} else { } else {
tempThickness = thicknessZoomOriginal; tempThickness = thicknessZoomOriginal;
@ -394,13 +394,13 @@ Item{
//configure the x,y position based on thickness //configure the x,y position based on thickness
if(plasmoid.location === PlasmaCore.Types.RightEdge) if(plasmoid.location === PlasmaCore.Types.RightEdge)
localX = Math.max(0,dock.width - tempThickness); localX = Math.max(0,latteView.width - tempThickness);
else if(plasmoid.location === PlasmaCore.Types.BottomEdge) else if(plasmoid.location === PlasmaCore.Types.BottomEdge)
localY = Math.max(0,dock.height - tempThickness); localY = Math.max(0,latteView.height - tempThickness);
} }
} // end of compositing calculations } // end of compositing calculations
var maskArea = dock.effects.mask; var maskArea = latteView.effects.mask;
if (Latte.WindowSystem.compositingActive) { if (Latte.WindowSystem.compositingActive) {
var maskLength = maskArea.width; //in Horizontal var maskLength = maskArea.width; //in Horizontal
@ -414,31 +414,31 @@ Item{
} }
} else { } else {
//! no compositing case //! no compositing case
if (!dock.visibility.isHidden || !dock.visibility.supportsKWinEdges) { if (!latteView.visibility.isHidden || !latteView.visibility.supportsKWinEdges) {
localX = dock.effects.rect.x; localX = latteView.effects.rect.x;
localY = dock.effects.rect.y; localY = latteView.effects.rect.y;
} else { } else {
if (plasmoid.location === PlasmaCore.Types.BottomEdge) { if (plasmoid.location === PlasmaCore.Types.BottomEdge) {
localX = dock.effects.rect.x; localX = latteView.effects.rect.x;
localY = dock.effects.rect.y+dock.effects.rect.height+thicknessAutoHidden; localY = latteView.effects.rect.y+dock.effects.rect.height+thicknessAutoHidden;
} else if (plasmoid.location === PlasmaCore.Types.TopEdge) { } else if (plasmoid.location === PlasmaCore.Types.TopEdge) {
localX = dock.effects.rect.x; localX = latteView.effects.rect.x;
localY = dock.effects.rect.y - thicknessAutoHidden; localY = latteView.effects.rect.y - thicknessAutoHidden;
} else if (plasmoid.location === PlasmaCore.Types.LeftEdge) { } else if (plasmoid.location === PlasmaCore.Types.LeftEdge) {
localX = dock.effects.rect.x - thicknessAutoHidden; localX = latteView.effects.rect.x - thicknessAutoHidden;
localY = dock.effects.rect.y; localY = latteView.effects.rect.y;
} else if (plasmoid.location === PlasmaCore.Types.RightEdge) { } else if (plasmoid.location === PlasmaCore.Types.RightEdge) {
localX = dock.effects.rect.x + dock.effects.rect.width + 1; localX = latteView.effects.rect.x + latteView.effects.rect.width + 1;
localY = dock.effects.rect.y; localY = latteView.effects.rect.y;
} }
} }
if (root.isHorizontal) { if (root.isHorizontal) {
tempThickness = dock.effects.rect.height; tempThickness = latteView.effects.rect.height;
tempLength = dock.effects.rect.width; tempLength = latteView.effects.rect.width;
} else { } else {
tempThickness = dock.effects.rect.width; tempThickness = latteView.effects.rect.width;
tempLength = dock.effects.rect.height; tempLength = latteView.effects.rect.height;
} }
} }
@ -460,12 +460,12 @@ Item{
} }
if (!Latte.WindowSystem.compositingActive) { if (!Latte.WindowSystem.compositingActive) {
dock.effects.mask = newMaskArea; latteView.effects.mask = newMaskArea;
} else { } else {
if (dock.behaveAsPlasmaPanel && !root.editMode) { if (latteView.behaveAsPlasmaPanel && !root.editMode) {
dock.effects.mask = Qt.rect(0,0,root.width,root.height); latteView.effects.mask = Qt.rect(0,0,root.width,root.height);
} else { } else {
dock.effects.mask = newMaskArea; latteView.effects.mask = newMaskArea;
} }
} }
} }
@ -473,11 +473,11 @@ Item{
//console.log("reached updating geometry ::: "+dock.maskArea); //console.log("reached updating geometry ::: "+dock.maskArea);
if(normalState){ if(normalState){
var tempGeometry = Qt.rect(dock.effects.mask.x, dock.effects.mask.y, dock.effects.mask.width, dock.effects.mask.height); var tempGeometry = Qt.rect(latteView.effects.mask.x, latteView.effects.mask.y, latteView.effects.mask.width, latteView.effects.mask.height);
//the shadows size must be removed from the maskArea //the shadows size must be removed from the maskArea
//before updating the localDockGeometry //before updating the localDockGeometry
if ((!dock.behaveAsPlasmaPanel || root.editMode) if ((!latteView.behaveAsPlasmaPanel || root.editMode)
&& Latte.WindowSystem.compositingActive) { && Latte.WindowSystem.compositingActive) {
var fixedThickness = root.realPanelThickness; var fixedThickness = root.realPanelThickness;
@ -488,24 +488,24 @@ Item{
} }
if (plasmoid.location === PlasmaCore.Types.BottomEdge) { if (plasmoid.location === PlasmaCore.Types.BottomEdge) {
tempGeometry.y = dock.height - fixedThickness; tempGeometry.y = latteView.height - fixedThickness;
} else if (plasmoid.location === PlasmaCore.Types.RightEdge) { } else if (plasmoid.location === PlasmaCore.Types.RightEdge) {
tempGeometry.x = dock.width - fixedThickness; tempGeometry.x = latteView.width - fixedThickness;
} }
//set the boundaries for dock local geometry //set the boundaries for latteView local geometry
//qBound = qMax(min, qMin(value, max)). //qBound = qMax(min, qMin(value, max)).
tempGeometry.x = Math.max(0, Math.min(tempGeometry.x, dock.width)); tempGeometry.x = Math.max(0, Math.min(tempGeometry.x, latteView.width));
tempGeometry.y = Math.max(0, Math.min(tempGeometry.y, dock.height)); tempGeometry.y = Math.max(0, Math.min(tempGeometry.y, latteView.height));
tempGeometry.width = Math.min(tempGeometry.width, dock.width); tempGeometry.width = Math.min(tempGeometry.width, latteView.width);
tempGeometry.height = Math.min(tempGeometry.height, dock.height); tempGeometry.height = Math.min(tempGeometry.height, latteView.height);
} }
//console.log("update geometry ::: "+tempGeometry); //console.log("update geometry ::: "+tempGeometry);
if (!Latte.WindowSystem.compositingActive) { if (!Latte.WindowSystem.compositingActive) {
dock.localGeometry = dock.effects.rect; latteView.localGeometry = latteView.effects.rect;
} else { } else {
dock.localGeometry = tempGeometry; latteView.localGeometry = tempGeometry;
} }
} }
@ -527,10 +527,10 @@ Item{
} }
Rectangle{ Rectangle{
x: dock ? dock.effects.mask.x : -1 x: latteView ? latteView.effects.mask.x : -1
y: dock ? dock.effects.mask.y : -1 y: latteView ? latteView.effects.mask.y : -1
height: dock ? dock.effects.mask.height : 0 height: latteView ? latteView.effects.mask.height : 0
width: dock ? dock.effects.mask.width : 0 width: latteView ? latteView.effects.mask.width : 0
border.color: "green" border.color: "green"
border.width: 1 border.width: 1
@ -571,7 +571,7 @@ Item{
ScriptAction{ ScriptAction{
script: { script: {
dock.visibility.isHidden = true; latteView.visibility.isHidden = true;
} }
} }
@ -582,7 +582,7 @@ Item{
} }
onStopped: { onStopped: {
dock.visibility.isHidden = true; latteView.visibility.isHidden = true;
if (manager.debugMagager) { if (manager.debugMagager) {
console.log("hiding animation ended..."); console.log("hiding animation ended...");
@ -596,7 +596,7 @@ Item{
} }
function init() { function init() {
if (!dock.visibility.blockHiding) if (!latteView.visibility.blockHiding)
start(); start();
} }
} }
@ -646,14 +646,14 @@ Item{
} }
function init() { function init() {
// if (!dock.visibility.blockHiding) // if (!latteView.visibility.blockHiding)
inSlidingIn = true; inSlidingIn = true;
if (slidingAnimationAutoHiddenOut.running) { if (slidingAnimationAutoHiddenOut.running) {
slidingAnimationAutoHiddenOut.stop(); slidingAnimationAutoHiddenOut.stop();
} }
dock.visibility.isHidden = false; latteView.visibility.isHidden = false;
updateMaskArea(); updateMaskArea();
start(); start();

@ -133,7 +133,7 @@ Item {
//for example the icon-only applets //for example the icon-only applets
var choords = mapToItem(container.appletWrapper, mouse.x, mouse.y); var choords = mapToItem(container.appletWrapper, mouse.x, mouse.y);
if (choords.x<0 || choords.y<0 || choords.x>=container.appletWrapper.width || choords.y>=container.appletWrapper.height) { if (choords.x<0 || choords.y<0 || choords.x>=container.appletWrapper.width || choords.y>=container.appletWrapper.height) {
dock.toggleAppletExpanded(applet.id); latteView.toggleAppletExpanded(applet.id);
} }
} }
@ -375,7 +375,7 @@ Item {
if (parabolicManager.pseudoIndexBelongsToLatteApplet(entryIndex) && container.isLattePlasmoid) { if (parabolicManager.pseudoIndexBelongsToLatteApplet(entryIndex) && container.isLattePlasmoid) {
latteApplet.activateTaskAtIndex(entryIndex - latteApplet.tasksNumbersBase); latteApplet.activateTaskAtIndex(entryIndex - latteApplet.tasksNumbersBase);
} else if (root.unifiedGlobalShortcuts && (entryIndex === parabolicManager.pseudoAppletIndex(container.index))) { } else if (root.unifiedGlobalShortcuts && (entryIndex === parabolicManager.pseudoAppletIndex(container.index))) {
dock.toggleAppletExpanded(applet.id); latteView.toggleAppletExpanded(applet.id);
} }
} }
@ -383,7 +383,7 @@ Item {
if (parabolicManager.pseudoIndexBelongsToLatteApplet(entryIndex) && container.isLattePlasmoid) { if (parabolicManager.pseudoIndexBelongsToLatteApplet(entryIndex) && container.isLattePlasmoid) {
latteApplet.newInstanceForTaskAtIndex(entryIndex - latteApplet.tasksNumbersBase); latteApplet.newInstanceForTaskAtIndex(entryIndex - latteApplet.tasksNumbersBase);
} else if (root.unifiedGlobalShortcuts && (entryIndex === parabolicManager.pseudoAppletIndex(container.index))) { } else if (root.unifiedGlobalShortcuts && (entryIndex === parabolicManager.pseudoAppletIndex(container.index))) {
dock.toggleAppletExpanded(applet.id); latteView.toggleAppletExpanded(applet.id);
} }
} }
} }
@ -617,7 +617,7 @@ Item {
root.startDirectRenderDelayerDuringEntering(); root.startDirectRenderDelayerDuringEntering();
} }
if (!(root.dockIsHidden || root.inSlidingIn || root.inSlidingOut)){ if (!(root.latteViewIsHidden || root.inSlidingIn || root.inSlidingOut)){
layoutsContainer.hoveredIndex = index; layoutsContainer.hoveredIndex = index;
} }
@ -668,7 +668,7 @@ Item {
root.startDirectRenderDelayerDuringEntering(); root.startDirectRenderDelayerDuringEntering();
} }
if (!(root.dockIsHidden || root.inSlidingIn || root.inSlidingOut)){ if (!(root.latteViewIsHidden || root.inSlidingIn || root.inSlidingOut)){
layoutsContainer.hoveredIndex = index; layoutsContainer.hoveredIndex = index;
} }
@ -714,7 +714,7 @@ Item {
onWheel: { onWheel: {
if (isSeparator || !root.mouseWheelActions || blockWheel if (isSeparator || !root.mouseWheelActions || blockWheel
|| (root.dockIsHidden || root.inSlidingIn || root.inSlidingOut)){ || (root.latteViewIsHidden || root.inSlidingIn || root.inSlidingOut)){
wheel.accepted = false; wheel.accepted = false;
return; return;
} }
@ -727,12 +727,12 @@ Item {
if (angle > 12) { if (angle > 12) {
//positive direction //positive direction
if (!isExpanded) { if (!isExpanded) {
dock.toggleAppletExpanded(applet.id); latteView.toggleAppletExpanded(applet.id);
} }
} else if (angle < -12) { } else if (angle < -12) {
//negative direction //negative direction
if (isExpanded) { if (isExpanded) {
dock.toggleAppletExpanded(applet.id); latteView.toggleAppletExpanded(applet.id);
} }
} }
} }

@ -468,7 +468,7 @@ Item{
anchors.fill: parent anchors.fill: parent
active: communicator.overlayLatteIconIsActive && applet.pluginName === "org.kde.plasma.folder" active: communicator.overlayLatteIconIsActive && applet.pluginName === "org.kde.plasma.folder"
sourceComponent: MouseArea{ sourceComponent: MouseArea{
onClicked: dock.toggleAppletExpanded(applet.id); onClicked: latteView.toggleAppletExpanded(applet.id);
} }
} }

@ -32,7 +32,7 @@ Item{
// NAME: inEditMode // NAME: inEditMode
// USAGE: read-only // USAGE: read-only
// EXPLANATION: Latte sets it to true when this applet is in a Latte containment and Latte // EXPLANATION: Latte sets it to true when this applet is in a Latte containment and Latte
// is also in EditMode, that means when the user is altering applets and Latte dock settings // is also in EditMode, that means when the user is altering applets and Latte latteView settings
// @since: 0.9 // @since: 0.9
readonly property bool inEditMode: root.editMode readonly property bool inEditMode: root.editMode

@ -56,22 +56,22 @@ Item{
property bool current: model.isCurrent property bool current: model.isCurrent
Component.onCompleted: { Component.onCompleted: {
if (dockManagedLayout && forceColorizer && dockManagedLayout.lastUsedActivity === activityId) { if (managedLayout && forceColorizer && managedLayout.lastUsedActivity === activityId) {
activitiesList.currentLayoutBackground = background; activitiesList.currentLayoutBackground = background;
} }
} }
onBackgroundChanged: { onBackgroundChanged: {
if (dockManagedLayout && forceColorizer && dockManagedLayout.lastUsedActivity === activityId) { if (managedLayout && forceColorizer && managedLayout.lastUsedActivity === activityId) {
activitiesList.currentLayoutBackground = background; activitiesList.currentLayoutBackground = background;
} }
} }
Connections{ Connections{
target: dockManagedLayout target: managedLayout
onLastUsedActivityChanged:{ onLastUsedActivityChanged:{
if (dockManagedLayout && forceColorizer && dockManagedLayout.lastUsedActivity === activityItem.activityId) { if (managedLayout && forceColorizer && managedLayout.lastUsedActivity === activityItem.activityId) {
activitiesList.currentLayoutBackground = activityItem.background; activitiesList.currentLayoutBackground = activityItem.background;
} }
} }

@ -61,36 +61,36 @@ Item{
Binding{ Binding{
target: main target: main
property: "topBorder" property: "topBorder"
when: dock when: latteView
value: { value: {
return ((dock && dock.effects && (dock.effects.enabledBorders & PlasmaCore.FrameSvg.TopBorder)) > 0); return ((latteView && latteView.effects && (latteView.effects.enabledBorders & PlasmaCore.FrameSvg.TopBorder)) > 0);
} }
} }
Binding{ Binding{
target: main target: main
property: "leftBorder" property: "leftBorder"
when: dock when: latteView
value: { value: {
return ((dock && dock.effects && (dock.effects.enabledBorders & PlasmaCore.FrameSvg.LeftBorder)) > 0); return ((latteView && latteView.effects && (latteView.effects.enabledBorders & PlasmaCore.FrameSvg.LeftBorder)) > 0);
} }
} }
Binding{ Binding{
target: main target: main
property: "bottomBorder" property: "bottomBorder"
when: dock when: latteView
value: { value: {
return ((dock && dock.effects && (dock.effects.enabledBorders & PlasmaCore.FrameSvg.BottomBorder)) > 0); return ((latteView && latteView.effects && (latteView.effects.enabledBorders & PlasmaCore.FrameSvg.BottomBorder)) > 0);
} }
} }
Binding{ Binding{
target: main target: main
property: "rightBorder" property: "rightBorder"
when: dock when: latteView
value: { value: {
return ((dock && dock.effects && (dock.effects.enabledBorders & PlasmaCore.FrameSvg.RightBorder)) > 0); return ((latteView && latteView.effects && (latteView.effects.enabledBorders & PlasmaCore.FrameSvg.RightBorder)) > 0);
} }
} }

@ -50,8 +50,8 @@ Loader{
property real currentBackgroundLuminas: item ? item.currentBackgroundLuminas : -1000 property real currentBackgroundLuminas: item ? item.currentBackgroundLuminas : -1000
property QtObject applyTheme: { property QtObject applyTheme: {
if (forceSolidnessAndColorize && dock.visibility.touchingWindowScheme) { if (forceSolidnessAndColorize && latteView.visibility.touchingWindowScheme) {
return dock.visibility.touchingWindowScheme; return latteView.visibility.touchingWindowScheme;
} }
if (themeExtended) { if (themeExtended) {

@ -38,7 +38,7 @@ import "../code/LayoutManager.js" as LayoutManager
DragDrop.DropArea { DragDrop.DropArea {
id: root id: root
objectName: "dockLayoutView" objectName: "containmentViewLayout"
LayoutMirroring.enabled: Qt.application.layoutDirection === Qt.RightToLeft && !root.isVertical LayoutMirroring.enabled: Qt.application.layoutDirection === Qt.RightToLeft && !root.isVertical
LayoutMirroring.childrenInherit: true LayoutMirroring.childrenInherit: true
@ -69,11 +69,11 @@ DragDrop.DropArea {
property bool autoDecreaseIconSize: plasmoid.configuration.autoDecreaseIconSize && !containsOnlyPlasmaTasks && layoutsContainer.fillApplets<=0 property bool autoDecreaseIconSize: plasmoid.configuration.autoDecreaseIconSize && !containsOnlyPlasmaTasks && layoutsContainer.fillApplets<=0
property bool backgroundOnlyOnMaximized: plasmoid.configuration.backgroundOnlyOnMaximized property bool backgroundOnlyOnMaximized: plasmoid.configuration.backgroundOnlyOnMaximized
property bool behaveAsPlasmaPanel: { property bool behaveAsPlasmaPanel: {
if (!dock || !dock.visibility) if (!latteView || !latteView.visibility)
return false; return false;
return (visibilityManager.panelIsBiggerFromIconSize && (zoomFactor === 1.0) return (visibilityManager.panelIsBiggerFromIconSize && (zoomFactor === 1.0)
&& (dock.visibility.mode === Latte.Types.AlwaysVisible || dock.visibility.mode === Latte.Types.WindowsGoBelow) && (latteView.visibility.mode === Latte.Types.AlwaysVisible || latteView.visibility.mode === Latte.Types.WindowsGoBelow)
&& (plasmoid.configuration.panelPosition === Latte.Types.Justify) && !(root.solidPanel && panelShadowsActive)); && (plasmoid.configuration.panelPosition === Latte.Types.Justify) && !(root.solidPanel && panelShadowsActive));
} }
@ -82,40 +82,40 @@ DragDrop.DropArea {
property bool confirmedDragEntered: false property bool confirmedDragEntered: false
property bool containsOnlyPlasmaTasks: false //this is flag to indicate when from tasks only a plasma based one is found property bool containsOnlyPlasmaTasks: false //this is flag to indicate when from tasks only a plasma based one is found
property bool dockContainsMouse: dock && dock.visibility ? dock.visibility.containsMouse : false property bool dockContainsMouse: latteView && latteView.visibility ? latteView.visibility.containsMouse : false
property bool disablePanelShadowMaximized: plasmoid.configuration.disablePanelShadowForMaximized && Latte.WindowSystem.compositingActive property bool disablePanelShadowMaximized: plasmoid.configuration.disablePanelShadowForMaximized && Latte.WindowSystem.compositingActive
property bool drawShadowsExternal: panelShadowsActive && behaveAsPlasmaPanel && !visibilityManager.inTempHiding property bool drawShadowsExternal: panelShadowsActive && behaveAsPlasmaPanel && !visibilityManager.inTempHiding
property bool editMode: editModeVisual.inEditMode property bool editMode: editModeVisual.inEditMode
property bool windowIsTouching: dock && dock.visibility && (dock.visibility.existsWindowMaximized || dock.visibility.existsWindowSnapped || hasExpandedApplet) property bool windowIsTouching: latteView && latteView.visibility && (latteView.visibility.existsWindowMaximized || latteView.visibility.existsWindowSnapped || hasExpandedApplet)
property bool forceSemiTransparentPanel: ((!plasmoid.configuration.solidBackgroundForMaximized && plasmoid.configuration.backgroundOnlyOnMaximized && windowIsTouching) property bool forceSemiTransparentPanel: ((!plasmoid.configuration.solidBackgroundForMaximized && plasmoid.configuration.backgroundOnlyOnMaximized && windowIsTouching)
|| (plasmoid.configuration.solidBackgroundForMaximized && !plasmoid.configuration.backgroundOnlyOnMaximized && !windowIsTouching)) || (plasmoid.configuration.solidBackgroundForMaximized && !plasmoid.configuration.backgroundOnlyOnMaximized && !windowIsTouching))
&& Latte.WindowSystem.compositingActive && Latte.WindowSystem.compositingActive
property bool forceSolidPanel: plasmoid.configuration.solidBackgroundForMaximized && dock && dock.visibility property bool forceSolidPanel: plasmoid.configuration.solidBackgroundForMaximized && latteView && latteView.visibility
&& Latte.WindowSystem.compositingActive && Latte.WindowSystem.compositingActive
&&(dock.visibility.existsWindowMaximized || dock.visibility.existsWindowSnapped || hasExpandedApplet &&(latteView.visibility.existsWindowMaximized || latteView.visibility.existsWindowSnapped || hasExpandedApplet
|| showAppletsNumbers || showMetaBadge) || showAppletsNumbers || showMetaBadge)
property bool forceTransparentPanel: root.backgroundOnlyOnMaximized property bool forceTransparentPanel: root.backgroundOnlyOnMaximized
&& dock && dock.visibility && latteView && latteView.visibility
&& !(dock.visibility.existsWindowMaximized || dock.visibility.existsWindowSnapped) && !(latteView.visibility.existsWindowMaximized || latteView.visibility.existsWindowSnapped)
&& Latte.WindowSystem.compositingActive && Latte.WindowSystem.compositingActive
&& !(hasExpandedApplet && zoomFactor===1 && plasmoid.configuration.panelSize===100) && !(hasExpandedApplet && zoomFactor===1 && plasmoid.configuration.panelSize===100)
property bool forceColorizer: Latte.WindowSystem.compositingActive && plasmoid.configuration.colorizeTransparentPanels property bool forceColorizer: Latte.WindowSystem.compositingActive && plasmoid.configuration.colorizeTransparentPanels
property bool forceColorizeFromActiveWindowScheme: plasmoid.configuration.colorizeFromActiveWindowScheme && !editMode property bool forceColorizeFromActiveWindowScheme: plasmoid.configuration.colorizeFromActiveWindowScheme && !editMode
&& (dock && dock.visibility && dock.visibility.touchingWindowScheme && (latteView && latteView.visibility && latteView.visibility.touchingWindowScheme
&& (dock.visibility.existsWindowMaximized || dock.visibility.existsWindowSnapped) && (latteView.visibility.existsWindowMaximized || latteView.visibility.existsWindowSnapped)
&& !hasExpandedApplet) && !hasExpandedApplet)
property bool maximizedWindowTitleBarBehavesAsPanelBackground: dock && dock.visibility property bool maximizedWindowTitleBarBehavesAsPanelBackground: latteView && latteView.visibility
&& (!plasmoid.configuration.solidBackgroundForMaximized && plasmoid.configuration.backgroundOnlyOnMaximized) && (!plasmoid.configuration.solidBackgroundForMaximized && plasmoid.configuration.backgroundOnlyOnMaximized)
&& (dock.visibility.mode === Latte.Types.WindowsGoBelow) && (latteView.visibility.mode === Latte.Types.WindowsGoBelow)
&& (plasmoid.location === PlasmaCore.Types.TopEdge) && (plasmoid.location === PlasmaCore.Types.TopEdge)
&& (!useThemePanel || panelTransparency<40) && (!useThemePanel || panelTransparency<40)
&& dock.visibility.existsWindowMaximized && latteView.visibility.existsWindowMaximized
readonly property bool hasExpandedApplet: plasmoid.applets.some(function (item) { readonly property bool hasExpandedApplet: plasmoid.applets.some(function (item) {
return (item.status >= PlasmaCore.Types.NeedsAttentionStatus && item.status !== PlasmaCore.Types.HiddenStatus return (item.status >= PlasmaCore.Types.NeedsAttentionStatus && item.status !== PlasmaCore.Types.HiddenStatus
@ -123,7 +123,7 @@ DragDrop.DropArea {
&& item.pluginName !== "org.kde.activeWindowControl"); && item.pluginName !== "org.kde.activeWindowControl");
}) })
readonly property bool hasUserSpecifiedBackground: (dock && dock.managedLayout && dock.managedLayout.background.startsWith("/")) ? readonly property bool hasUserSpecifiedBackground: (latteView && latteView.managedLayout && latteView.managedLayout.background.startsWith("/")) ?
true : false true : false
property bool dockIsShownCompletely: !(dockIsHidden || inSlidingIn || inSlidingOut) && !root.editMode property bool dockIsShownCompletely: !(dockIsHidden || inSlidingIn || inSlidingOut) && !root.editMode
@ -179,10 +179,10 @@ DragDrop.DropArea {
root.maxIconSize root.maxIconSize
property int proportionIconSize: { //icon size based on screen height property int proportionIconSize: { //icon size based on screen height
if ((plasmoid.configuration.proportionIconSize===-1) || !dock) if ((plasmoid.configuration.proportionIconSize===-1) || !latteView)
return -1; return -1;
return Math.max(16,Math.round(dock.screenGeometry.height * plasmoid.configuration.proportionIconSize/100/8)*8); return Math.max(16,Math.round(latteView.screenGeometry.height * plasmoid.configuration.proportionIconSize/100/8)*8);
} }
property int iconStep: 8 property int iconStep: 8
@ -211,7 +211,7 @@ DragDrop.DropArea {
if (( (plasmoid.configuration.panelShadows && !root.backgroundOnlyOnMaximized) if (( (plasmoid.configuration.panelShadows && !root.backgroundOnlyOnMaximized)
|| (plasmoid.configuration.panelShadows && root.backgroundOnlyOnMaximized && !root.forceTransparentPanel)) || (plasmoid.configuration.panelShadows && root.backgroundOnlyOnMaximized && !root.forceTransparentPanel))
&& !(disablePanelShadowMaximized && dock.visibility.existsWindowMaximized)) { && !(disablePanelShadowMaximized && latteView.visibility.existsWindowMaximized)) {
return true; return true;
} }
@ -260,8 +260,8 @@ DragDrop.DropArea {
property int editShadow: { property int editShadow: {
if (!Latte.WindowSystem.compositingActive) { if (!Latte.WindowSystem.compositingActive) {
return 0; return 0;
} else if (dock && dock.screenGeometry) { } else if (latteView && latteView.screenGeometry) {
return (dock.screenGeometry.height/90); return (latteView.screenGeometry.height/90);
} else { } else {
return 7; return 7;
} }
@ -346,18 +346,18 @@ DragDrop.DropArea {
property Item latteApplet property Item latteApplet
property Item parabolicManager: _parabolicManager property Item parabolicManager: _parabolicManager
property QtObject dock: null property QtObject latteView: null
property QtObject themeExtended: null property QtObject themeExtended: null
property QtObject universalSettings: null property QtObject universalSettings: null
property QtObject universalLayoutManager: null property QtObject universalLayoutManager: null
property QtObject dockManagedLayout: dock && dock.managedLayout ? dock.managedLayout : null property QtObject managedLayout: latteView && latteView.managedLayout ? latteView.managedLayout : null
// TO BE DELETED, if not needed: property int counter:0; // TO BE DELETED, if not needed: property int counter:0;
///BEGIN properties provided to Latte Plasmoid ///BEGIN properties provided to Latte Plasmoid
//shadows for applets, it should be removed as the appleitems don't need it any more //shadows for applets, it should be removed as the appleitems don't need it any more
property bool enableShadows: plasmoid.configuration.shadows || (root.forceTransparentPanel && plasmoid.configuration.shadows>0) property bool enableShadows: plasmoid.configuration.shadows || (root.forceTransparentPanel && plasmoid.configuration.shadows>0)
property bool dockIsHidden: dock ? dock.visibility.isHidden : true property bool dockIsHidden: latteView ? latteView.visibility.isHidden : true
property bool groupTasksByDefault: plasmoid.configuration.groupTasksByDefault property bool groupTasksByDefault: plasmoid.configuration.groupTasksByDefault
property bool dotsOnActive: plasmoid.configuration.dotsOnActive property bool dotsOnActive: plasmoid.configuration.dotsOnActive
property bool highlightWindows: plasmoid.configuration.highlightWindows property bool highlightWindows: plasmoid.configuration.highlightWindows
@ -397,7 +397,7 @@ DragDrop.DropArea {
property int tasksCount: latteApplet ? latteApplet.tasksCount : 0 property int tasksCount: latteApplet ? latteApplet.tasksCount : 0
property real durationTime: { property real durationTime: {
if ((dock && dock.effects && dock.effects.animationsBlocked) || !Latte.WindowSystem.compositingActive) { if ((latteView && latteView.effects && latteView.effects.animationsBlocked) || !Latte.WindowSystem.compositingActive) {
return 0; return 0;
} }
@ -412,7 +412,7 @@ DragDrop.DropArea {
return 2; return 2;
} }
property rect screenGeometry: dock ? dock.screenGeometry : plasmoid.screenGeometry property rect screenGeometry: latteView ? latteView.screenGeometry : plasmoid.screenGeometry
readonly property color minimizedDotColor: colorizerManager.minimizedDotColor readonly property color minimizedDotColor: colorizerManager.minimizedDotColor
///END properties from latteApplet ///END properties from latteApplet
@ -524,27 +524,27 @@ DragDrop.DropArea {
} }
} }
onDockChanged: { onLatteViewChanged: {
if (dock) { if (latteView) {
dock.onAddInternalViewSplitter.connect(addInternalViewSplitters); latteView.onAddInternalViewSplitter.connect(addInternalViewSplitters);
dock.onRemoveInternalViewSplitter.connect(removeInternalViewSplitters); latteView.onRemoveInternalViewSplitter.connect(removeInternalViewSplitters);
dock.onXChanged.connect(visibilityManager.updateMaskArea); latteView.onXChanged.connect(visibilityManager.updateMaskArea);
dock.onYChanged.connect(visibilityManager.updateMaskArea); latteView.onYChanged.connect(visibilityManager.updateMaskArea);
dock.onWidthChanged.connect(visibilityManager.updateMaskArea); latteView.onWidthChanged.connect(visibilityManager.updateMaskArea);
dock.onHeightChanged.connect(visibilityManager.updateMaskArea); latteView.onHeightChanged.connect(visibilityManager.updateMaskArea);
dock.positioner.hideDockDuringLocationChangeStarted.connect(visibilityManager.slotHideDockDuringLocationChange); latteView.positioner.hideDockDuringLocationChangeStarted.connect(visibilityManager.slotHideDockDuringLocationChange);
dock.positioner.showDockAfterLocationChangeFinished.connect(visibilityManager.slotShowDockAfterLocationChange); latteView.positioner.showDockAfterLocationChangeFinished.connect(visibilityManager.slotShowDockAfterLocationChange);
dock.positioner.hideDockDuringScreenChangeStarted.connect(visibilityManager.slotHideDockDuringLocationChange); latteView.positioner.hideDockDuringScreenChangeStarted.connect(visibilityManager.slotHideDockDuringLocationChange);
dock.positioner.showDockAfterScreenChangeFinished.connect(visibilityManager.slotShowDockAfterLocationChange); latteView.positioner.showDockAfterScreenChangeFinished.connect(visibilityManager.slotShowDockAfterLocationChange);
dock.positioner.hideDockDuringMovingToLayoutStarted.connect(visibilityManager.slotHideDockDuringLocationChange); latteView.positioner.hideDockDuringMovingToLayoutStarted.connect(visibilityManager.slotHideDockDuringLocationChange);
dock.positioner.showDockAfterMovingToLayoutFinished.connect(visibilityManager.slotShowDockAfterLocationChange); latteView.positioner.showDockAfterMovingToLayoutFinished.connect(visibilityManager.slotShowDockAfterLocationChange);
dock.visibility.onContainsMouseChanged.connect(visibilityManager.slotContainsMouseChanged); latteView.visibility.onContainsMouseChanged.connect(visibilityManager.slotContainsMouseChanged);
dock.visibility.onMustBeHide.connect(visibilityManager.slotMustBeHide); latteView.visibility.onMustBeHide.connect(visibilityManager.slotMustBeHide);
dock.visibility.onMustBeShown.connect(visibilityManager.slotMustBeShown); latteView.visibility.onMustBeShown.connect(visibilityManager.slotMustBeShown);
updateContainsOnlyPlasmaTasks(); updateContainsOnlyPlasmaTasks();
} }
@ -572,7 +572,7 @@ DragDrop.DropArea {
if (root.addLaunchersInTaskManager) { if (root.addLaunchersInTaskManager) {
return; return;
} }
} else if (dock.mimeContainsPlasmoid(event.mimeData, "audoban.applet.separator") } else if (latteView.mimeContainsPlasmoid(event.mimeData, "audoban.applet.separator")
&& root.latteAppletContainer.containsPos(event)) { && root.latteAppletContainer.containsPos(event)) {
confirmedDragEntered = true confirmedDragEntered = true
dndSpacer.opacity = 0; dndSpacer.opacity = 0;
@ -586,7 +586,7 @@ DragDrop.DropArea {
slotAnimationsNeedLength(1); slotAnimationsNeedLength(1);
} }
if (!latteApplet || (latteApplet && !dock.mimeContainsPlasmoid(event.mimeData, "org.kde.latte.plasmoid"))) { if (!latteApplet || (latteApplet && !latteView.mimeContainsPlasmoid(event.mimeData, "org.kde.latte.plasmoid"))) {
LayoutManager.insertAtCoordinates2(dndSpacer, event.x, event.y) LayoutManager.insertAtCoordinates2(dndSpacer, event.x, event.y)
dndSpacer.opacity = 1; dndSpacer.opacity = 1;
} }
@ -604,7 +604,7 @@ DragDrop.DropArea {
if (root.addLaunchersInTaskManager) { if (root.addLaunchersInTaskManager) {
return; return;
} }
} else if (dock.mimeContainsPlasmoid(event.mimeData, "audoban.applet.separator") } else if (latteView.mimeContainsPlasmoid(event.mimeData, "audoban.applet.separator")
&& root.latteAppletContainer.containsPos(event)) { && root.latteAppletContainer.containsPos(event)) {
confirmedDragEntered = true confirmedDragEntered = true
dndSpacer.opacity = 0; dndSpacer.opacity = 0;
@ -613,7 +613,7 @@ DragDrop.DropArea {
} }
} }
if (!latteApplet || (latteApplet && !dock.mimeContainsPlasmoid(event.mimeData, "org.kde.latte.plasmoid"))) { if (!latteApplet || (latteApplet && !latteView.mimeContainsPlasmoid(event.mimeData, "org.kde.latte.plasmoid"))) {
LayoutManager.insertAtCoordinates2(dndSpacer, event.x, event.y) LayoutManager.insertAtCoordinates2(dndSpacer, event.x, event.y)
dndSpacer.opacity = 1; dndSpacer.opacity = 1;
} }
@ -639,7 +639,7 @@ DragDrop.DropArea {
if (event.mimeData.formats.indexOf("application/x-orgkdeplasmataskmanager_taskbuttonitem") < 0) { if (event.mimeData.formats.indexOf("application/x-orgkdeplasmataskmanager_taskbuttonitem") < 0) {
if (latteApplet && latteApplet.launchersDrop(event) && root.addLaunchersInTaskManager) { if (latteApplet && latteApplet.launchersDrop(event) && root.addLaunchersInTaskManager) {
latteApplet.launchersDropped(event.mimeData.urls); latteApplet.launchersDropped(event.mimeData.urls);
} else if (!latteApplet || (latteApplet && !dock.mimeContainsPlasmoid(event.mimeData, "org.kde.latte.plasmoid"))) { } else if (!latteApplet || (latteApplet && !latteView.mimeContainsPlasmoid(event.mimeData, "org.kde.latte.plasmoid"))) {
plasmoid.processMimeData(event.mimeData, event.x, event.y); plasmoid.processMimeData(event.mimeData, event.x, event.y);
event.accept(event.proposedAction); event.accept(event.proposedAction);
} }
@ -729,26 +729,26 @@ DragDrop.DropArea {
Component.onDestruction: { Component.onDestruction: {
console.debug("Destroying Latte Dock Containment ui..."); console.debug("Destroying Latte Dock Containment ui...");
if (dock) { if (latteView) {
dock.onAddInternalViewSplitter.disconnect(addInternalViewSplitters); latteView.onAddInternalViewSplitter.disconnect(addInternalViewSplitters);
dock.onRemoveInternalViewSplitter.disconnect(removeInternalViewSplitters); latteView.onRemoveInternalViewSplitter.disconnect(removeInternalViewSplitters);
dock.onXChanged.disconnect(visibilityManager.updateMaskArea); latteView.onXChanged.disconnect(visibilityManager.updateMaskArea);
dock.onYChanged.disconnect(visibilityManager.updateMaskArea); latteView.onYChanged.disconnect(visibilityManager.updateMaskArea);
dock.onWidthChanged.disconnect(visibilityManager.updateMaskArea); latteView.onWidthChanged.disconnect(visibilityManager.updateMaskArea);
dock.onHeightChanged.disconnect(visibilityManager.updateMaskArea); latteView.onHeightChanged.disconnect(visibilityManager.updateMaskArea);
dock.positioner.hideDockDuringLocationChangeStarted.disconnect(visibilityManager.slotHideDockDuringLocationChange); latteView.positioner.hideDockDuringLocationChangeStarted.disconnect(visibilityManager.slotHideDockDuringLocationChange);
dock.positioner.showDockAfterLocationChangeFinished.disconnect(visibilityManager.slotShowDockAfterLocationChange); latteView.positioner.showDockAfterLocationChangeFinished.disconnect(visibilityManager.slotShowDockAfterLocationChange);
dock.positioner.hideDockDuringScreenChangeStarted.disconnect(visibilityManager.slotHideDockDuringLocationChange); latteView.positioner.hideDockDuringScreenChangeStarted.disconnect(visibilityManager.slotHideDockDuringLocationChange);
dock.positioner.showDockAfterScreenChangeFinished.disconnect(visibilityManager.slotShowDockAfterLocationChange); latteView.positioner.showDockAfterScreenChangeFinished.disconnect(visibilityManager.slotShowDockAfterLocationChange);
dock.positioner.hideDockDuringMovingToLayoutStarted.disconnect(visibilityManager.slotHideDockDuringLocationChange); latteView.positioner.hideDockDuringMovingToLayoutStarted.disconnect(visibilityManager.slotHideDockDuringLocationChange);
dock.positioner.showDockAfterMovingToLayoutFinished.disconnect(visibilityManager.slotShowDockAfterLocationChange); latteView.positioner.showDockAfterMovingToLayoutFinished.disconnect(visibilityManager.slotShowDockAfterLocationChange);
if (dock.visibility) { if (latteView.visibility) {
dock.visibility.onContainsMouseChanged.disconnect(visibilityManager.slotContainsMouseChanged); latteView.visibility.onContainsMouseChanged.disconnect(visibilityManager.slotContainsMouseChanged);
dock.visibility.onMustBeHide.disconnect(visibilityManager.slotMustBeHide); latteView.visibility.onMustBeHide.disconnect(visibilityManager.slotMustBeHide);
dock.visibility.onMustBeShown.disconnect(visibilityManager.slotMustBeShown); latteView.visibility.onMustBeShown.disconnect(visibilityManager.slotMustBeShown);
} }
} }
} }
@ -792,7 +792,7 @@ DragDrop.DropArea {
// console.debug("user configuring", plasmoid.userConfiguring) // console.debug("user configuring", plasmoid.userConfiguring)
if (plasmoid.userConfiguring) { if (plasmoid.userConfiguring) {
dock.setBlockHiding(true); latteView.setBlockHiding(true);
// console.log("applets------"); // console.log("applets------");
for (var i = 0; i < plasmoid.applets.length; ++i) { for (var i = 0; i < plasmoid.applets.length; ++i) {
@ -812,10 +812,10 @@ DragDrop.DropArea {
dragOverlay.visible = true; dragOverlay.visible = true;
} }
} else { } else {
dock.setBlockHiding(false); latteView.setBlockHiding(false);
if (dock.visibility.isHidden) { if (latteView.visibility.isHidden) {
dock.visibility.mustBeShown(); latteView.visibility.mustBeShown();
} }
if (dragOverlay) { if (dragOverlay) {
@ -831,7 +831,7 @@ DragDrop.DropArea {
///Set Preferred Sizes/// ///Set Preferred Sizes///
///Notice: they are set here because if they are set with a binding ///Notice: they are set here because if they are set with a binding
///they break the !immutable experience, the dock becomes too small ///they break the !immutable experience, the latteView becomes too small
///to add applets ///to add applets
if (plasmoid.immutable) { if (plasmoid.immutable) {
if(root.isHorizontal) { if(root.isHorizontal) {
@ -1018,7 +1018,7 @@ DragDrop.DropArea {
} }
function containmentActions(){ function containmentActions(){
return dock.containmentActions(); return latteView.containmentActions();
} }
function decimalToHex(d, padding) { function decimalToHex(d, padding) {
@ -1110,7 +1110,7 @@ DragDrop.DropArea {
} }
function mouseInHoverableArea() { function mouseInHoverableArea() {
return (dock.visibility.containsMouse && !rootMouseArea.containsMouse && mouseInCanBeHoveredApplet()); return (latteView.visibility.containsMouse && !rootMouseArea.containsMouse && mouseInCanBeHoveredApplet());
} }
function removeInternalViewSplitters(){ function removeInternalViewSplitters(){
@ -1231,23 +1231,23 @@ DragDrop.DropArea {
// return; // return;
// } // }
if ((step === 0) || (!dock)) { if ((step === 0) || (!latteView)) {
return; return;
} }
actionsBlockHiding = Math.max(actionsBlockHiding + step, 0); actionsBlockHiding = Math.max(actionsBlockHiding + step, 0);
if (actionsBlockHiding > 0){ if (actionsBlockHiding > 0){
dock.setBlockHiding(true); latteView.setBlockHiding(true);
} else { } else {
if (!root.editMode) if (!root.editMode)
dock.setBlockHiding(false); latteView.setBlockHiding(false);
} }
} }
function slotPreviewsShown(){ function slotPreviewsShown(){
if (dock) { if (latteView) {
dock.deactivateApplets(); latteView.deactivateApplets();
} }
} }
@ -1349,8 +1349,8 @@ DragDrop.DropArea {
} }
function updateContainsOnlyPlasmaTasks() { function updateContainsOnlyPlasmaTasks() {
if (dock) { if (latteView) {
root.containsOnlyPlasmaTasks = (dock.tasksPresent() && !dock.latteTasksPresent()); root.containsOnlyPlasmaTasks = (latteView.tasksPresent() && !latteView.latteTasksPresent());
} else { } else {
root.containsOnlyPlasmaTasks = false; root.containsOnlyPlasmaTasks = false;
} }
@ -1433,7 +1433,7 @@ DragDrop.DropArea {
} }
Connections { Connections {
target: dock target: latteView
onWidthChanged:{ onWidthChanged:{
if (root.isHorizontal && proportionIconSize!==-1) if (root.isHorizontal && proportionIconSize!==-1)
updateAutomaticIconSize(); updateAutomaticIconSize();
@ -1445,7 +1445,7 @@ DragDrop.DropArea {
} }
onContextMenuIsShownChanged: { onContextMenuIsShownChanged: {
if (!dock.contextMenuIsShown) { if (!latteView.contextMenuIsShown) {
checkRestoreZoom.start(); checkRestoreZoom.start();
} else { } else {
root.setGlobalDirectRender(false); root.setGlobalDirectRender(false);
@ -1454,7 +1454,7 @@ DragDrop.DropArea {
} }
Connections{ Connections{
target: dock && dock.visibility ? dock.visibility : root target: latteView && latteView.visibility ? latteView.visibility : root
ignoreUnknownSignals : true ignoreUnknownSignals : true
@ -1565,7 +1565,7 @@ DragDrop.DropArea {
id: showTitleTooltipTimer id: showTitleTooltipTimer
interval: 100 interval: 100
onTriggered: { onTriggered: {
if (dock && dock.visibility && dock.visibility.containsMouse) { if (latteView && latteView.visibility && latteView.visibility.containsMouse) {
titleTooltipDialog.update(); titleTooltipDialog.update();
} }
@ -1645,7 +1645,7 @@ DragDrop.DropArea {
sourceComponent: Image{ sourceComponent: Image{
anchors.fill: parent anchors.fill: parent
fillMode: Image.Tile fillMode: Image.Tile
source: root.hasUserSpecifiedBackground ? dock.managedLayout.background : "../icons/wheatprint.jpg" source: root.hasUserSpecifiedBackground ? latteView.managedLayout.background : "../icons/wheatprint.jpg"
} }
} }
@ -1735,7 +1735,7 @@ DragDrop.DropArea {
///////////////BEGIN TIMER elements ///////////////BEGIN TIMER elements
//Timer to check if the mouse is still outside the dock in order to restore zooms to 1.0 //Timer to check if the mouse is still outside the latteView in order to restore zooms to 1.0
Timer{ Timer{
id:checkRestoreZoom id:checkRestoreZoom
interval: 90 interval: 90
@ -1744,7 +1744,7 @@ DragDrop.DropArea {
if (latteApplet && (latteApplet.previewContainsMouse() || latteApplet.contextMenu)) if (latteApplet && (latteApplet.previewContainsMouse() || latteApplet.contextMenu))
return; return;
if (dock.contextMenuIsShown) if (latteView.contextMenuIsShown)
return; return;
if (!mouseInHoverableArea()) { if (!mouseInHoverableArea()) {
@ -1798,7 +1798,7 @@ DragDrop.DropArea {
onTriggered: root.updateAutomaticIconSize(); onTriggered: root.updateAutomaticIconSize();
} }
//! It is used in order to slide-in the dock on startup //! It is used in order to slide-in the latteView on startup
Timer{ Timer{
id: inStartupTimer id: inStartupTimer
interval: 1500 interval: 1500

@ -214,7 +214,7 @@ Item {
property alias tasksCount: tasksModel.count property alias tasksCount: tasksModel.count
property alias hoveredIndex: icList.hoveredIndex property alias hoveredIndex: icList.hoveredIndex
property QtObject currentLayout : latteView && latteView.dockManagedLayout ? latteView.dockManagedLayout : null property QtObject currentLayout : latteView && latteView.managedLayout ? latteView.managedLayout : null
property var badgesForActivate: latteView ? latteView.badgesForActivate : [] property var badgesForActivate: latteView ? latteView.badgesForActivate : []
property var managedLayoutName: currentLayout ? currentLayout.name : "" property var managedLayoutName: currentLayout ? currentLayout.name : ""
@ -372,12 +372,12 @@ Item {
if (currentLayout) { if (currentLayout) {
if (latteView && latteView.universalLayoutManager if (latteView && latteView.universalLayoutManager
&& latteView.dockManagedLayout && latteView.universalSettings && latteView.managedLayout && latteView.universalSettings
&& (latteView.launchersGroup === Latte.Types.LayoutLaunchers && (latteView.launchersGroup === Latte.Types.LayoutLaunchers
|| latteView.launchersGroup === Latte.Types.GlobalLaunchers)) { || latteView.launchersGroup === Latte.Types.GlobalLaunchers)) {
if (latteView.launchersGroup === Latte.Types.LayoutLaunchers) { if (latteView.launchersGroup === Latte.Types.LayoutLaunchers) {
launchersList = latteView.dockManagedLayout.launchers; launchersList = latteView.managedLayout.launchers;
} else if (latteView.launchersGroup === Latte.Types.GlobalLaunchers) { } else if (latteView.launchersGroup === Latte.Types.GlobalLaunchers) {
launchersList = latteView.universalSettings.launchers; launchersList = latteView.universalSettings.launchers;
} }
@ -680,7 +680,7 @@ Item {
&& (latteView.launchersGroup === Latte.Types.LayoutLaunchers && (latteView.launchersGroup === Latte.Types.LayoutLaunchers
|| latteView.launchersGroup === Latte.Types.GlobalLaunchers)) { || latteView.launchersGroup === Latte.Types.GlobalLaunchers)) {
if (latteView.launchersGroup === Latte.Types.LayoutLaunchers) { if (latteView.launchersGroup === Latte.Types.LayoutLaunchers) {
tasksModel.launcherList = latteView.dockManagedLayout.launchers; tasksModel.launcherList = latteView.managedLayout.launchers;
} else if (latteView.launchersGroup === Latte.Types.GlobalLaunchers) { } else if (latteView.launchersGroup === Latte.Types.GlobalLaunchers) {
tasksModel.launcherList = latteView.universalSettings.launchers; tasksModel.launcherList = latteView.universalSettings.launchers;
} }
@ -707,12 +707,12 @@ Item {
onLauncherListChanged: { onLauncherListChanged: {
if (currentLayout) { if (currentLayout) {
if (latteView && latteView.universalLayoutManager if (latteView && latteView.universalLayoutManager
&& latteView.dockManagedLayout && latteView.universalSettings && latteView.managedLayout && latteView.universalSettings
&& (latteView.launchersGroup === Latte.Types.LayoutLaunchers && (latteView.launchersGroup === Latte.Types.LayoutLaunchers
|| latteView.launchersGroup === Latte.Types.GlobalLaunchers)) { || latteView.launchersGroup === Latte.Types.GlobalLaunchers)) {
if (latteView.launchersGroup === Latte.Types.LayoutLaunchers) { if (latteView.launchersGroup === Latte.Types.LayoutLaunchers) {
latteView.dockManagedLayout.launchers = launcherList; latteView.managedLayout.launchers = launcherList;
} else if (latteView.launchersGroup === Latte.Types.GlobalLaunchers) { } else if (latteView.launchersGroup === Latte.Types.GlobalLaunchers) {
latteView.universalSettings.launchers = launcherList; latteView.universalSettings.launchers = launcherList;
} }
@ -762,7 +762,7 @@ Item {
|| latteView.launchersGroup === Latte.Types.GlobalLaunchers)) { || latteView.launchersGroup === Latte.Types.GlobalLaunchers)) {
if (latteView.launchersGroup === Latte.Types.LayoutLaunchers) { if (latteView.launchersGroup === Latte.Types.LayoutLaunchers) {
launcherList = latteView.dockManagedLayout.launchers; launcherList = latteView.managedLayout.launchers;
} else if (latteView.launchersGroup === Latte.Types.GlobalLaunchers) { } else if (latteView.launchersGroup === Latte.Types.GlobalLaunchers) {
launcherList = latteView.universalSettings.launchers; launcherList = latteView.universalSettings.launchers;
} }

@ -33,7 +33,7 @@ PlasmaCore.FrameSvgItem {
// onRepaintNeeded: adjustPrefix(); // onRepaintNeeded: adjustPrefix();
property Item containment property Item containment
property Item dockLayout property Item viewLayout
readonly property bool verticalPanel: containment && containment.formFactor === PlasmaCore.Types.Vertical readonly property bool verticalPanel: containment && containment.formFactor === PlasmaCore.Types.Vertical
@ -73,7 +73,7 @@ PlasmaCore.FrameSvgItem {
} }
Component.onDestruction: { Component.onDestruction: {
console.log("dock view qml source deleting..."); console.log("latte view qml source deleting...");
if (containment) { if (containment) {
containment.locationChanged.disconnect(adjustPrefix); containment.locationChanged.disconnect(adjustPrefix);
@ -81,11 +81,11 @@ PlasmaCore.FrameSvgItem {
} }
onContainmentChanged: { onContainmentChanged: {
console.log("dock view qml source - containment changed 1..."); console.log("latte view qml source - containment changed 1...");
if (!containment) { if (!containment) {
return; return;
} }
console.log("dock view qml source - containment changed 2..."); console.log("latte view qml source - containment changed 2...");
containment.parent = containmentParent; containment.parent = containmentParent;
containment.visible = true; containment.visible = true;
@ -94,12 +94,12 @@ PlasmaCore.FrameSvgItem {
adjustPrefix(); adjustPrefix();
for(var i=0; i<containment.children.length; ++i){ for(var i=0; i<containment.children.length; ++i){
if (containment.children[i].objectName === "dockLayoutView") { if (containment.children[i].objectName === "containmentViewLayout") {
dockLayout = containment.children[i]; viewLayout = containment.children[i];
dockLayout.dock = dock; viewLayout.latteView = latteView;
dockLayout.universalSettings = universalSettings; viewLayout.universalSettings = universalSettings;
dockLayout.universalLayoutManager = layoutManager; viewLayout.universalLayoutManager = layoutManager;
dockLayout.themeExtended = themeExtended; viewLayout.themeExtended = themeExtended;
} }
} }
} }
@ -113,8 +113,8 @@ PlasmaCore.FrameSvgItem {
//! the only way to take into account the visual appearance //! the only way to take into account the visual appearance
//! of the applet (including its spacers) //! of the applet (including its spacers)
function appletContainsPos(appletId, pos) { function appletContainsPos(appletId, pos) {
if (dockLayout) { if (viewLayout) {
return dockLayout.appletContainsPos(appletId, pos); return viewLayout.appletContainsPos(appletId, pos);
} }
return false; return false;

Loading…
Cancel
Save