MAJOR MAJOR:splitting types to their own component

--improve types and references and add types splitted
at better places. So now we have
 - LatteCore.Types that are global for all components
 - LatteTasks.Types that are private to tasks plasmoid
 - LatteContainment.Types that are private to latte
containment
pull/15/head
Michail Vourlakos 5 years ago
parent 6e4779e6ab
commit ac99708315

@ -1,3 +1,18 @@
add_definitions(-DTRANSLATION_DOMAIN=\"plasma_applet_org.kde.latte.containment\")
configure_file(metadata.desktop.cmake ${CMAKE_CURRENT_SOURCE_DIR}/package/metadata.desktop) configure_file(metadata.desktop.cmake ${CMAKE_CURRENT_SOURCE_DIR}/package/metadata.desktop)
plasma_install_package(package org.kde.latte.containment) plasma_install_package(package org.kde.latte.containment)
set(containment_SRCS
plugin/types.cpp
plugin/lattecontainmentplugin.cpp
)
add_library(lattecontainmentplugin SHARED ${containment_SRCS})
target_link_libraries(lattecontainmentplugin
Qt5::Core
Qt5::Qml)
install(TARGETS lattecontainmentplugin DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/latte/private/containment)
install(FILES plugin/qmldir DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/latte/private/containment)

@ -188,7 +188,7 @@ function computeStep2ForLayout(layout, sizePerApplet, noOfApplets) {
//! it is used when the Centered (Main)Layout is used only or when the Main(Layout) //! it is used when the Centered (Main)Layout is used only or when the Main(Layout)
//! is empty in Justify mode //! is empty in Justify mode
function initializationPhase(availableSpace, sizePerApplet, noOfApplets){ function initializationPhase(availableSpace, sizePerApplet, noOfApplets){
if (root.panelAlignment === Latte.Types.Justify) { if (root.panelAlignment === LatteCore.Types.Justify) {
initLayoutForFillsCalculations(startLayout); initLayoutForFillsCalculations(startLayout);
initLayoutForFillsCalculations(endLayout); initLayoutForFillsCalculations(endLayout);
} }
@ -203,7 +203,7 @@ function initializationPhase(availableSpace, sizePerApplet, noOfApplets){
// console.log( " i1 : " + availableSpace + " _ " + sizePerApplet + " _ " + noOfApplets ); // console.log( " i1 : " + availableSpace + " _ " + sizePerApplet + " _ " + noOfApplets );
if (root.panelAlignment === Latte.Types.Justify) { if (root.panelAlignment === LatteCore.Types.Justify) {
res = computeStep1ForLayout(startLayout, availableSpace, sizePerApplet, noOfApplets); res = computeStep1ForLayout(startLayout, availableSpace, sizePerApplet, noOfApplets);
availableSpace = res[0]; sizePerApplet = res[1]; noOfApplets = res[2]; availableSpace = res[0]; sizePerApplet = res[1]; noOfApplets = res[2];
// console.log( " i2 : " + availableSpace + " _ " + sizePerApplet + " _ " + noOfApplets ); // console.log( " i2 : " + availableSpace + " _ " + sizePerApplet + " _ " + noOfApplets );
@ -228,7 +228,7 @@ function updateSizeForAppletsInFill() {
return; return;
// console.log("s2..."); // console.log("s2...");
if (mainLayout.shownApplets === 0 || root.panelAlignment !== Latte.Types.Justify) { if (mainLayout.shownApplets === 0 || root.panelAlignment !== LatteCore.Types.Justify) {
var availableSpace = Math.max(0, root.maxLength - startLayout.sizeWithNoFillApplets - mainLayout.sizeWithNoFillApplets - endLayout.sizeWithNoFillApplets - root.panelEdgeSpacing); var availableSpace = Math.max(0, root.maxLength - startLayout.sizeWithNoFillApplets - mainLayout.sizeWithNoFillApplets - endLayout.sizeWithNoFillApplets - root.panelEdgeSpacing);
var sizePerApplet = availableSpace / noA; var sizePerApplet = availableSpace / noA;

@ -24,7 +24,7 @@ import QtQuick.Window 2.2
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.extras 2.0 as PlasmaExtras import org.kde.plasma.extras 2.0 as PlasmaExtras
import org.kde.latte 0.2 as Latte import org.kde.latte.core 0.2 as LatteCore
Window{ Window{
width: mainGrid.width + 10 width: mainGrid.width + 10
@ -315,22 +315,22 @@ Window{
Text{ Text{
text: { text: {
switch(plasmoid.configuration.alignment){ switch(plasmoid.configuration.alignment){
case Latte.Types.Left: case LatteCore.Types.Left:
return "Left"; return "Left";
break; break;
case Latte.Types.Right: case LatteCore.Types.Right:
return "Right"; return "Right";
break; break;
case Latte.Types.Center: case LatteCore.Types.Center:
return "Center"; return "Center";
break; break;
case Latte.Types.Top: case LatteCore.Types.Top:
return "Top"; return "Top";
break; break;
case Latte.Types.Bottom: case LatteCore.Types.Bottom:
return "Bottom"; return "Bottom";
break; break;
case Latte.Types.Justify: case LatteCore.Types.Justify:
return "Justify"; return "Justify";
break; break;
} }
@ -349,40 +349,40 @@ Window{
return ""; return "";
switch(latteView.visibility.mode){ switch(latteView.visibility.mode){
case Latte.Types.AlwaysVisible: case LatteCore.Types.AlwaysVisible:
return "Always Visible"; return "Always Visible";
break; break;
case Latte.Types.AutoHide: case LatteCore.Types.AutoHide:
return "Auto Hide"; return "Auto Hide";
break; break;
case Latte.Types.DodgeActive: case LatteCore.Types.DodgeActive:
return "Dodge Active"; return "Dodge Active";
break; break;
case Latte.Types.DodgeMaximized: case LatteCore.Types.DodgeMaximized:
return "Dodge Maximized"; return "Dodge Maximized";
break; break;
case Latte.Types.DodgeAllWindows: case LatteCore.Types.DodgeAllWindows:
return "Dodge All Windows"; return "Dodge All Windows";
break; break;
case Latte.Types.DodgeAllWindows: case LatteCore.Types.DodgeAllWindows:
return "Dodge All Windows"; return "Dodge All Windows";
break; break;
case Latte.Types.WindowsGoBelow: case LatteCore.Types.WindowsGoBelow:
return "Windows Go Below"; return "Windows Go Below";
break; break;
case Latte.Types.WindowsCanCover: case LatteCore.Types.WindowsCanCover:
return "Windows Can Cover"; return "Windows Can Cover";
break; break;
case Latte.Types.WindowsAlwaysCover: case LatteCore.Types.WindowsAlwaysCover:
return "Windows Always Cover"; return "Windows Always Cover";
break; break;
case Latte.Types.SideBar: case LatteCore.Types.SideBar:
return "OnDemand SideBar"; return "OnDemand SideBar";
break; break;
case Latte.Types.NormalWindow: case LatteCore.Types.NormalWindow:
return "Normal Window"; return "Normal Window";
break; break;
case Latte.Types.None: case LatteCore.Types.None:
return "None"; return "None";
break; break;
} }

@ -22,8 +22,6 @@ import QtQuick 2.7
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.draganddrop 2.0 as DragDrop import org.kde.draganddrop 2.0 as DragDrop
import org.kde.latte 0.2 as Latte
DragDrop.DropArea { DragDrop.DropArea {
id: dragArea id: dragArea

@ -29,7 +29,6 @@ import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.kquickcontrolsaddons 2.0 import org.kde.kquickcontrolsaddons 2.0
import org.kde.latte 0.2 as Latte
import org.kde.latte.core 0.2 as LatteCore import org.kde.latte.core 0.2 as LatteCore
import "colorizer" as Colorizer import "colorizer" as Colorizer
@ -56,7 +55,7 @@ Item{
if (root.behaveAsPlasmaPanel && LatteCore.WindowSystem.compositingActive && !root.editMode) { if (root.behaveAsPlasmaPanel && LatteCore.WindowSystem.compositingActive && !root.editMode) {
return root.width; return root.width;
} else { } else {
if ((root.panelAlignment === Latte.Types.Justify) && root.isHorizontal) { if ((root.panelAlignment === LatteCore.Types.Justify) && root.isHorizontal) {
return root.maxLength; return root.maxLength;
} else { } else {
return Math.max(root.minLength, layoutsContainerItem.mainLayout.width + spacing); return Math.max(root.minLength, layoutsContainerItem.mainLayout.width + spacing);
@ -68,7 +67,7 @@ Item{
if (root.behaveAsPlasmaPanel && LatteCore.WindowSystem.compositingActive && !root.editMode) { if (root.behaveAsPlasmaPanel && LatteCore.WindowSystem.compositingActive && !root.editMode) {
return root.height; return root.height;
} else { } else {
if ((root.panelAlignment === Latte.Types.Justify) && root.isVertical) { if ((root.panelAlignment === LatteCore.Types.Justify) && root.isVertical) {
return root.maxLength; return root.maxLength;
} else { } else {
return Math.max(root.minLength, layoutsContainerItem.mainLayout.height + spacing); return Math.max(root.minLength, layoutsContainerItem.mainLayout.height + spacing);
@ -77,11 +76,11 @@ Item{
} }
property int spacing: { property int spacing: {
if (root.panelAlignment === Latte.Types.Justify && root.maxLengthPerCentage === 100) { if (root.panelAlignment === LatteCore.Types.Justify && root.maxLengthPerCentage === 100) {
return 0; return 0;
} else if (!LatteCore.WindowSystem.compositingActive) { } else if (!LatteCore.WindowSystem.compositingActive) {
return root.panelEdgeSpacing/2; return root.panelEdgeSpacing/2;
} else if (root.panelAlignment === Latte.Types.Center || root.panelAlignment === Latte.Types.Justify || root.offset!==0) { } else if (root.panelAlignment === LatteCore.Types.Center || root.panelAlignment === LatteCore.Types.Justify || root.offset!==0) {
return root.panelEdgeSpacing/2; return root.panelEdgeSpacing/2;
} else { } else {
return root.panelEdgeSpacing/4; return root.panelEdgeSpacing/4;
@ -203,9 +202,9 @@ Item{
if (imagePath === "") { if (imagePath === "") {
return 0; return 0;
} else { } else {
if (root.panelAlignment === Latte.Types.Left && root.offset===0) if (root.panelAlignment === LatteCore.Types.Left && root.offset===0)
return margins.right; return margins.right;
else if (root.panelAlignment === Latte.Types.Right && root.offset===0) else if (root.panelAlignment === LatteCore.Types.Right && root.offset===0)
return margins.left; return margins.left;
else else
return margins.left+margins.right; return margins.left+margins.right;
@ -216,9 +215,9 @@ Item{
if (imagePath === "") { if (imagePath === "") {
return 0; return 0;
} else { } else {
if (root.panelAlignment === Latte.Types.Top && root.offset===0) if (root.panelAlignment === LatteCore.Types.Top && root.offset===0)
return margins.bottom; return margins.bottom;
else if (root.panelAlignment === Latte.Types.Bottom && root.offset===0) else if (root.panelAlignment === LatteCore.Types.Bottom && root.offset===0)
return margins.top; return margins.top;
else else
return margins.top + margins.bottom; return margins.top + margins.bottom;
@ -701,7 +700,7 @@ Item{
///Left ///Left
State { State {
name: "leftCenterOrJustify" name: "leftCenterOrJustify"
when: (plasmoid.location === PlasmaCore.Types.LeftEdge)&&(root.panelAlignment === Latte.Types.Center || root.panelAlignment === Latte.Types.Justify) when: (plasmoid.location === PlasmaCore.Types.LeftEdge)&&(root.panelAlignment === LatteCore.Types.Center || root.panelAlignment === LatteCore.Types.Justify)
AnchorChanges { AnchorChanges {
target: barLine target: barLine
@ -714,13 +713,13 @@ Item{
PropertyChanges{ PropertyChanges{
target: barLine target: barLine
anchors.leftMargin: barLine.screenEdgeMargin; anchors.rightMargin:0; anchors.topMargin:0; anchors.bottomMargin:0; anchors.leftMargin: barLine.screenEdgeMargin; anchors.rightMargin:0; anchors.topMargin:0; anchors.bottomMargin:0;
anchors.horizontalCenterOffset: 0; anchors.verticalCenterOffset: (root.panelAlignment === Latte.Types.Center ? root.offset : 0); anchors.horizontalCenterOffset: 0; anchors.verticalCenterOffset: (root.panelAlignment === LatteCore.Types.Center ? root.offset : 0);
} }
}, },
///Left ///Left
State { State {
name: "leftTop" name: "leftTop"
when: (plasmoid.location === PlasmaCore.Types.LeftEdge)&&(root.panelAlignment === Latte.Types.Top) when: (plasmoid.location === PlasmaCore.Types.LeftEdge)&&(root.panelAlignment === LatteCore.Types.Top)
AnchorChanges { AnchorChanges {
target: barLine target: barLine
@ -739,7 +738,7 @@ Item{
///Left ///Left
State { State {
name: "leftBottom" name: "leftBottom"
when: (plasmoid.location === PlasmaCore.Types.LeftEdge)&&(root.panelAlignment === Latte.Types.Bottom) when: (plasmoid.location === PlasmaCore.Types.LeftEdge)&&(root.panelAlignment === LatteCore.Types.Bottom)
AnchorChanges { AnchorChanges {
target: barLine target: barLine
@ -758,7 +757,7 @@ Item{
///Right ///Right
State { State {
name: "rightCenterOrJustify" name: "rightCenterOrJustify"
when: (plasmoid.location === PlasmaCore.Types.RightEdge)&&(root.panelAlignment === Latte.Types.Center || root.panelAlignment === Latte.Types.Justify) when: (plasmoid.location === PlasmaCore.Types.RightEdge)&&(root.panelAlignment === LatteCore.Types.Center || root.panelAlignment === LatteCore.Types.Justify)
AnchorChanges { AnchorChanges {
target: barLine target: barLine
@ -771,12 +770,12 @@ Item{
PropertyChanges{ PropertyChanges{
target: barLine target: barLine
anchors.leftMargin: 0; anchors.rightMargin: barLine.screenEdgeMargin; anchors.topMargin:0; anchors.bottomMargin:0; anchors.leftMargin: 0; anchors.rightMargin: barLine.screenEdgeMargin; anchors.topMargin:0; anchors.bottomMargin:0;
anchors.horizontalCenterOffset: 0; anchors.verticalCenterOffset: (root.panelAlignment === Latte.Types.Center ? root.offset : 0); anchors.horizontalCenterOffset: 0; anchors.verticalCenterOffset: (root.panelAlignment === LatteCore.Types.Center ? root.offset : 0);
} }
}, },
State { State {
name: "rightTop" name: "rightTop"
when: (plasmoid.location === PlasmaCore.Types.RightEdge)&&(root.panelAlignment === Latte.Types.Top) when: (plasmoid.location === PlasmaCore.Types.RightEdge)&&(root.panelAlignment === LatteCore.Types.Top)
AnchorChanges { AnchorChanges {
target: barLine target: barLine
@ -794,7 +793,7 @@ Item{
}, },
State { State {
name: "rightBottom" name: "rightBottom"
when: (plasmoid.location === PlasmaCore.Types.RightEdge)&&(root.panelAlignment === Latte.Types.Bottom) when: (plasmoid.location === PlasmaCore.Types.RightEdge)&&(root.panelAlignment === LatteCore.Types.Bottom)
AnchorChanges { AnchorChanges {
target: barLine target: barLine
@ -813,7 +812,7 @@ Item{
///Bottom ///Bottom
State { State {
name: "bottomCenterOrJustify" name: "bottomCenterOrJustify"
when: (plasmoid.location === PlasmaCore.Types.BottomEdge)&&(root.panelAlignment === Latte.Types.Center || root.panelAlignment === Latte.Types.Justify) when: (plasmoid.location === PlasmaCore.Types.BottomEdge)&&(root.panelAlignment === LatteCore.Types.Center || root.panelAlignment === LatteCore.Types.Justify)
AnchorChanges { AnchorChanges {
target: barLine target: barLine
@ -826,14 +825,14 @@ Item{
PropertyChanges{ PropertyChanges{
target: barLine target: barLine
anchors.leftMargin: 0; anchors.rightMargin:0; anchors.topMargin:0; anchors.bottomMargin: barLine.screenEdgeMargin; anchors.leftMargin: 0; anchors.rightMargin:0; anchors.topMargin:0; anchors.bottomMargin: barLine.screenEdgeMargin;
anchors.horizontalCenterOffset: (root.panelAlignment === Latte.Types.Center ? root.offset : 0); anchors.verticalCenterOffset: 0; anchors.horizontalCenterOffset: (root.panelAlignment === LatteCore.Types.Center ? root.offset : 0); anchors.verticalCenterOffset: 0;
} }
}, },
State { State {
name: "bottomLeft" name: "bottomLeft"
when: (plasmoid.location === PlasmaCore.Types.BottomEdge) when: (plasmoid.location === PlasmaCore.Types.BottomEdge)
&&(((root.panelAlignment === Latte.Types.Left)&&(Qt.application.layoutDirection !== Qt.RightToLeft)) &&(((root.panelAlignment === LatteCore.Types.Left)&&(Qt.application.layoutDirection !== Qt.RightToLeft))
|| ((root.panelAlignment === Latte.Types.Right)&&(Qt.application.layoutDirection === Qt.RightToLeft))) || ((root.panelAlignment === LatteCore.Types.Right)&&(Qt.application.layoutDirection === Qt.RightToLeft)))
AnchorChanges { AnchorChanges {
target: barLine target: barLine
@ -853,8 +852,8 @@ Item{
State { State {
name: "bottomRight" name: "bottomRight"
when: (plasmoid.location === PlasmaCore.Types.BottomEdge) when: (plasmoid.location === PlasmaCore.Types.BottomEdge)
&&(((root.panelAlignment === Latte.Types.Right)&&(Qt.application.layoutDirection !== Qt.RightToLeft)) &&(((root.panelAlignment === LatteCore.Types.Right)&&(Qt.application.layoutDirection !== Qt.RightToLeft))
||((root.panelAlignment === Latte.Types.Left)&&(Qt.application.layoutDirection === Qt.RightToLeft))) ||((root.panelAlignment === LatteCore.Types.Left)&&(Qt.application.layoutDirection === Qt.RightToLeft)))
AnchorChanges { AnchorChanges {
target: barLine target: barLine
@ -873,7 +872,7 @@ Item{
///Top ///Top
State { State {
name: "topCenterOrJustify" name: "topCenterOrJustify"
when: (plasmoid.location === PlasmaCore.Types.TopEdge)&&(root.panelAlignment === Latte.Types.Center || root.panelAlignment === Latte.Types.Justify) when: (plasmoid.location === PlasmaCore.Types.TopEdge)&&(root.panelAlignment === LatteCore.Types.Center || root.panelAlignment === LatteCore.Types.Justify)
AnchorChanges { AnchorChanges {
target: barLine target: barLine
@ -886,14 +885,14 @@ Item{
PropertyChanges{ PropertyChanges{
target: barLine target: barLine
anchors.leftMargin: 0; anchors.rightMargin:0; anchors.topMargin: barLine.screenEdgeMargin; anchors.bottomMargin:0; anchors.leftMargin: 0; anchors.rightMargin:0; anchors.topMargin: barLine.screenEdgeMargin; anchors.bottomMargin:0;
anchors.horizontalCenterOffset: (root.panelAlignment === Latte.Types.Center ? root.offset : 0); anchors.verticalCenterOffset: 0; anchors.horizontalCenterOffset: (root.panelAlignment === LatteCore.Types.Center ? root.offset : 0); anchors.verticalCenterOffset: 0;
} }
}, },
State { State {
name: "topLeft" name: "topLeft"
when: (plasmoid.location === PlasmaCore.Types.TopEdge) when: (plasmoid.location === PlasmaCore.Types.TopEdge)
&&(((root.panelAlignment === Latte.Types.Left)&&(Qt.application.layoutDirection !== Qt.RightToLeft)) &&(((root.panelAlignment === LatteCore.Types.Left)&&(Qt.application.layoutDirection !== Qt.RightToLeft))
|| ((root.panelAlignment === Latte.Types.Right)&&(Qt.application.layoutDirection === Qt.RightToLeft))) || ((root.panelAlignment === LatteCore.Types.Right)&&(Qt.application.layoutDirection === Qt.RightToLeft)))
AnchorChanges { AnchorChanges {
target: barLine target: barLine
@ -912,8 +911,8 @@ Item{
State { State {
name: "topRight" name: "topRight"
when: (plasmoid.location === PlasmaCore.Types.TopEdge) when: (plasmoid.location === PlasmaCore.Types.TopEdge)
&&(((root.panelAlignment === Latte.Types.Right)&&(Qt.application.layoutDirection !== Qt.RightToLeft)) &&(((root.panelAlignment === LatteCore.Types.Right)&&(Qt.application.layoutDirection !== Qt.RightToLeft))
||((root.panelAlignment === Latte.Types.Left)&&(Qt.application.layoutDirection === Qt.RightToLeft))) ||((root.panelAlignment === LatteCore.Types.Left)&&(Qt.application.layoutDirection === Qt.RightToLeft)))
AnchorChanges { AnchorChanges {
target: barLine target: barLine

@ -23,7 +23,6 @@ import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.latte 0.2 as Latte
Item{ Item{
Component.onCompleted: { Component.onCompleted: {

@ -24,7 +24,6 @@ import QtQuick.Window 2.2
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.plasmoid 2.0 import org.kde.plasma.plasmoid 2.0
import org.kde.latte 0.2 as Latte
import org.kde.latte.core 0.2 as LatteCore import org.kde.latte.core 0.2 as LatteCore
Item{ Item{
@ -333,15 +332,15 @@ Item{
property: "enabled" property: "enabled"
when: latteView && latteView.windowsTracker && latteView.visibility when: latteView && latteView.windowsTracker && latteView.visibility
value: (latteView && latteView.visibility value: (latteView && latteView.visibility
&& !(latteView.visibility.mode === Latte.Types.AlwaysVisible /* Visibility */ && !(latteView.visibility.mode === LatteCore.Types.AlwaysVisible /* Visibility */
|| latteView.visibility.mode === Latte.Types.WindowsGoBelow || latteView.visibility.mode === LatteCore.Types.WindowsGoBelow
|| latteView.visibility.mode === Latte.Types.AutoHide)) || latteView.visibility.mode === LatteCore.Types.AutoHide))
|| root.appletsNeedWindowsTracking > 0 /*Applets Neew Windows Tracking */ || root.appletsNeedWindowsTracking > 0 /*Applets Neew Windows Tracking */
|| root.dragActiveWindowEnabled /*Dragging Active Window(Empty Areas)*/ || root.dragActiveWindowEnabled /*Dragging Active Window(Empty Areas)*/
|| ((root.backgroundOnlyOnMaximized /*Dynamic Background */ || ((root.backgroundOnlyOnMaximized /*Dynamic Background */
|| plasmoid.configuration.solidBackgroundForMaximized || plasmoid.configuration.solidBackgroundForMaximized
|| root.disablePanelShadowMaximized || root.disablePanelShadowMaximized
|| root.windowColors !== Latte.Types.NoneWindowColors)) || root.windowColors !== LatteCore.Types.NoneWindowColors))
|| (root.screenEdgeMarginsEnabled /*Dynamic Screen Edge Margin*/ || (root.screenEdgeMarginsEnabled /*Dynamic Screen Edge Margin*/
&& plasmoid.configuration.hideScreenGapForMaximized) && plasmoid.configuration.hideScreenGapForMaximized)
} }
@ -385,7 +384,7 @@ Item{
} }
function slotContainsMouseChanged() { function slotContainsMouseChanged() {
if(latteView.visibility.containsMouse && latteView.visibility.mode !== Latte.Types.SideBar) { if(latteView.visibility.containsMouse && latteView.visibility.mode !== LatteCore.Types.SideBar) {
updateMaskArea(); updateMaskArea();
if (slidingAnimationAutoHiddenOut.running && !inTempHiding && !inForceHiding) { if (slidingAnimationAutoHiddenOut.running && !inTempHiding && !inForceHiding) {
@ -396,7 +395,7 @@ Item{
function slotMustBeShown() { function slotMustBeShown() {
//! WindowsCanCover case //! WindowsCanCover case
if (latteView && latteView.visibility.mode === Latte.Types.WindowsCanCover) { if (latteView && latteView.visibility.mode === LatteCore.Types.WindowsCanCover) {
latteView.visibility.setViewOnFrontLayer(); latteView.visibility.setViewOnFrontLayer();
return; return;
} }
@ -408,7 +407,7 @@ Item{
} }
function slotMustBeHide() { function slotMustBeHide() {
if (latteView && latteView.visibility.mode === Latte.Types.WindowsCanCover) { if (latteView && latteView.visibility.mode === LatteCore.Types.WindowsCanCover) {
latteView.visibility.setViewOnBackLayer(); latteView.visibility.setViewOnBackLayer();
return; return;
} }
@ -421,7 +420,7 @@ Item{
//! Normal Dodge/AutoHide case //! Normal Dodge/AutoHide case
if((!slidingAnimationAutoHiddenOut.running if((!slidingAnimationAutoHiddenOut.running
&& !latteView.visibility.blockHiding && !latteView.visibility.blockHiding
&& (!latteView.visibility.containsMouse || latteView.visibility.mode === Latte.Types.SideBar)) && (!latteView.visibility.containsMouse || latteView.visibility.mode === LatteCore.Types.SideBar))
|| inForceHiding) { || inForceHiding) {
slidingAnimationAutoHiddenOut.init(); slidingAnimationAutoHiddenOut.init();
} }
@ -509,13 +508,13 @@ Item{
tempLength = root.isHorizontal ? root.width : root.height; tempLength = root.isHorizontal ? root.width : root.height;
} else { } else {
if(root.isHorizontal) { if(root.isHorizontal) {
if (plasmoid.configuration.alignment === Latte.Types.Justify) { if (plasmoid.configuration.alignment === LatteCore.Types.Justify) {
tempLength = layoutsContainer.width; tempLength = layoutsContainer.width;
} else { } else {
tempLength = Math.max(root.realPanelLength, layoutsContainer.mainLayout.width); tempLength = Math.max(root.realPanelLength, layoutsContainer.mainLayout.width);
} }
} else { } else {
if (plasmoid.configuration.alignment === Latte.Types.Justify) { if (plasmoid.configuration.alignment === LatteCore.Types.Justify) {
tempLength = layoutsContainer.height; tempLength = layoutsContainer.height;
} else { } else {
tempLength = Math.max(root.realPanelLength, layoutsContainer.mainLayout.height); tempLength = Math.max(root.realPanelLength, layoutsContainer.mainLayout.height);
@ -561,13 +560,13 @@ Item{
if (noCompositingEdit) { if (noCompositingEdit) {
localX = 0; localX = 0;
} else if (plasmoid.configuration.alignment === Latte.Types.Justify) { } else if (plasmoid.configuration.alignment === LatteCore.Types.Justify) {
localX = (latteView.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 === LatteCore.Types.Left) {
localX = root.offset; localX = root.offset;
} else if (root.panelAlignment === Latte.Types.Center) { } else if (root.panelAlignment === LatteCore.Types.Center) {
localX = (latteView.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 === LatteCore.Types.Right) {
localX = latteView.width - tempLength - root.offset; localX = latteView.width - tempLength - 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)){
@ -591,18 +590,18 @@ Item{
if (noCompositingEdit) { if (noCompositingEdit) {
localY = 0; localY = 0;
} else if (plasmoid.configuration.alignment === Latte.Types.Justify) { } else if (plasmoid.configuration.alignment === LatteCore.Types.Justify) {
localY = (latteView.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 === LatteCore.Types.Top) {
localY = root.offset; localY = root.offset;
} else if (root.panelAlignment === Latte.Types.Center) { } else if (root.panelAlignment === LatteCore.Types.Center) {
localY = (latteView.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 === LatteCore.Types.Bottom) {
localY = latteView.height - tempLength - root.offset; localY = latteView.height - tempLength - root.offset;
} }
} }
if (latteView.visibility.isHidden && latteView && latteView.visibility.mode === Latte.Types.SideBar) { if (latteView.visibility.isHidden && latteView && latteView.visibility.mode === LatteCore.Types.SideBar) {
//!hide completely //!hide completely
localX = -1; localX = -1;
localY = -1; localY = -1;

@ -22,7 +22,7 @@ import QtQuick 2.8
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.plasmoid 2.0 import org.kde.plasma.plasmoid 2.0
import org.kde.latte 0.2 as Latte import org.kde.latte.core 0.2 as LatteCore
Ability { Ability {
id: sizer id: sizer
@ -31,7 +31,7 @@ Ability {
// the automatic icon size algorithm should better be disabled // the automatic icon size algorithm should better be disabled
readonly property bool isActive: !root.containsOnlyPlasmaTasks readonly property bool isActive: !root.containsOnlyPlasmaTasks
&& layouts.fillApplets<=0 && layouts.fillApplets<=0
&& latteView && latteView.visibility.mode !== Latte.Types.SideBar && latteView && latteView.visibility.mode !== LatteCore.Types.SideBar
property int iconSize: -1 //it is not set, this is the default property int iconSize: -1 //it is not set, this is the default
property bool automaticSizeAnimation: false property bool automaticSizeAnimation: false
@ -162,10 +162,10 @@ Ability {
//console.log("max length: "+ maxLength); //console.log("max length: "+ maxLength);
if (root.isVertical) { if (root.isVertical) {
layoutLength = (plasmoid.configuration.alignment === Latte.Types.Justify) ? layoutLength = (plasmoid.configuration.alignment === LatteCore.Types.Justify) ?
layouts.startLayout.height+layouts.mainLayout.height+layouts.endLayout.height : layouts.mainLayout.height layouts.startLayout.height+layouts.mainLayout.height+layouts.endLayout.height : layouts.mainLayout.height
} else { } else {
layoutLength = (plasmoid.configuration.alignment === Latte.Types.Justify) ? layoutLength = (plasmoid.configuration.alignment === LatteCore.Types.Justify) ?
layouts.startLayout.width+layouts.mainLayout.width+layouts.endLayout.width : layouts.mainLayout.width layouts.startLayout.width+layouts.mainLayout.width+layouts.endLayout.width : layouts.mainLayout.width
} }

@ -27,7 +27,7 @@ import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.kquickcontrolsaddons 2.0 import org.kde.kquickcontrolsaddons 2.0
import org.kde.latte 0.2 as Latte import org.kde.latte.core 0.2 as LatteCore
import org.kde.latte.components 1.0 as LatteComponents import org.kde.latte.components 1.0 as LatteComponents
import "colorizer" as Colorizer import "colorizer" as Colorizer
@ -89,11 +89,11 @@ Item {
property bool lastChildOfEndLayout: index === layoutsContainer.endLayout.lastVisibleIndex property bool lastChildOfEndLayout: index === layoutsContainer.endLayout.lastVisibleIndex
readonly property bool atScreenEdge: { readonly property bool atScreenEdge: {
if (root.panelAlignment !== Latte.Types.Justify || root.inConfigureAppletsMode || plasmoid.configuration.offset!==0) { if (root.panelAlignment !== LatteCore.Types.Justify || root.inConfigureAppletsMode || plasmoid.configuration.offset!==0) {
return false; return false;
} }
if (root.panelAlignment === Latte.Types.Justify) { if (root.panelAlignment === LatteCore.Types.Justify) {
//! Justify case //! Justify case
if (root.maxLengthPerCentage!==100) { if (root.maxLengthPerCentage!==100) {
return false; return false;
@ -118,17 +118,17 @@ Item {
//! [disabled] because it is probably not needed at all. If in the future there is a report //! [disabled] because it is probably not needed at all. If in the future there is a report
//! describing a case that this would be useful this disablement choice can be rethought //! describing a case that this would be useful this disablement choice can be rethought
/*if (root.panelAlignment === Latte.Types.Left) { /*if (root.panelAlignment === LatteCore.Types.Left) {
//! Left case //! Left case
return firstChildOfMainLayout; return firstChildOfMainLayout;
} else if (root.panelAlignment === Latte.Types.Right) { } else if (root.panelAlignment === LatteCore.Types.Right) {
//! Right case //! Right case
return lastChildOfMainLayout return lastChildOfMainLayout
} }
if (root.panelAlignment === Latte.Types.Top) { if (root.panelAlignment === LatteCore.Types.Top) {
return firstChildOfMainLayout && latteView && latteView.y === latteView.screenGeometry.y; return firstChildOfMainLayout && latteView && latteView.y === latteView.screenGeometry.y;
} else if (root.panelAlignment === Latte.Types.Bottom) { } else if (root.panelAlignment === LatteCore.Types.Bottom) {
return lastChildOfMainLayout && latteView && ((latteView.y + latteView.height) === (latteView.screenGeometry.y + latteView.screenGeometry.height)); return lastChildOfMainLayout && latteView && ((latteView.y + latteView.height) === (latteView.screenGeometry.y + latteView.screenGeometry.height));
}*/ }*/

@ -20,7 +20,6 @@
import QtQuick 2.1 import QtQuick 2.1
import org.kde.latte 0.2 as Latte
import org.kde.latte.core 0.2 as LatteCore import org.kde.latte.core 0.2 as LatteCore
Item{ Item{

@ -26,7 +26,6 @@ import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.latte 0.2 as Latte
import org.kde.latte.core 0.2 as LatteCore import org.kde.latte.core 0.2 as LatteCore
import "../../code/MathTools.js" as MathTools import "../../code/MathTools.js" as MathTools
@ -44,7 +43,7 @@ Item{
//! width for applets that use fillWidth/fillHeight such plasma taskmanagers and AWC //! width for applets that use fillWidth/fillHeight such plasma taskmanagers and AWC
if (appletItem.needsFillSpace && root.isHorizontal) { if (appletItem.needsFillSpace && root.isHorizontal) {
if (root.panelAlignment !== Latte.Types.Justify) { if (root.panelAlignment !== LatteCore.Types.Justify) {
var maximumValue = (applet.Layout.maximumWidth === Infinity) || applet.Layout.maximumWidth === -1 ? var maximumValue = (applet.Layout.maximumWidth === Infinity) || applet.Layout.maximumWidth === -1 ?
appletItem.sizeForFill : Math.min(appletItem.sizeForFill, applet.Layout.maximumWidth); appletItem.sizeForFill : Math.min(appletItem.sizeForFill, applet.Layout.maximumWidth);
@ -79,7 +78,7 @@ Item{
//! height for applets that use fillWidth/fillHeight such plasma taskmanagers and AWC //! height for applets that use fillWidth/fillHeight such plasma taskmanagers and AWC
if (appletItem.needsFillSpace && root.isVertical) { if (appletItem.needsFillSpace && root.isVertical) {
if (root.panelAlignment !== Latte.Types.Justify) { if (root.panelAlignment !== LatteCore.Types.Justify) {
var maximumValue = (applet.Layout.maximumHeight === Infinity) || applet.Layout.maximumHeight === -1 ? var maximumValue = (applet.Layout.maximumHeight === Infinity) || applet.Layout.maximumHeight === -1 ?
appletItem.sizeForFill : Math.min(appletItem.sizeForFill, applet.Layout.maximumHeight); appletItem.sizeForFill : Math.min(appletItem.sizeForFill, applet.Layout.maximumHeight);

@ -20,7 +20,6 @@
import QtQuick 2.1 import QtQuick 2.1
import QtGraphicalEffects 1.0 import QtGraphicalEffects 1.0
import org.kde.latte 0.2 as Latte
import org.kde.latte.components 1.0 as LatteComponents import org.kde.latte.components 1.0 as LatteComponents
Loader{ Loader{

@ -19,8 +19,6 @@
import QtQuick 2.7 import QtQuick 2.7
import org.kde.latte 0.2 as Latte
Item{ Item{
id: indicatorBridge id: indicatorBridge
anchors.fill: parent anchors.fill: parent

@ -19,8 +19,6 @@
import QtQuick 2.7 import QtQuick 2.7
import org.kde.latte 0.2 as Latte
Item { Item {
id: level id: level

@ -21,8 +21,6 @@ import QtQuick 2.7
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.latte 0.2 as Latte
Loader { Loader {
id: indicatorLoader id: indicatorLoader
anchors.bottom: (plasmoid.location === PlasmaCore.Types.BottomEdge) ? parent.bottom : undefined anchors.bottom: (plasmoid.location === PlasmaCore.Types.BottomEdge) ? parent.bottom : undefined

@ -22,8 +22,6 @@ import QtQuick 2.7
import org.kde.plasma.plasmoid 2.0 import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.latte 0.2 as Latte
Item{ Item{
id: main id: main
clip: true clip: true

@ -22,7 +22,6 @@ import QtQuick 2.7
import org.kde.plasma.plasmoid 2.0 import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.latte 0.2 as Latte
import org.kde.latte.core 0.2 as LatteCore import org.kde.latte.core 0.2 as LatteCore
import "../../code/ColorizerTools.js" as ColorizerTools import "../../code/ColorizerTools.js" as ColorizerTools
@ -31,7 +30,7 @@ Loader{
id: manager id: manager
//! the loader loads the backgroundTracker component //! the loader loads the backgroundTracker component
active: root.themeColors === Latte.Types.SmartThemeColors active: root.themeColors === LatteCore.Types.SmartThemeColors
readonly property bool backgroundIsBusy: item ? item.isBusy : false readonly property bool backgroundIsBusy: item ? item.isBusy : false
@ -62,13 +61,13 @@ Loader{
readonly property color editModeTextColor: latteView && latteView.layout ? latteView.layout.textColor : "white" readonly property color editModeTextColor: latteView && latteView.layout ? latteView.layout.textColor : "white"
readonly property bool mustBeShown: (applyTheme && applyTheme !== theme) readonly property bool mustBeShown: (applyTheme && applyTheme !== theme)
|| (root.inConfigureAppletsMode && (root.themeColors === Latte.Types.SmartThemeColors)) || (root.inConfigureAppletsMode && (root.themeColors === LatteCore.Types.SmartThemeColors))
readonly property real currentBackgroundBrightness: item ? item.currentBrightness : -1000 readonly property real currentBackgroundBrightness: item ? item.currentBrightness : -1000
readonly property bool applyingWindowColors: (root.windowColors === Latte.Types.ActiveWindowColors && latteView && latteView.windowsTracker readonly property bool applyingWindowColors: (root.windowColors === LatteCore.Types.ActiveWindowColors && latteView && latteView.windowsTracker
&& selectedWindowsTracker.activeWindowScheme) && selectedWindowsTracker.activeWindowScheme)
|| (root.windowColors === Latte.Types.TouchingWindowColors && latteView && latteView.windowsTracker || (root.windowColors === LatteCore.Types.TouchingWindowColors && latteView && latteView.windowsTracker
&& latteView.windowsTracker.currentScreen.touchingWindowScheme) && latteView.windowsTracker.currentScreen.touchingWindowScheme)
property QtObject applyTheme: { property QtObject applyTheme: {
@ -77,11 +76,11 @@ Loader{
} }
if (latteView && latteView.windowsTracker && !root.hasExpandedApplet) { if (latteView && latteView.windowsTracker && !root.hasExpandedApplet) {
if (root.windowColors === Latte.Types.ActiveWindowColors && selectedWindowsTracker.activeWindowScheme) { if (root.windowColors === LatteCore.Types.ActiveWindowColors && selectedWindowsTracker.activeWindowScheme) {
return selectedWindowsTracker.activeWindowScheme; return selectedWindowsTracker.activeWindowScheme;
} }
if (root.windowColors === Latte.Types.TouchingWindowColors && latteView.windowsTracker.currentScreen.touchingWindowScheme) { if (root.windowColors === LatteCore.Types.TouchingWindowColors && latteView.windowsTracker.currentScreen.touchingWindowScheme) {
//! we must track touching windows and when they are not ative //! we must track touching windows and when they are not ative
//! the active window scheme is used for convenience //! the active window scheme is used for convenience
if (latteView.windowsTracker.currentScreen.existsWindowTouching if (latteView.windowsTracker.currentScreen.existsWindowTouching
@ -97,18 +96,18 @@ Loader{
if (themeExtended) { if (themeExtended) {
if (root.userShowPanelBackground && root.plasmaBackgroundForPopups && root.hasExpandedApplet /*for expanded popups when it is enabled*/ if (root.userShowPanelBackground && root.plasmaBackgroundForPopups && root.hasExpandedApplet /*for expanded popups when it is enabled*/
|| root.plasmaStyleBusyForTouchingBusyVerticalView || root.plasmaStyleBusyForTouchingBusyVerticalView
|| (root.themeColors === Latte.Types.SmartThemeColors /*for Smart theming that Windows colors are not used and the user wants solidness at some cases*/ || (root.themeColors === LatteCore.Types.SmartThemeColors /*for Smart theming that Windows colors are not used and the user wants solidness at some cases*/
&& root.windowColors === Latte.Types.NoneWindowColors && root.windowColors === LatteCore.Types.NoneWindowColors
&& root.forceSolidPanel) ) { && root.forceSolidPanel) ) {
/* plasma style*/ /* plasma style*/
return theme; return theme;
} }
if (root.themeColors === Latte.Types.ReverseThemeColors) { if (root.themeColors === LatteCore.Types.ReverseThemeColors) {
return themeExtended.isLightTheme ? themeExtended.darkTheme : themeExtended.lightTheme; return themeExtended.isLightTheme ? themeExtended.darkTheme : themeExtended.lightTheme;
} }
if (root.themeColors === Latte.Types.SmartThemeColors) { if (root.themeColors === LatteCore.Types.SmartThemeColors) {
//! Smart Colors Case //! Smart Colors Case
if (!root.forcePanelForBusyBackground) { if (!root.forcePanelForBusyBackground) {
//! simple case that not a busy background is applied //! simple case that not a busy background is applied
@ -143,7 +142,7 @@ Loader{
&& root.inConfigureAppletsMode && root.inConfigureAppletsMode
&& LatteCore.WindowSystem.compositingActive && LatteCore.WindowSystem.compositingActive
&& root.panelTransparency<40 && root.panelTransparency<40
&& (root.themeColors === Latte.Types.SmartThemeColors)) { && (root.themeColors === LatteCore.Types.SmartThemeColors)) {
return latteView.layout.textColor; return latteView.layout.textColor;
} }
@ -165,7 +164,7 @@ Loader{
readonly property color buttonFocusColor: applyTheme.buttonFocusColor readonly property color buttonFocusColor: applyTheme.buttonFocusColor
readonly property string scheme: { readonly property string scheme: {
if (root.inConfigureAppletsMode && (root.themeColors === Latte.Types.SmartThemeColors)) { if (root.inConfigureAppletsMode && (root.themeColors === LatteCore.Types.SmartThemeColors)) {
if (!LatteCore.WindowSystem.compositingActive && applyTheme !== theme) { if (!LatteCore.WindowSystem.compositingActive && applyTheme !== theme) {
return applyTheme.schemeFile; return applyTheme.schemeFile;
} }

@ -24,7 +24,6 @@ import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.latte 0.2 as Latte
import org.kde.latte.core 0.2 as LatteCore import org.kde.latte.core 0.2 as LatteCore
import "controls" as SettingsControls import "controls" as SettingsControls
@ -37,7 +36,7 @@ Item {
readonly property bool containsMouse: rearrangeBtn.containsMouse || stickOnBottomBtn.containsMouse || stickOnTopBtn.containsMouse readonly property bool containsMouse: rearrangeBtn.containsMouse || stickOnBottomBtn.containsMouse || stickOnTopBtn.containsMouse
readonly property int thickness: rearrangeBtn.implicitHeight readonly property int thickness: rearrangeBtn.implicitHeight
readonly property bool inExpertSettingsMode: latteView && (latteView.settingsLevel === Latte.Types.ExpertSettings) readonly property bool inExpertSettingsMode: latteView && (latteView.settingsLevel === LatteCore.Types.ExpertSettings)
rotation: { rotation: {
if (plasmoid.formFactor === PlasmaCore.Types.Horizontal) { if (plasmoid.formFactor === PlasmaCore.Types.Horizontal) {

@ -25,8 +25,6 @@ import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.latte 0.2 as Latte
import "controls" as SettingsControls import "controls" as SettingsControls
import "maxlength" as MaximumLength import "maxlength" as MaximumLength

@ -25,7 +25,6 @@ import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.latte 0.2 as Latte
import org.kde.latte.core 0.2 as LatteCore import org.kde.latte.core 0.2 as LatteCore
import org.kde.latte.components 1.0 as LatteComponents import org.kde.latte.components 1.0 as LatteComponents

@ -24,9 +24,6 @@ import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.latte 0.2 as Latte
Item{ Item{
id: button id: button
width: visibleButton.width width: visibleButton.width

@ -25,7 +25,7 @@ import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.latte 0.2 as Latte import org.kde.latte.core 0.2 as LatteCore
Item{ Item{
id: rulerItem id: rulerItem
@ -87,13 +87,13 @@ Item{
property: "xL" property: "xL"
value: { value: {
if (root.isHorizontal) { if (root.isHorizontal) {
if (plasmoid.configuration.alignment === Latte.Types.Justify) { if (plasmoid.configuration.alignment === LatteCore.Types.Justify) {
return root.width/2 - rulerItem.length/2 + root.offset; return root.width/2 - rulerItem.length/2 + root.offset;
} else if (root.panelAlignment === Latte.Types.Left) { } else if (root.panelAlignment === LatteCore.Types.Left) {
return root.offset; return root.offset;
} else if (root.panelAlignment === Latte.Types.Center) { } else if (root.panelAlignment === LatteCore.Types.Center) {
return root.width/2 - rulerItem.length/2 + root.offset; return root.width/2 - rulerItem.length/2 + root.offset;
} else if (root.panelAlignment === Latte.Types.Right) { } else if (root.panelAlignment === LatteCore.Types.Right) {
return root.width - rulerItem.length - root.offset; return root.width - rulerItem.length - root.offset;
} }
} else { } else {
@ -107,13 +107,13 @@ Item{
property: "yL" property: "yL"
value: { value: {
if (root.isVertical) { if (root.isVertical) {
if (plasmoid.configuration.alignment === Latte.Types.Justify) { if (plasmoid.configuration.alignment === LatteCore.Types.Justify) {
return root.height/2 - rulerItem.length/2 + root.offset; return root.height/2 - rulerItem.length/2 + root.offset;
} else if (root.panelAlignment === Latte.Types.Top) { } else if (root.panelAlignment === LatteCore.Types.Top) {
return root.offset; return root.offset;
} else if (root.panelAlignment === Latte.Types.Center) { } else if (root.panelAlignment === LatteCore.Types.Center) {
return root.height/2 - rulerItem.length/2 + root.offset; return root.height/2 - rulerItem.length/2 + root.offset;
} else if (root.panelAlignment === Latte.Types.Bottom) { } else if (root.panelAlignment === LatteCore.Types.Bottom) {
return root.height - rulerItem.length - root.offset; return root.height - rulerItem.length - root.offset;
} }
} else { } else {

@ -23,7 +23,7 @@ import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.components 2.0 as PlasmaComponents import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.latte 0.2 as Latte import org.kde.latte.core 0.2 as LatteCore
MouseArea{ MouseArea{
id: rulerMouseArea id: rulerMouseArea
@ -58,13 +58,13 @@ MouseArea{
var newTotal = Math.abs(plasmoid.configuration.offset) + value; var newTotal = Math.abs(plasmoid.configuration.offset) + value;
//centered and justify alignments based on offset and get out of the screen in some cases //centered and justify alignments based on offset and get out of the screen in some cases
var centeredCheck = ((plasmoid.configuration.alignment === Latte.Types.Center) var centeredCheck = ((plasmoid.configuration.alignment === LatteCore.Types.Center)
|| (plasmoid.configuration.alignment === Latte.Types.Justify)) || (plasmoid.configuration.alignment === LatteCore.Types.Justify))
&& ((Math.abs(plasmoid.configuration.offset) + value/2) > 50); && ((Math.abs(plasmoid.configuration.offset) + value/2) > 50);
if (newTotal > 100 || centeredCheck) { if (newTotal > 100 || centeredCheck) {
if ((plasmoid.configuration.alignment === Latte.Types.Center) if ((plasmoid.configuration.alignment === LatteCore.Types.Center)
|| (plasmoid.configuration.alignment === Latte.Types.Justify)) { || (plasmoid.configuration.alignment === LatteCore.Types.Justify)) {
var suggestedValue = (plasmoid.configuration.offset<0) ? Math.min(0, -(100-value)): Math.max(0, 100-value); var suggestedValue = (plasmoid.configuration.offset<0) ? Math.min(0, -(100-value)): Math.max(0, 100-value);

@ -22,8 +22,6 @@ import QtQuick 2.7
import org.kde.plasma.plasmoid 2.0 import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.latte 0.2 as Latte
import "../applet/indicator" as AppletIndicator import "../applet/indicator" as AppletIndicator
Item{ Item{

@ -21,7 +21,7 @@ import QtQuick 2.7
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.latte 0.2 as Latte import org.kde.latte.core 0.2 as LatteCore
Grid { Grid {
id: appletsContainer id: appletsContainer
@ -35,7 +35,7 @@ Grid {
//Layout.preferredWidth: width //Layout.preferredWidth: width
//Layout.preferredHeight: height //Layout.preferredHeight: height
property int alignment: Latte.Types.BottomEdgeCenterAlign property int alignment: LatteCore.Types.BottomEdgeCenterAlign
property int beginIndex: 0 property int beginIndex: 0
property int offset: 0 property int offset: 0
@ -162,7 +162,7 @@ Grid {
///Left Edge ///Left Edge
State { State {
name: "leftCenter" name: "leftCenter"
when: appletsContainer.alignment === Latte.Types.LeftEdgeCenterAlign when: appletsContainer.alignment === LatteCore.Types.LeftEdgeCenterAlign
AnchorChanges { AnchorChanges {
target: appletsContainer target: appletsContainer
@ -176,7 +176,7 @@ Grid {
}, },
State { State {
name: "leftTop" name: "leftTop"
when: appletsContainer.alignment === Latte.Types.LeftEdgeTopAlign when: appletsContainer.alignment === LatteCore.Types.LeftEdgeTopAlign
AnchorChanges { AnchorChanges {
target: appletsContainer target: appletsContainer
@ -190,7 +190,7 @@ Grid {
}, },
State { State {
name: "leftBottom" name: "leftBottom"
when: appletsContainer.alignment === Latte.Types.LeftEdgeBottomAlign when: appletsContainer.alignment === LatteCore.Types.LeftEdgeBottomAlign
AnchorChanges { AnchorChanges {
target: appletsContainer target: appletsContainer
@ -205,7 +205,7 @@ Grid {
///Right Edge ///Right Edge
State { State {
name: "rightCenter" name: "rightCenter"
when: appletsContainer.alignment === Latte.Types.RightEdgeCenterAlign when: appletsContainer.alignment === LatteCore.Types.RightEdgeCenterAlign
AnchorChanges { AnchorChanges {
target: appletsContainer target: appletsContainer
@ -219,7 +219,7 @@ Grid {
}, },
State { State {
name: "rightTop" name: "rightTop"
when: appletsContainer.alignment === Latte.Types.RightEdgeTopAlign when: appletsContainer.alignment === LatteCore.Types.RightEdgeTopAlign
AnchorChanges { AnchorChanges {
target: appletsContainer target: appletsContainer
@ -233,7 +233,7 @@ Grid {
}, },
State { State {
name: "rightBottom" name: "rightBottom"
when: appletsContainer.alignment === Latte.Types.RightEdgeBottomAlign when: appletsContainer.alignment === LatteCore.Types.RightEdgeBottomAlign
AnchorChanges { AnchorChanges {
target: appletsContainer target: appletsContainer
@ -248,7 +248,7 @@ Grid {
///Bottom Edge ///Bottom Edge
State { State {
name: "bottomCenter" name: "bottomCenter"
when: appletsContainer.alignment === Latte.Types.BottomEdgeCenterAlign when: appletsContainer.alignment === LatteCore.Types.BottomEdgeCenterAlign
AnchorChanges { AnchorChanges {
target: appletsContainer target: appletsContainer
@ -262,7 +262,7 @@ Grid {
}, },
State { State {
name: "bottomLeft" name: "bottomLeft"
when: appletsContainer.alignment === Latte.Types.BottomEdgeLeftAlign when: appletsContainer.alignment === LatteCore.Types.BottomEdgeLeftAlign
AnchorChanges { AnchorChanges {
target: appletsContainer target: appletsContainer
@ -276,7 +276,7 @@ Grid {
}, },
State { State {
name: "bottomRight" name: "bottomRight"
when: appletsContainer.alignment === Latte.Types.BottomEdgeRightAlign when: appletsContainer.alignment === LatteCore.Types.BottomEdgeRightAlign
AnchorChanges { AnchorChanges {
target: appletsContainer target: appletsContainer
@ -291,7 +291,7 @@ Grid {
///Top Edge ///Top Edge
State { State {
name: "topCenter" name: "topCenter"
when: appletsContainer.alignment === Latte.Types.TopEdgeCenterAlign when: appletsContainer.alignment === LatteCore.Types.TopEdgeCenterAlign
AnchorChanges { AnchorChanges {
target: appletsContainer target: appletsContainer
@ -305,7 +305,7 @@ Grid {
}, },
State { State {
name: "topLeft" name: "topLeft"
when: appletsContainer.alignment === Latte.Types.TopEdgeLeftAlign when: appletsContainer.alignment === LatteCore.Types.TopEdgeLeftAlign
AnchorChanges { AnchorChanges {
target: appletsContainer target: appletsContainer
@ -319,7 +319,7 @@ Grid {
}, },
State { State {
name: "topRight" name: "topRight"
when: appletsContainer.alignment === Latte.Types.TopEdgeRightAlign when: appletsContainer.alignment === LatteCore.Types.TopEdgeRightAlign
AnchorChanges { AnchorChanges {
target: appletsContainer target: appletsContainer

@ -22,7 +22,7 @@ import QtQuick 2.7
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.plasmoid 2.0 import org.kde.plasma.plasmoid 2.0
import org.kde.latte 0.2 as Latte import org.kde.latte.core 0.2 as LatteCore
import "loaders" as Loaders import "loaders" as Loaders
import "indicator" as Indicator import "indicator" as Indicator
@ -34,7 +34,7 @@ Loader {
width: active ? item.width : 0 width: active ? item.width : 0
height: active ? item.height: 0 height: active ? item.height: 0
property int alignment: Latte.Types.BottomEdgeCenterAlign property int alignment: LatteCore.Types.BottomEdgeCenterAlign
sourceComponent: MouseArea{ sourceComponent: MouseArea{
id: mainArea id: mainArea
@ -56,7 +56,7 @@ Loader {
hoverEnabled: true hoverEnabled: true
readonly property bool useAllLayouts: panelUserSetAlignment === Latte.Types.Justify && !root.inConfigureAppletsMode readonly property bool useAllLayouts: panelUserSetAlignment === LatteCore.Types.Justify && !root.inConfigureAppletsMode
property int lastPressX: -1 property int lastPressX: -1
property int lastPressY: -1 property int lastPressY: -1
@ -124,7 +124,7 @@ Loader {
return; return;
} }
if (root.scrollAction === Latte.Types.ScrollNone) { if (root.scrollAction === LatteCore.Types.ScrollNone) {
root.emptyAreasWheel(wheel); root.emptyAreasWheel(wheel);
return; return;
} }
@ -146,11 +146,11 @@ Loader {
if (angle>10) { if (angle>10) {
//! upwards //! upwards
if (root.scrollAction === Latte.Types.ScrollDesktops) { if (root.scrollAction === LatteCore.Types.ScrollDesktops) {
latteView.windowsTracker.switchToPreviousVirtualDesktop(); latteView.windowsTracker.switchToPreviousVirtualDesktop();
} else if (root.scrollAction === Latte.Types.ScrollActivities) { } else if (root.scrollAction === LatteCore.Types.ScrollActivities) {
latteView.windowsTracker.switchToPreviousActivity(); latteView.windowsTracker.switchToPreviousActivity();
} else if (root.scrollAction === Latte.Types.ScrollToggleMinimized) { } else if (root.scrollAction === LatteCore.Types.ScrollToggleMinimized) {
if (!ctrlPressed) { if (!ctrlPressed) {
tasksLoader.item.activateNextPrevTask(true); tasksLoader.item.activateNextPrevTask(true);
} else if (!selectedWindowsTracker.lastActiveWindow.isMaximized){ } else if (!selectedWindowsTracker.lastActiveWindow.isMaximized){
@ -161,11 +161,11 @@ Loader {
} }
} else if (angle<-10) { } else if (angle<-10) {
//! downwards //! downwards
if (root.scrollAction === Latte.Types.ScrollDesktops) { if (root.scrollAction === LatteCore.Types.ScrollDesktops) {
latteView.windowsTracker.switchToNextVirtualDesktop(); latteView.windowsTracker.switchToNextVirtualDesktop();
} else if (root.scrollAction === Latte.Types.ScrollActivities) { } else if (root.scrollAction === LatteCore.Types.ScrollActivities) {
latteView.windowsTracker.switchToNextActivity(); latteView.windowsTracker.switchToNextActivity();
} else if (root.scrollAction === Latte.Types.ScrollToggleMinimized) { } else if (root.scrollAction === LatteCore.Types.ScrollToggleMinimized) {
if (!ctrlPressed) { if (!ctrlPressed) {
if (selectedWindowsTracker.lastActiveWindow.isValid if (selectedWindowsTracker.lastActiveWindow.isValid
&& !selectedWindowsTracker.lastActiveWindow.isMinimized && !selectedWindowsTracker.lastActiveWindow.isMinimized
@ -238,7 +238,7 @@ Loader {
states:[ states:[
State { State {
name: "bottomCenter" name: "bottomCenter"
when: (alignment === Latte.Types.BottomEdgeCenterAlign) when: (alignment === LatteCore.Types.BottomEdgeCenterAlign)
AnchorChanges { AnchorChanges {
target: environmentLoader target: environmentLoader
@ -248,7 +248,7 @@ Loader {
}, },
State { State {
name: "bottomLeft" name: "bottomLeft"
when: (alignment === Latte.Types.BottomEdgeLeftAlign) when: (alignment === LatteCore.Types.BottomEdgeLeftAlign)
AnchorChanges { AnchorChanges {
target: environmentLoader target: environmentLoader
@ -258,7 +258,7 @@ Loader {
}, },
State { State {
name: "bottomRight" name: "bottomRight"
when: (alignment === Latte.Types.BottomEdgeRightAlign) when: (alignment === LatteCore.Types.BottomEdgeRightAlign)
AnchorChanges { AnchorChanges {
target: environmentLoader target: environmentLoader
@ -268,7 +268,7 @@ Loader {
}, },
State { State {
name: "topCenter" name: "topCenter"
when: (alignment === Latte.Types.TopEdgeCenterAlign) when: (alignment === LatteCore.Types.TopEdgeCenterAlign)
AnchorChanges { AnchorChanges {
target: environmentLoader target: environmentLoader
@ -278,7 +278,7 @@ Loader {
}, },
State { State {
name: "topLeft" name: "topLeft"
when: (alignment === Latte.Types.TopEdgeLeftAlign) when: (alignment === LatteCore.Types.TopEdgeLeftAlign)
AnchorChanges { AnchorChanges {
target: environmentLoader target: environmentLoader
@ -288,7 +288,7 @@ Loader {
}, },
State { State {
name: "topRight" name: "topRight"
when: (alignment === Latte.Types.TopEdgeRightAlign) when: (alignment === LatteCore.Types.TopEdgeRightAlign)
AnchorChanges { AnchorChanges {
target: environmentLoader target: environmentLoader
@ -298,7 +298,7 @@ Loader {
}, },
State { State {
name: "leftCenter" name: "leftCenter"
when: (alignment === Latte.Types.LeftEdgeCenterAlign) when: (alignment === LatteCore.Types.LeftEdgeCenterAlign)
AnchorChanges { AnchorChanges {
target: environmentLoader target: environmentLoader
@ -308,7 +308,7 @@ Loader {
}, },
State { State {
name: "leftTop" name: "leftTop"
when: (alignment === Latte.Types.LeftEdgeTopAlign) when: (alignment === LatteCore.Types.LeftEdgeTopAlign)
AnchorChanges { AnchorChanges {
target: environmentLoader target: environmentLoader
@ -318,7 +318,7 @@ Loader {
}, },
State { State {
name: "leftBottom" name: "leftBottom"
when: (alignment === Latte.Types.LeftEdgeBottomAlign) when: (alignment === LatteCore.Types.LeftEdgeBottomAlign)
AnchorChanges { AnchorChanges {
target: environmentLoader target: environmentLoader
@ -328,7 +328,7 @@ Loader {
}, },
State { State {
name: "rightCenter" name: "rightCenter"
when: (alignment === Latte.Types.RightEdgeCenterAlign) when: (alignment === LatteCore.Types.RightEdgeCenterAlign)
AnchorChanges { AnchorChanges {
target: environmentLoader target: environmentLoader
@ -338,7 +338,7 @@ Loader {
}, },
State { State {
name: "rightTop" name: "rightTop"
when: (alignment === Latte.Types.RightEdgeTopAlign) when: (alignment === LatteCore.Types.RightEdgeTopAlign)
AnchorChanges { AnchorChanges {
target: environmentLoader target: environmentLoader
@ -348,7 +348,7 @@ Loader {
}, },
State { State {
name: "rightBottom" name: "rightBottom"
when: (alignment === Latte.Types.RightEdgeBottomAlign) when: (alignment === LatteCore.Types.RightEdgeBottomAlign)
AnchorChanges { AnchorChanges {
target: environmentLoader target: environmentLoader

@ -25,7 +25,6 @@ import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.latte 0.2 as Latte
import org.kde.latte.core 0.2 as LatteCore import org.kde.latte.core 0.2 as LatteCore
import "../../code/HeuristicTools.js" as HeuristicTools import "../../code/HeuristicTools.js" as HeuristicTools
@ -34,7 +33,7 @@ Item{
id: layoutsContainer id: layoutsContainer
readonly property bool isHidden: root.inStartup || (latteView && latteView.visibility && latteView.visibility.isHidden) readonly property bool isHidden: root.inStartup || (latteView && latteView.visibility && latteView.visibility.isHidden)
readonly property bool useMaxLength: (plasmoid.configuration.alignment === Latte.Types.Justify && !root.inConfigureAppletsMode) readonly property bool useMaxLength: (plasmoid.configuration.alignment === LatteCore.Types.Justify && !root.inConfigureAppletsMode)
/* && ((!root.inConfigureAppletsMode && !root.behaveAsPlasmaPanel ) /* && ((!root.inConfigureAppletsMode && !root.behaveAsPlasmaPanel )
|| (behaveAsPlasmaPanel && root.inConfigureAppletsMode))*/ || (behaveAsPlasmaPanel && root.inConfigureAppletsMode))*/
@ -125,7 +124,7 @@ Item{
z:10 z:10
property bool animationSent: false property bool animationSent: false
property bool shouldCheckHalfs: (plasmoid.configuration.alignment === Latte.Types.Justify) && (_mainLayout.children>1) property bool shouldCheckHalfs: (plasmoid.configuration.alignment === LatteCore.Types.Justify) && (_mainLayout.children>1)
property int contentsWidth: _startLayout.width + _mainLayout.width + _endLayout.width property int contentsWidth: _startLayout.width + _mainLayout.width + _endLayout.width
property int contentsHeight: _startLayout.height + _mainLayout.height + _endLayout.height property int contentsHeight: _startLayout.height + _mainLayout.height + _endLayout.height
@ -184,7 +183,7 @@ Item{
onYChanged: root.updateEffectsArea(); onYChanged: root.updateEffectsArea();
EnvironmentActions { EnvironmentActions {
active: root.scrollAction !== Latte.Types.ScrollNone || root.dragActiveWindowEnabled || root.closeActiveWindowEnabled active: root.scrollAction !== LatteCore.Types.ScrollNone || root.dragActiveWindowEnabled || root.closeActiveWindowEnabled
alignment: _mainLayout.alignment alignment: _mainLayout.alignment
} }
@ -194,13 +193,13 @@ Item{
offset: root.totalPanelEdgeSpacing/2 offset: root.totalPanelEdgeSpacing/2
alignment: { alignment: {
switch(plasmoid.location) { switch(plasmoid.location) {
case PlasmaCore.Types.BottomEdge: return Latte.Types.BottomEdgeLeftAlign; case PlasmaCore.Types.BottomEdge: return LatteCore.Types.BottomEdgeLeftAlign;
case PlasmaCore.Types.TopEdge: return Latte.Types.TopEdgeLeftAlign; case PlasmaCore.Types.TopEdge: return LatteCore.Types.TopEdgeLeftAlign;
case PlasmaCore.Types.LeftEdge: return Latte.Types.LeftEdgeTopAlign; case PlasmaCore.Types.LeftEdge: return LatteCore.Types.LeftEdgeTopAlign;
case PlasmaCore.Types.RightEdge: return Latte.Types.RightEdgeTopAlign; case PlasmaCore.Types.RightEdge: return LatteCore.Types.RightEdgeTopAlign;
} }
return Latte.Types.BottomEdgeLeftAlign; return LatteCore.Types.BottomEdgeLeftAlign;
} }
} }
@ -209,52 +208,52 @@ Item{
beginIndex: 100 beginIndex: 100
offset: centered ? appliedOffset : root.offsetFixed offset: centered ? appliedOffset : root.offsetFixed
readonly property bool centered: (root.panelAlignment === Latte.Types.Center) || (root.panelAlignment === Latte.Types.Justify) readonly property bool centered: (root.panelAlignment === LatteCore.Types.Center) || (root.panelAlignment === LatteCore.Types.Justify)
readonly property bool reversed: Qt.application.layoutDirection === Qt.RightToLeft readonly property bool reversed: Qt.application.layoutDirection === Qt.RightToLeft
readonly property int appliedOffset: root.panelAlignment === Latte.Types.Justify ? 0 : root.offset readonly property int appliedOffset: root.panelAlignment === LatteCore.Types.Justify ? 0 : root.offset
alignment: { alignment: {
if (plasmoid.location === PlasmaCore.Types.LeftEdge) { if (plasmoid.location === PlasmaCore.Types.LeftEdge) {
if (centered) return Latte.Types.LeftEdgeCenterAlign; if (centered) return LatteCore.Types.LeftEdgeCenterAlign;
if (root.panelAlignment === Latte.Types.Top) return Latte.Types.LeftEdgeTopAlign; if (root.panelAlignment === LatteCore.Types.Top) return LatteCore.Types.LeftEdgeTopAlign;
if (root.panelAlignment === Latte.Types.Bottom) return Latte.Types.LeftEdgeBottomAlign; if (root.panelAlignment === LatteCore.Types.Bottom) return LatteCore.Types.LeftEdgeBottomAlign;
} }
if (plasmoid.location === PlasmaCore.Types.RightEdge) { if (plasmoid.location === PlasmaCore.Types.RightEdge) {
if (centered) return Latte.Types.RightEdgeCenterAlign; if (centered) return LatteCore.Types.RightEdgeCenterAlign;
if (root.panelAlignment === Latte.Types.Top) return Latte.Types.RightEdgeTopAlign; if (root.panelAlignment === LatteCore.Types.Top) return LatteCore.Types.RightEdgeTopAlign;
if (root.panelAlignment === Latte.Types.Bottom) return Latte.Types.RightEdgeBottomAlign; if (root.panelAlignment === LatteCore.Types.Bottom) return LatteCore.Types.RightEdgeBottomAlign;
} }
if (plasmoid.location === PlasmaCore.Types.BottomEdge) { if (plasmoid.location === PlasmaCore.Types.BottomEdge) {
if (centered) return Latte.Types.BottomEdgeCenterAlign; if (centered) return LatteCore.Types.BottomEdgeCenterAlign;
if ((root.panelAlignment === Latte.Types.Left && !reversed) if ((root.panelAlignment === LatteCore.Types.Left && !reversed)
|| (root.panelAlignment === Latte.Types.Right && reversed)) { || (root.panelAlignment === LatteCore.Types.Right && reversed)) {
return Latte.Types.BottomEdgeLeftAlign; return LatteCore.Types.BottomEdgeLeftAlign;
} }
if ((root.panelAlignment === Latte.Types.Right && !reversed) if ((root.panelAlignment === LatteCore.Types.Right && !reversed)
|| (root.panelAlignment === Latte.Types.Left && reversed)) { || (root.panelAlignment === LatteCore.Types.Left && reversed)) {
return Latte.Types.BottomEdgeRightAlign; return LatteCore.Types.BottomEdgeRightAlign;
} }
} }
if (plasmoid.location === PlasmaCore.Types.TopEdge) { if (plasmoid.location === PlasmaCore.Types.TopEdge) {
if (centered) return Latte.Types.TopEdgeCenterAlign; if (centered) return LatteCore.Types.TopEdgeCenterAlign;
if ((root.panelAlignment === Latte.Types.Left && !reversed) if ((root.panelAlignment === LatteCore.Types.Left && !reversed)
|| (root.panelAlignment === Latte.Types.Right && reversed)) { || (root.panelAlignment === LatteCore.Types.Right && reversed)) {
return Latte.Types.TopEdgeLeftAlign; return LatteCore.Types.TopEdgeLeftAlign;
} }
if ((root.panelAlignment === Latte.Types.Right && !reversed) if ((root.panelAlignment === LatteCore.Types.Right && !reversed)
|| (root.panelAlignment === Latte.Types.Left && reversed)) { || (root.panelAlignment === LatteCore.Types.Left && reversed)) {
return Latte.Types.TopEdgeRightAlign; return LatteCore.Types.TopEdgeRightAlign;
} }
} }
return Latte.Types.BottomEdgeCenterAlign; return LatteCore.Types.BottomEdgeCenterAlign;
} }
transitions: Transition { transitions: Transition {
@ -272,13 +271,13 @@ Item{
offset: root.totalPanelEdgeSpacing/2 offset: root.totalPanelEdgeSpacing/2
alignment: { alignment: {
switch(plasmoid.location) { switch(plasmoid.location) {
case PlasmaCore.Types.BottomEdge: return Latte.Types.BottomEdgeRightAlign; case PlasmaCore.Types.BottomEdge: return LatteCore.Types.BottomEdgeRightAlign;
case PlasmaCore.Types.TopEdge: return Latte.Types.TopEdgeRightAlign; case PlasmaCore.Types.TopEdge: return LatteCore.Types.TopEdgeRightAlign;
case PlasmaCore.Types.LeftEdge: return Latte.Types.LeftEdgeBottomAlign; case PlasmaCore.Types.LeftEdge: return LatteCore.Types.LeftEdgeBottomAlign;
case PlasmaCore.Types.RightEdge: return Latte.Types.RightEdgeBottomAlign; case PlasmaCore.Types.RightEdge: return LatteCore.Types.RightEdgeBottomAlign;
} }
return Latte.Types.BottomEdgeLeftAlign; return LatteCore.Types.BottomEdgeLeftAlign;
} }
} }

@ -19,8 +19,6 @@
import QtQuick 2.7 import QtQuick 2.7
import org.kde.latte 0.2 as Latte
Item{ Item{
id: indicatorBridge id: indicatorBridge
anchors.fill: parent anchors.fill: parent

@ -21,8 +21,6 @@ import QtQuick 2.7
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.latte 0.2 as Latte
Loader { Loader {
id: indicatorLoader id: indicatorLoader
anchors.fill: parent anchors.fill: parent

@ -21,11 +21,11 @@ import QtQuick 2.7
import org.kde.taskmanager 0.1 as TaskManager import org.kde.taskmanager 0.1 as TaskManager
import org.kde.latte 0.2 as Latte import org.kde.latte.core 0.2 as LatteCore
Loader { Loader {
id: tasksLoader id: tasksLoader
active: root.scrollAction === Latte.Types.ScrollTasks || root.scrollAction === Latte.Types.ScrollToggleMinimized active: root.scrollAction === LatteCore.Types.ScrollTasks || root.scrollAction === LatteCore.Types.ScrollToggleMinimized
sourceComponent: Item { sourceComponent: Item {
TaskManager.TasksModel { TaskManager.TasksModel {
id: tasksModel id: tasksModel

@ -28,7 +28,6 @@ import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.kquickcontrolsaddons 2.0 import org.kde.kquickcontrolsaddons 2.0
import org.kde.plasma.plasmoid 2.0 import org.kde.plasma.plasmoid 2.0
import org.kde.latte 0.2 as Latte
import org.kde.latte.core 0.2 as LatteCore import org.kde.latte.core 0.2 as LatteCore
import org.kde.latte.components 1.0 as LatteComponents import org.kde.latte.components 1.0 as LatteComponents
@ -95,20 +94,20 @@ Item {
return (visibilityManager.panelIsBiggerFromIconSize return (visibilityManager.panelIsBiggerFromIconSize
&& (maxZoomFactor === 1.0) && (maxZoomFactor === 1.0)
&& (plasmoid.configuration.alignment === Latte.Types.Justify) && (plasmoid.configuration.alignment === LatteCore.Types.Justify)
&& !root.editMode && !root.editMode
&& !visibilityManager.inLocationAnimation); && !visibilityManager.inLocationAnimation);
} }
property int viewType: { property int viewType: {
if ((plasmoid.configuration.alignment === Latte.Types.Justify) if ((plasmoid.configuration.alignment === LatteCore.Types.Justify)
&& (plasmoid.configuration.useThemePanel) && (plasmoid.configuration.useThemePanel)
&& (plasmoid.configuration.panelSize === 100) && (plasmoid.configuration.panelSize === 100)
&& (maxZoomFactor === 1.0)) { && (maxZoomFactor === 1.0)) {
return Latte.Types.PanelView; return LatteCore.Types.PanelView;
} }
return Latte.Types.DockView; return LatteCore.Types.DockView;
} }
property bool blurEnabled: plasmoid.configuration.blurEnabled && (!forceTransparentPanel || forcePanelForBusyBackground) property bool blurEnabled: plasmoid.configuration.blurEnabled && (!forceTransparentPanel || forcePanelForBusyBackground)
@ -156,15 +155,15 @@ Item {
&& !inConfigureAppletsMode && !inConfigureAppletsMode
&& !forceSolidPanel && !forceSolidPanel
&& !latteView.windowsTracker.currentScreen.existsWindowTouching && !latteView.windowsTracker.currentScreen.existsWindowTouching
&& !(windowColors === Latte.Types.ActiveWindowColors && selectedWindowsTracker.existsWindowActive) && !(windowColors === LatteCore.Types.ActiveWindowColors && selectedWindowsTracker.existsWindowActive)
property bool forcePanelForBusyBackground: userShowPanelBackground && (root.themeColors === Latte.Types.SmartThemeColors) property bool forcePanelForBusyBackground: userShowPanelBackground && (root.themeColors === LatteCore.Types.SmartThemeColors)
&& ( (root.forceTransparentPanel && colorizerManager.backgroundIsBusy) && ( (root.forceTransparentPanel && colorizerManager.backgroundIsBusy)
|| normalBusyForTouchingBusyVerticalView ) || normalBusyForTouchingBusyVerticalView )
property bool normalBusyForTouchingBusyVerticalView: (latteView && latteView.windowsTracker /*is touching a vertical view that is in busy state and the user prefers isBusy transparency*/ property bool normalBusyForTouchingBusyVerticalView: (latteView && latteView.windowsTracker /*is touching a vertical view that is in busy state and the user prefers isBusy transparency*/
&& latteView.windowsTracker.currentScreen.isTouchingBusyVerticalView && latteView.windowsTracker.currentScreen.isTouchingBusyVerticalView
&& root.themeColors === Latte.Types.SmartThemeColors && root.themeColors === LatteCore.Types.SmartThemeColors
&& plasmoid.configuration.backgroundOnlyOnMaximized && plasmoid.configuration.backgroundOnlyOnMaximized
/*&& !plasmoid.configuration.solidBackgroundForMaximized /*&& !plasmoid.configuration.solidBackgroundForMaximized
&& !plasmaBackgroundForPopups*/) && !plasmaBackgroundForPopups*/)
@ -172,7 +171,7 @@ Item {
property bool solidBusyForTouchingBusyVerticalView: false //DISABLED, until to check if the normalBusyForTouchingBusyVerticalView is enough to catch and handle the case property bool solidBusyForTouchingBusyVerticalView: false //DISABLED, until to check if the normalBusyForTouchingBusyVerticalView is enough to catch and handle the case
/*(latteView && latteView.windowsTracker /*is touching a vertical view that is in busy state and the user prefers solidness*/ /*(latteView && latteView.windowsTracker /*is touching a vertical view that is in busy state and the user prefers solidness*/
/* && latteView.windowsTracker.currentScreen.isTouchingBusyVerticalView /* && latteView.windowsTracker.currentScreen.isTouchingBusyVerticalView
&& root.themeColors === Latte.Types.SmartThemeColors && root.themeColors === LatteCore.Types.SmartThemeColors
&& plasmoid.configuration.backgroundOnlyOnMaximized && plasmoid.configuration.backgroundOnlyOnMaximized
&& plasmoid.configuration.solidBackgroundForMaximized && plasmoid.configuration.solidBackgroundForMaximized
&& !plasmaBackgroundForPopups)*/ && !plasmaBackgroundForPopups)*/
@ -180,7 +179,7 @@ Item {
property bool plasmaStyleBusyForTouchingBusyVerticalView: false //DISABLED, until to check if the normalBusyForTouchingBusyVerticalView is enough to catch and handle the case property bool plasmaStyleBusyForTouchingBusyVerticalView: false //DISABLED, until to check if the normalBusyForTouchingBusyVerticalView is enough to catch and handle the case
//(latteView && latteView.windowsTracker /*is touching a vertical view that is in busy state and the user prefers solidness*/ //(latteView && latteView.windowsTracker /*is touching a vertical view that is in busy state and the user prefers solidness*/
/* && latteView.windowsTracker.currentScreen.isTouchingBusyVerticalView /* && latteView.windowsTracker.currentScreen.isTouchingBusyVerticalView
&& root.themeColors === Latte.Types.SmartThemeColors && root.themeColors === LatteCore.Types.SmartThemeColors
&& plasmoid.configuration.backgroundOnlyOnMaximized && plasmoid.configuration.backgroundOnlyOnMaximized
&& plasmaBackgroundForPopups)*/ && plasmaBackgroundForPopups)*/
@ -190,9 +189,9 @@ Item {
&& latteView.windowsTracker.currentScreen.existsWindowMaximized && latteView.windowsTracker.currentScreen.existsWindowMaximized
property bool hideLengthScreenGaps: hideThickScreenGap property bool hideLengthScreenGaps: hideThickScreenGap
&& (latteView.visibility.mode === Latte.Types.AlwaysVisible && (latteView.visibility.mode === LatteCore.Types.AlwaysVisible
|| latteView.visibility.mode === Latte.Types.WindowsGoBelow) || latteView.visibility.mode === LatteCore.Types.WindowsGoBelow)
&& (plasmoid.configuration.alignment === Latte.Types.Justify) && (plasmoid.configuration.alignment === LatteCore.Types.Justify)
&& plasmoid.configuration.maxLength>85 && plasmoid.configuration.maxLength>85
&& !root.editMode && !root.editMode
@ -201,7 +200,7 @@ Item {
property int themeColors: plasmoid.configuration.themeColors property int themeColors: plasmoid.configuration.themeColors
property int windowColors: plasmoid.configuration.windowColors property int windowColors: plasmoid.configuration.windowColors
property bool colorizerEnabled: themeColors !== Latte.Types.PlasmaThemeColors || windowColors !== Latte.Types.NoneWindowColors property bool colorizerEnabled: themeColors !== LatteCore.Types.PlasmaThemeColors || windowColors !== LatteCore.Types.NoneWindowColors
property bool plasmaBackgroundForPopups: plasmoid.configuration.plasmaBackgroundForPopups property bool plasmaBackgroundForPopups: plasmoid.configuration.plasmaBackgroundForPopups
@ -216,7 +215,7 @@ Item {
property bool closeActiveWindowEnabled: plasmoid.configuration.closeActiveWindowEnabled property bool closeActiveWindowEnabled: plasmoid.configuration.closeActiveWindowEnabled
property bool dragActiveWindowEnabled: plasmoid.configuration.dragActiveWindowEnabled property bool dragActiveWindowEnabled: plasmoid.configuration.dragActiveWindowEnabled
property bool immutable: plasmoid.immutable property bool immutable: plasmoid.immutable
property bool inFullJustify: (plasmoid.configuration.alignment === Latte.Types.Justify) && (maxLengthPerCentage===100) property bool inFullJustify: (plasmoid.configuration.alignment === LatteCore.Types.Justify) && (maxLengthPerCentage===100)
property bool inSlidingIn: visibilityManager ? visibilityManager.inSlidingIn : false property bool inSlidingIn: visibilityManager ? visibilityManager.inSlidingIn : false
property bool inSlidingOut: visibilityManager ? visibilityManager.inSlidingOut : false property bool inSlidingOut: visibilityManager ? visibilityManager.inSlidingOut : false
property bool inStartup: true property bool inStartup: true
@ -331,10 +330,10 @@ Item {
property int appShadowSizeOriginal: enableShadows ? (0.5*container.maxIconSize) * (plasmoid.configuration.shadowSize/100) : 0 property int appShadowSizeOriginal: enableShadows ? (0.5*container.maxIconSize) * (plasmoid.configuration.shadowSize/100) : 0
property string appChosenShadowColor: { property string appChosenShadowColor: {
if (plasmoid.configuration.shadowColorType === Latte.Types.ThemeColorShadow) { if (plasmoid.configuration.shadowColorType === LatteCore.Types.ThemeColorShadow) {
var strC = String(theme.textColor); var strC = String(theme.textColor);
return strC.indexOf("#") === 0 ? strC.substr(1) : strC; return strC.indexOf("#") === 0 ? strC.substr(1) : strC;
} else if (plasmoid.configuration.shadowColorType === Latte.Types.UserColorShadow) { } else if (plasmoid.configuration.shadowColorType === LatteCore.Types.UserColorShadow) {
return plasmoid.configuration.shadowColor; return plasmoid.configuration.shadowColor;
} }
@ -359,7 +358,7 @@ Item {
} }
//center the layout correctly when the user uses an offset //center the layout correctly when the user uses an offset
property int offsetFixed: (offset===0 || panelAlignment === Latte.Types.Center || plasmoid.configuration.alignment === Latte.Types.Justify)? property int offsetFixed: (offset===0 || panelAlignment === LatteCore.Types.Center || plasmoid.configuration.alignment === LatteCore.Types.Justify)?
offset : offset+panelMarginLength/2+totalPanelEdgeSpacing/2 offset : offset+panelMarginLength/2+totalPanelEdgeSpacing/2
property int realPanelSize: 0 property int realPanelSize: 0
@ -435,12 +434,12 @@ Item {
property int heightMargins: root.isHorizontal ? thickMargins : lengthMargins property int heightMargins: root.isHorizontal ? thickMargins : lengthMargins
///FIXME: <delete both> I can't remember why this is needed, maybe for the anchorings!!! In order for the Double Layout to not mess the anchorings... ///FIXME: <delete both> I can't remember why this is needed, maybe for the anchorings!!! In order for the Double Layout to not mess the anchorings...
//property int layoutsContainer.mainLayoutPosition: !plasmoid.immutable ? Latte.Types.Center : (root.isVertical ? Latte.Types.Top : Latte.Types.Left) //property int layoutsContainer.mainLayoutPosition: !plasmoid.immutable ? LatteCore.Types.Center : (root.isVertical ? LatteCore.Types.Top : LatteCore.Types.Left)
//property int panelAlignment: plasmoid.configuration.alignment !== Latte.Types.Justify ? plasmoid.configuration.alignment : layoutsContainer.mainLayoutPosition //property int panelAlignment: plasmoid.configuration.alignment !== LatteCore.Types.Justify ? plasmoid.configuration.alignment : layoutsContainer.mainLayoutPosition
property int panelAlignment: !root.inConfigureAppletsMode ? plasmoid.configuration.alignment : property int panelAlignment: !root.inConfigureAppletsMode ? plasmoid.configuration.alignment :
( plasmoid.configuration.alignment === Latte.Types.Justify ? ( plasmoid.configuration.alignment === LatteCore.Types.Justify ?
Latte.Types.Center : plasmoid.configuration.alignment ) LatteCore.Types.Center : plasmoid.configuration.alignment )
property int panelUserSetAlignment: plasmoid.configuration.alignment property int panelUserSetAlignment: plasmoid.configuration.alignment
@ -479,9 +478,9 @@ Item {
property QtObject selectedWindowsTracker: { property QtObject selectedWindowsTracker: {
if (latteView && latteView.windowsTracker) { if (latteView && latteView.windowsTracker) {
switch(plasmoid.configuration.activeWindowFilter) { switch(plasmoid.configuration.activeWindowFilter) {
case Latte.Types.ActiveInCurrentScreen: case LatteCore.Types.ActiveInCurrentScreen:
return latteView.windowsTracker.currentScreen; return latteView.windowsTracker.currentScreen;
case Latte.Types.ActiveFromAllScreens: case LatteCore.Types.ActiveFromAllScreens:
return latteView.windowsTracker.allScreens; return latteView.windowsTracker.allScreens;
} }
} }
@ -503,11 +502,11 @@ Item {
readonly property bool hasInternalSeparator: latteApplet ? latteApplet.hasInternalSeparator : false readonly property bool hasInternalSeparator: latteApplet ? latteApplet.hasInternalSeparator : false
property int animationStep: { property int animationStep: {
if (!universalSettings || universalSettings.mouseSensitivity === Latte.Types.HighSensitivity) { if (!universalSettings || universalSettings.mouseSensitivity === LatteCore.Types.HighSensitivity) {
return 1; return 1;
} else if (universalSettings.mouseSensitivity === Latte.Types.MediumSensitivity) { } else if (universalSettings.mouseSensitivity === LatteCore.Types.MediumSensitivity) {
return Math.max(3, container.iconSize / 18); return Math.max(3, container.iconSize / 18);
} else if (universalSettings.mouseSensitivity === Latte.Types.LowSensitivity) { } else if (universalSettings.mouseSensitivity === LatteCore.Types.LowSensitivity) {
return Math.max(5, container.iconSize / 10); return Math.max(5, container.iconSize / 10);
} }
} }
@ -665,7 +664,7 @@ Item {
} }
onInConfigureAppletsModeChanged: { onInConfigureAppletsModeChanged: {
if (inConfigureAppletsMode && panelUserSetAlignment===Latte.Types.Justify) { if (inConfigureAppletsMode && panelUserSetAlignment===LatteCore.Types.Justify) {
joinLayoutsToMainLayout(); joinLayoutsToMainLayout();
} else if (!inConfigureAppletsMode) { } else if (!inConfigureAppletsMode) {
splitMainLayoutToLayouts(); splitMainLayoutToLayouts();
@ -682,7 +681,7 @@ Item {
} }
if (!inConfigureAppletsMode){ if (!inConfigureAppletsMode){
if (panelUserSetAlignment===Latte.Types.Justify) { if (panelUserSetAlignment===LatteCore.Types.Justify) {
addInternalViewSplitters(); addInternalViewSplitters();
splitMainLayoutToLayouts(); splitMainLayoutToLayouts();
} else { } else {
@ -690,7 +689,7 @@ Item {
root.destroyInternalViewSplitters(); root.destroyInternalViewSplitters();
} }
} else { } else {
if (panelUserSetAlignment===Latte.Types.Justify) { if (panelUserSetAlignment===LatteCore.Types.Justify) {
addInternalViewSplitters(); addInternalViewSplitters();
} else { } else {
root.destroyInternalViewSplitters(); root.destroyInternalViewSplitters();
@ -748,15 +747,15 @@ Item {
onIsVerticalChanged: { onIsVerticalChanged: {
if (isVertical) { if (isVertical) {
if (plasmoid.configuration.alignment === Latte.Types.Left) if (plasmoid.configuration.alignment === LatteCore.Types.Left)
plasmoid.configuration.alignment = Latte.Types.Top; plasmoid.configuration.alignment = LatteCore.Types.Top;
else if (plasmoid.configuration.alignment === Latte.Types.Right) else if (plasmoid.configuration.alignment === LatteCore.Types.Right)
plasmoid.configuration.alignment = Latte.Types.Bottom; plasmoid.configuration.alignment = LatteCore.Types.Bottom;
} else { } else {
if (plasmoid.configuration.alignment === Latte.Types.Top) if (plasmoid.configuration.alignment === LatteCore.Types.Top)
plasmoid.configuration.alignment = Latte.Types.Left; plasmoid.configuration.alignment = LatteCore.Types.Left;
else if (plasmoid.configuration.alignment === Latte.Types.Bottom) else if (plasmoid.configuration.alignment === LatteCore.Types.Bottom)
plasmoid.configuration.alignment = Latte.Types.Right; plasmoid.configuration.alignment = LatteCore.Types.Right;
} }
} }
@ -879,10 +878,10 @@ Item {
///to add applets ///to add applets
/* if (plasmoid.immutable) { /* if (plasmoid.immutable) {
if(root.isHorizontal) { if(root.isHorizontal) {
root.Layout.preferredWidth = (plasmoid.configuration.alignment === Latte.Types.Justify ? root.Layout.preferredWidth = (plasmoid.configuration.alignment === LatteCore.Types.Justify ?
layoutsContainer.width + 0.5*iconMargin : layoutsContainer.mainLayout.width + iconMargin); layoutsContainer.width + 0.5*iconMargin : layoutsContainer.mainLayout.width + iconMargin);
} else { } else {
root.Layout.preferredHeight = (plasmoid.configuration.alignment === Latte.Types.Justify ? root.Layout.preferredHeight = (plasmoid.configuration.alignment === LatteCore.Types.Justify ?
layoutsContainer.height + 0.5*iconMargin : layoutsContainer.mainLayout.height + iconMargin); layoutsContainer.height + 0.5*iconMargin : layoutsContainer.mainLayout.height + iconMargin);
} }
} else { } else {

@ -0,0 +1,33 @@
/*
* Copyright 2020 Michail Vourlakos <mvourlakos@gmail.com>
*
* This file is part of Latte-Dock
*
* Latte-Dock is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* Latte-Dock is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "lattecontainmentplugin.h"
// local
#include "types.h"
// Qt
#include <QtQml>
void LatteContainmentPlugin::registerTypes(const char *uri)
{
Q_ASSERT(uri == QLatin1String("org.kde.latte.private.containment"));
qmlRegisterUncreatableType<Latte::Containment::Types>(uri, 0, 1, "Types", "Latte Containment Types uncreatable");
}

@ -0,0 +1,35 @@
/*
* Copyright 2020 Michail Vourlakos <mvourlakos@gmail.com>
*
* This file is part of Latte-Dock
*
* Latte-Dock is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* Latte-Dock is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef LATTECONTAINMENTPLUGIN_H
#define LATTECONTAINMENTPLUGIN_H
// Qt
#include <QQmlExtensionPlugin>
class LatteContainmentPlugin : public QQmlExtensionPlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
public:
void registerTypes(const char *uri) override;
};
#endif

@ -0,0 +1,2 @@
module org.kde.latte.private.containment
plugin lattecontainmentplugin

@ -0,0 +1,20 @@
/*
* Copyright 2020 Michail Vourlakos <mvourlakos@gmail.com>
*
* This file is part of Latte-Dock
*
* Latte-Dock is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* Latte-Dock is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "types.h"

@ -0,0 +1,43 @@
/*
* Copyright 2020 Michail Vourlakos <mvourlakos@gmail.com>
*
* This file is part of Latte-Dock
*
* Latte-Dock is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* Latte-Dock is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef LATTECONTAINMENTTYPES_H
#define LATTECONTAINMENTTYPES_H
// Qt
#include <QObject>
#include <QMetaEnum>
#include <QMetaType>
namespace Latte {
namespace Containment {
class Types
{
Q_GADGET
public:
Types() = delete;
~Types() {}
};
}
}
#endif

@ -23,7 +23,6 @@ import QtQuick.Layouts 1.3
import org.kde.plasma.components 2.0 as PlasmaComponents import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.components 3.0 as PlasmaComponents3 import org.kde.plasma.components 3.0 as PlasmaComponents3
import org.kde.latte 0.2 as Latte
import org.kde.latte.components 1.0 as LatteComponents import org.kde.latte.components 1.0 as LatteComponents
Rectangle { Rectangle {

@ -22,8 +22,6 @@ import QtQuick 2.1
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import QtGraphicalEffects 1.0 import QtGraphicalEffects 1.0
import org.kde.latte 0.2 as Latte
Item{ Item{
id: shadowRoot id: shadowRoot

@ -27,8 +27,6 @@ import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.plasmoid 2.0 import org.kde.plasma.plasmoid 2.0
import org.kde.latte 0.2 as Latte
import "." as LatteExtraControls import "." as LatteExtraControls
import "private" as Private import "private" as Private

@ -21,6 +21,7 @@ target_link_libraries(lattecoreplugin
KF5::PlasmaQuick KF5::PlasmaQuick
KF5::QuickAddons KF5::QuickAddons
KF5::IconThemes KF5::IconThemes
Latte
) )
if(HAVE_X11) if(HAVE_X11)

@ -29,9 +29,13 @@
// Qt // Qt
#include <QtQml> #include <QtQml>
// Latte
#include <Latte>
void LatteCorePlugin::registerTypes(const char *uri) void LatteCorePlugin::registerTypes(const char *uri)
{ {
Q_ASSERT(uri == QLatin1String("org.kde.latte.core")); Q_ASSERT(uri == QLatin1String("org.kde.latte.core"));
qmlRegisterUncreatableType<Latte::Types>(uri, 0, 2, "Types", "Latte Types uncreatable");
qmlRegisterType<Latte::BackgroundTracker>(uri, 0, 2, "BackgroundTracker"); qmlRegisterType<Latte::BackgroundTracker>(uri, 0, 2, "BackgroundTracker");
qmlRegisterType<Latte::IconItem>(uri, 0, 2, "IconItem"); qmlRegisterType<Latte::IconItem>(uri, 0, 2, "IconItem");
qmlRegisterSingletonType<Latte::Environment>(uri, 0, 2, "Environment", &Latte::environment_qobject_singletontype_provider); qmlRegisterSingletonType<Latte::Environment>(uri, 0, 2, "Environment", &Latte::environment_qobject_singletontype_provider);

@ -1,3 +1,19 @@
add_definitions(-DTRANSLATION_DOMAIN=\"plasma_applet_org.kde.latte.plasmoid\")
configure_file(metadata.desktop.cmake ${CMAKE_CURRENT_SOURCE_DIR}/package/metadata.desktop) configure_file(metadata.desktop.cmake ${CMAKE_CURRENT_SOURCE_DIR}/package/metadata.desktop)
plasma_install_package(package org.kde.latte.plasmoid) plasma_install_package(package org.kde.latte.plasmoid)
set(tasks_SRCS
plugin/types.cpp
plugin/lattetasksplugin.cpp
)
add_library(lattetasksplugin SHARED ${tasks_SRCS})
target_link_libraries(lattetasksplugin
Qt5::Core
Qt5::Qml)
install(TARGETS lattetasksplugin DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/latte/private/tasks)
install(FILES plugin/qmldir DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/latte/private/tasks)

@ -27,8 +27,8 @@ import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.activities 0.1 as Activities import org.kde.activities 0.1 as Activities
import org.kde.taskmanager 0.1 as TaskManager import org.kde.taskmanager 0.1 as TaskManager
import org.kde.latte 0.2 as Latte
import org.kde.latte.core 0.2 as LatteCore import org.kde.latte.core 0.2 as LatteCore
import org.kde.latte.private.tasks 0.1 as LatteTasks
import "../code/activitiesTools.js" as ActivitiesTools import "../code/activitiesTools.js" as ActivitiesTools
@ -730,7 +730,7 @@ PlasmaComponents.ContextMenu {
if (tasksModel.launcherPosition(get(atm.LauncherUrlWithoutIcon)) != -1) { if (tasksModel.launcherPosition(get(atm.LauncherUrlWithoutIcon)) != -1) {
var launcher = get(atm.LauncherUrl); var launcher = get(atm.LauncherUrl);
if (latteView && root.launchersGroup >= Latte.Tasks.LayoutLaunchers) { if (latteView && root.launchersGroup >= LatteCore.Types.LayoutLaunchers) {
latteView.layoutsManager.launchersSignals.removeLauncher(root.viewLayoutName, latteView.layoutsManager.launchersSignals.removeLauncher(root.viewLayoutName,
root.launchersGroup, launcher); root.launchersGroup, launcher);
} else { } else {
@ -741,7 +741,7 @@ PlasmaComponents.ContextMenu {
} else { } else {
var launcher = get(atm.LauncherUrl); var launcher = get(atm.LauncherUrl);
if (latteView && root.launchersGroup >= Latte.Tasks.LayoutLaunchers) { if (latteView && root.launchersGroup >= LatteCore.Types.LayoutLaunchers) {
latteView.layoutsManager.launchersSignals.addLauncher(root.viewLayoutName, latteView.layoutsManager.launchersSignals.addLauncher(root.viewLayoutName,
root.launchersGroup, launcher); root.launchersGroup, launcher);
} else { } else {
@ -790,7 +790,7 @@ PlasmaComponents.ContextMenu {
result.clicked.connect( result.clicked.connect(
function() { function() {
if (result.checked) { if (result.checked) {
if (latteView && root.launchersGroup >= Latte.Tasks.LayoutLaunchers) { if (latteView && root.launchersGroup >= LatteCore.Types.LayoutLaunchers) {
latteView.layoutsManager.launchersSignals.addLauncherToActivity(root.viewLayoutName, latteView.layoutsManager.launchersSignals.addLauncherToActivity(root.viewLayoutName,
root.launchersGroup, url, id); root.launchersGroup, url, id);
} else { } else {
@ -802,7 +802,7 @@ PlasmaComponents.ContextMenu {
root.launchersUpdatedFor(url); root.launchersUpdatedFor(url);
} }
} else { } else {
if (latteView && root.launchersGroup >= Latte.Tasks.LayoutLaunchers) { if (latteView && root.launchersGroup >= LatteCore.Types.LayoutLaunchers) {
latteView.layoutsManager.launchersSignals.removeLauncherFromActivity(root.viewLayoutName, latteView.layoutsManager.launchersSignals.removeLauncherFromActivity(root.viewLayoutName,
root.launchersGroup, url, id); root.launchersGroup, url, id);
} else { } else {
@ -861,7 +861,7 @@ PlasmaComponents.ContextMenu {
onClicked: { onClicked: {
var launcher = get(atm.LauncherUrlWithoutIcon); var launcher = get(atm.LauncherUrlWithoutIcon);
if (latteView && root.launchersGroup >= Latte.Tasks.LayoutLaunchers) { if (latteView && root.launchersGroup >= LatteCore.Types.LayoutLaunchers) {
latteView.layoutsManager.launchersSignals.removeLauncher(root.viewLayoutName, latteView.layoutsManager.launchersSignals.removeLauncher(root.viewLayoutName,
root.launchersGroup, launcher); root.launchersGroup, launcher);
} else { } else {
@ -905,7 +905,7 @@ PlasmaComponents.ContextMenu {
//root.removeLastSeparator(); //root.removeLastSeparator();
var launcher = get(atm.LauncherUrlWithoutIcon); var launcher = get(atm.LauncherUrlWithoutIcon);
if (latteView && root.launchersGroup >= Latte.Tasks.LayoutLaunchers) { if (latteView && root.launchersGroup >= LatteCore.Types.LayoutLaunchers) {
latteView.layoutsManager.launchersSignals.removeLauncher(root.viewLayoutName, latteView.layoutsManager.launchersSignals.removeLauncher(root.viewLayoutName,
root.launchersGroup, launcher); root.launchersGroup, launcher);
} else { } else {

@ -22,8 +22,6 @@ import QtQuick 2.0
import org.kde.plasma.plasmoid 2.0 import org.kde.plasma.plasmoid 2.0
import org.kde.latte 0.2 as Latte
// holds all the logic around parabolic effect signals into one place. // holds all the logic around parabolic effect signals into one place.
// ParabolicManager is responsible for triggering all the messages to tasks // ParabolicManager is responsible for triggering all the messages to tasks
// that are neighbour to the hovered task. This will help a lot to catch cases // that are neighbour to the hovered task. This will help a lot to catch cases

@ -22,8 +22,6 @@ import QtQuick 2.0
import org.kde.plasma.plasmoid 2.0 import org.kde.plasma.plasmoid 2.0
import org.kde.latte 0.2 as Latte
//! Trying to WORKAROUND all the Plasma LibTaskManager limitations //! Trying to WORKAROUND all the Plasma LibTaskManager limitations
//! concerning Tasks AND Launchers. //! concerning Tasks AND Launchers.
//! //!

@ -22,8 +22,6 @@ import QtQuick 2.7
import org.kde.plasma.plasmoid 2.0 import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.latte 0.2 as Latte
import "options" as IndicatorOptions import "options" as IndicatorOptions
import "styles" as IndicatorStyles import "styles" as IndicatorStyles
import "../task/indicator" as TaskIndicator import "../task/indicator" as TaskIndicator

@ -22,8 +22,6 @@ import QtQuick 2.7
import org.kde.plasma.plasmoid 2.0 import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.latte 0.2 as Latte
Item{ Item{
readonly property string styleName: "Latte" readonly property string styleName: "Latte"

@ -25,7 +25,6 @@ import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.latte 0.2 as Latte
import org.kde.latte.components 1.0 as LatteComponents import org.kde.latte.components 1.0 as LatteComponents
LatteComponents.IndicatorItem{ LatteComponents.IndicatorItem{

@ -31,11 +31,11 @@ import org.kde.plasma.private.taskmanager 0.1 as TaskManagerApplet
import org.kde.activities 0.1 as Activities import org.kde.activities 0.1 as Activities
import org.kde.latte 0.2 as Latte
import org.kde.latte.core 0.2 as LatteCore import org.kde.latte.core 0.2 as LatteCore
import org.kde.latte.components 1.0 as LatteComponents import org.kde.latte.components 1.0 as LatteComponents
import org.kde.latte.applet.abilities 0.1 as AppletAbility import org.kde.latte.applet.abilities 0.1 as AppletAbility
import org.kde.latte.private.tasks 0.1 as LatteTasks
import "abilities" as Ability import "abilities" as Ability
import "previews" as Previews import "previews" as Previews
@ -160,13 +160,13 @@ Item {
property bool disableRightSpacer: false property bool disableRightSpacer: false
property bool dockIsHidden: latteView ? latteView.dockIsHidden : false property bool dockIsHidden: latteView ? latteView.dockIsHidden : false
property bool groupTasksByDefault: plasmoid.configuration.groupTasksByDefault property bool groupTasksByDefault: plasmoid.configuration.groupTasksByDefault
property bool highlightWindows: latteView ? latteView.hoverAction === Latte.Tasks.HighlightWindows || latteView.hoverAction === Latte.Tasks.PreviewAndHighlightWindows : property bool highlightWindows: latteView ? latteView.hoverAction === LatteTasks.Types.HighlightWindows || latteView.hoverAction === LatteTasks.Types.PreviewAndHighlightWindows :
plasmoid.configuration.highlightWindows plasmoid.configuration.highlightWindows
property bool parabolicEffectEnabled: latteView ? latteView.parabolicEffectEnabled : zoomFactor>1 && !root.editMode property bool parabolicEffectEnabled: latteView ? latteView.parabolicEffectEnabled : zoomFactor>1 && !root.editMode
property bool scrollingEnabled: plasmoid.configuration.scrollTasksEnabled property bool scrollingEnabled: plasmoid.configuration.scrollTasksEnabled
property bool autoScrollTasksEnabled: scrollingEnabled && plasmoid.configuration.autoScrollTasksEnabled property bool autoScrollTasksEnabled: scrollingEnabled && plasmoid.configuration.autoScrollTasksEnabled
property bool manualScrollTasksEnabled: scrollingEnabled && manualScrollTasksType !== Latte.Tasks.ManualScrollDisabled property bool manualScrollTasksEnabled: scrollingEnabled && manualScrollTasksType !== LatteTasks.Types.ManualScrollDisabled
property int manualScrollTasksType: plasmoid.configuration.manualScrollTasksType property int manualScrollTasksType: plasmoid.configuration.manualScrollTasksType
property bool showInfoBadge: plasmoid.configuration.showInfoBadge property bool showInfoBadge: plasmoid.configuration.showInfoBadge
@ -177,7 +177,7 @@ Item {
property bool showOnlyCurrentScreen: plasmoid.configuration.showOnlyCurrentScreen property bool showOnlyCurrentScreen: plasmoid.configuration.showOnlyCurrentScreen
property bool showOnlyCurrentDesktop: plasmoid.configuration.showOnlyCurrentDesktop property bool showOnlyCurrentDesktop: plasmoid.configuration.showOnlyCurrentDesktop
property bool showOnlyCurrentActivity: plasmoid.configuration.showOnlyCurrentActivity property bool showOnlyCurrentActivity: plasmoid.configuration.showOnlyCurrentActivity
property bool showPreviews: latteView ? latteView.hoverAction === Latte.Tasks.PreviewWindows || latteView.hoverAction === Latte.Tasks.PreviewAndHighlightWindows : property bool showPreviews: latteView ? latteView.hoverAction === LatteTasks.Types.PreviewWindows || latteView.hoverAction === LatteTasks.Types.PreviewAndHighlightWindows :
plasmoid.configuration.showToolTips plasmoid.configuration.showToolTips
property bool showWindowActions: plasmoid.configuration.showWindowActions property bool showWindowActions: plasmoid.configuration.showWindowActions
property bool showWindowsOnlyFromLaunchers: plasmoid.configuration.showWindowsOnlyFromLaunchers property bool showWindowsOnlyFromLaunchers: plasmoid.configuration.showWindowsOnlyFromLaunchers
@ -198,22 +198,22 @@ Item {
property int modifierClickAction: plasmoid.configuration.modifierClickAction property int modifierClickAction: plasmoid.configuration.modifierClickAction
property int modifierClick: plasmoid.configuration.modifierClick property int modifierClick: plasmoid.configuration.modifierClick
property int modifierQt:{ property int modifierQt:{
if (modifier === Latte.Tasks.Shift) if (modifier === LatteTasks.Types.Shift)
return Qt.ShiftModifier; return Qt.ShiftModifier;
else if (modifier === Latte.Tasks.Ctrl) else if (modifier === LatteTasks.Types.Ctrl)
return Qt.ControlModifier; return Qt.ControlModifier;
else if (modifier === Latte.Tasks.Alt) else if (modifier === LatteTasks.Types.Alt)
return Qt.AltModifier; return Qt.AltModifier;
else if (modifier === Latte.Tasks.Meta) else if (modifier === LatteTasks.Types.Meta)
return Qt.MetaModifier; return Qt.MetaModifier;
else return -1; else return -1;
} }
property int taskScrollAction: plasmoid.configuration.taskScrollAction property int taskScrollAction: plasmoid.configuration.taskScrollAction
onTaskScrollActionChanged: { onTaskScrollActionChanged: {
if (taskScrollAction > Latte.Tasks.ScrollToggleMinimized) { if (taskScrollAction > LatteTasks.Types.ScrollToggleMinimized) {
//! migrating scroll action to Latte.Tasks.ScrollAction //! migrating scroll action to LatteTasks.Types.ScrollAction
plasmoid.configuration.taskScrollAction = plasmoid.configuration.taskScrollAction-Latte.Tasks.ScrollToggleMinimized; plasmoid.configuration.taskScrollAction = plasmoid.configuration.taskScrollAction-LatteTasks.Types.ScrollToggleMinimized;
} }
} }
@ -314,8 +314,8 @@ Item {
plasmoid.action("configure").visible = false; plasmoid.action("configure").visible = false;
plasmoid.configuration.isInLatteDock = true; plasmoid.configuration.isInLatteDock = true;
if (root.launchersGroup === Latte.Tasks.LayoutLaunchers if (root.launchersGroup === LatteCore.Types.LayoutLaunchers
|| root.launchersGroup === Latte.Tasks.GlobalLaunchers) { || root.launchersGroup === LatteCore.Types.GlobalLaunchers) {
tasksModel.updateLaunchersList(); tasksModel.updateLaunchersList();
} }
} else { } else {
@ -406,23 +406,23 @@ Item {
} }
if (inConfigureAppletsMode) { if (inConfigureAppletsMode) {
return Latte.Types.Center; return LatteCore.Types.Center;
} else if (latteView.panelUserSetAlignment === Latte.Types.Justify) { } else if (latteView.panelUserSetAlignment === LatteCore.Types.Justify) {
if (latteView.latteAppletPos>=0 && latteView.latteAppletPos<100) { if (latteView.latteAppletPos>=0 && latteView.latteAppletPos<100) {
return plasmoid.formFactor === PlasmaCore.Types.Horizontal ? Latte.Types.Left : Latte.Types.Top; return plasmoid.formFactor === PlasmaCore.Types.Horizontal ? LatteCore.Types.Left : LatteCore.Types.Top;
} else if (latteView.latteAppletPos>=100 && latteView.latteAppletPos<200) { } else if (latteView.latteAppletPos>=100 && latteView.latteAppletPos<200) {
return Latte.Types.Center; return LatteCore.Types.Center;
} else if (latteView.latteAppletPos>=200) { } else if (latteView.latteAppletPos>=200) {
return plasmoid.formFactor === PlasmaCore.Types.Horizontal ? Latte.Types.Right : Latte.Types.Bottom; return plasmoid.formFactor === PlasmaCore.Types.Horizontal ? LatteCore.Types.Right : LatteCore.Types.Bottom;
} }
return Latte.Types.Center; return LatteCore.Types.Center;
} }
return latteView.panelUserSetAlignment; return latteView.panelUserSetAlignment;
} }
return Latte.Types.Center; return LatteCore.Types.Center;
} }
} }
@ -473,12 +473,12 @@ Item {
if (viewLayout) { if (viewLayout) {
if (latteView && latteView.layoutsManager if (latteView && latteView.layoutsManager
&& latteView.viewLayout && latteView.universalSettings && latteView.viewLayout && latteView.universalSettings
&& (root.launchersGroup === Latte.Tasks.LayoutLaunchers && (root.launchersGroup === LatteCore.Types.LayoutLaunchers
|| root.launchersGroup === Latte.Tasks.GlobalLaunchers)) { || root.launchersGroup === LatteCore.Types.GlobalLaunchers)) {
if (root.launchersGroup === Latte.Tasks.LayoutLaunchers) { if (root.launchersGroup === LatteCore.Types.LayoutLaunchers) {
launchersList = latteView.viewLayout.launchers; launchersList = latteView.viewLayout.launchers;
} else if (root.launchersGroup === Latte.Tasks.GlobalLaunchers) { } else if (root.launchersGroup === LatteCore.Types.GlobalLaunchers) {
launchersList = latteView.universalSettings.launchers; launchersList = latteView.universalSettings.launchers;
} }
} }
@ -701,12 +701,12 @@ Item {
function updateLaunchersList(){ function updateLaunchersList(){
if (latteView if (latteView
&& (root.launchersGroup === Latte.Tasks.LayoutLaunchers && (root.launchersGroup === LatteCore.Types.LayoutLaunchers
|| root.launchersGroup === Latte.Tasks.GlobalLaunchers)) { || root.launchersGroup === LatteCore.Types.GlobalLaunchers)) {
if (root.launchersGroup === Latte.Tasks.LayoutLaunchers) { if (root.launchersGroup === LatteCore.Types.LayoutLaunchers) {
console.log("Tasks: Applying LAYOUT Launchers List..."); console.log("Tasks: Applying LAYOUT Launchers List...");
tasksModel.launcherList = latteView.viewLayout.launchers; tasksModel.launcherList = latteView.viewLayout.launchers;
} else if (root.launchersGroup === Latte.Tasks.GlobalLaunchers) { } else if (root.launchersGroup === LatteCore.Types.GlobalLaunchers) {
console.log("Tasks: Applying GLOBAL Launchers List..."); console.log("Tasks: Applying GLOBAL Launchers List...");
tasksModel.launcherList = latteView.universalSettings.launchers; tasksModel.launcherList = latteView.universalSettings.launchers;
} }
@ -735,17 +735,17 @@ Item {
if (viewLayout) { if (viewLayout) {
if (latteView && latteView.layoutsManager if (latteView && latteView.layoutsManager
&& latteView.viewLayout && latteView.universalSettings && latteView.viewLayout && latteView.universalSettings
&& (root.launchersGroup === Latte.Tasks.LayoutLaunchers && (root.launchersGroup === LatteCore.Types.LayoutLaunchers
|| root.launchersGroup === Latte.Tasks.GlobalLaunchers)) { || root.launchersGroup === LatteCore.Types.GlobalLaunchers)) {
if (root.launchersGroup === Latte.Tasks.LayoutLaunchers) { if (root.launchersGroup === LatteCore.Types.LayoutLaunchers) {
latteView.viewLayout.launchers = launcherList; latteView.viewLayout.launchers = launcherList;
} else if (root.launchersGroup === Latte.Tasks.GlobalLaunchers) { } else if (root.launchersGroup === LatteCore.Types.GlobalLaunchers) {
latteView.universalSettings.launchers = launcherList; latteView.universalSettings.launchers = launcherList;
} }
if (inDraggingPhase) { if (inDraggingPhase) {
if (latteView && root.launchersGroup >= Latte.Tasks.LayoutLaunchers) { if (latteView && root.launchersGroup >= LatteCore.Types.LayoutLaunchers) {
latteView.layoutsManager.launchersSignals.validateLaunchersOrder(root.viewLayoutName, latteView.layoutsManager.launchersSignals.validateLaunchersOrder(root.viewLayoutName,
plasmoid.id, plasmoid.id,
root.launchersGroup, root.launchersGroup,
@ -785,12 +785,12 @@ Item {
ActivitiesTools.importLaunchersToNewArchitecture(); ActivitiesTools.importLaunchersToNewArchitecture();
if (viewLayout && latteView.universalSettings if (viewLayout && latteView.universalSettings
&& (root.launchersGroup === Latte.Tasks.LayoutLaunchers && (root.launchersGroup === LatteCore.Types.LayoutLaunchers
|| root.launchersGroup === Latte.Tasks.GlobalLaunchers)) { || root.launchersGroup === LatteCore.Types.GlobalLaunchers)) {
if (root.launchersGroup === Latte.Tasks.LayoutLaunchers) { if (root.launchersGroup === LatteCore.Types.LayoutLaunchers) {
launcherList = latteView.viewLayout.launchers; launcherList = latteView.viewLayout.launchers;
} else if (root.launchersGroup === Latte.Tasks.GlobalLaunchers) { } else if (root.launchersGroup === LatteCore.Types.GlobalLaunchers) {
launcherList = latteView.universalSettings.launchers; launcherList = latteView.universalSettings.launchers;
} }
} else { } else {
@ -1209,7 +1209,7 @@ Item {
onUrlsDropped: { onUrlsDropped: {
//! inform synced docks for new dropped launchers //! inform synced docks for new dropped launchers
if (latteView && root.launchersGroup >= Latte.Tasks.LayoutLaunchers && onlyLaunchersInList(urls)) { if (latteView && root.launchersGroup >= LatteCore.Types.LayoutLaunchers && onlyLaunchersInList(urls)) {
latteView.layoutsManager.launchersSignals.urlsDropped(root.viewLayoutName, latteView.layoutsManager.launchersSignals.urlsDropped(root.viewLayoutName,
root.launchersGroup, urls); root.launchersGroup, urls);
return; return;
@ -1567,7 +1567,7 @@ Item {
if (separatorName !== "") { if (separatorName !== "") {
tasksExtendedManager.addLauncherToBeMoved(separatorName, Math.max(0,pos)); tasksExtendedManager.addLauncherToBeMoved(separatorName, Math.max(0,pos));
if (latteView && root.launchersGroup >= Latte.Tasks.LayoutLaunchers) { if (latteView && root.launchersGroup >= LatteCore.Types.LayoutLaunchers) {
latteView.layoutsManager.launchersSignals.addLauncher(root.viewLayoutName, latteView.layoutsManager.launchersSignals.addLauncher(root.viewLayoutName,
root.launchersGroup, separatorName); root.launchersGroup, separatorName);
} else { } else {
@ -1740,7 +1740,7 @@ Item {
if (separatorName !== "") { if (separatorName !== "") {
tasksExtendedManager.addLauncherToBeMoved(separatorName, Math.max(0,pos)); tasksExtendedManager.addLauncherToBeMoved(separatorName, Math.max(0,pos));
if (latteView && root.launchersGroup >= Latte.Tasks.LayoutLaunchers) { if (latteView && root.launchersGroup >= LatteCore.Types.LayoutLaunchers) {
latteView.layoutsManager.launchersSignals.addLauncher(root.launchersGroup, separatorName); latteView.layoutsManager.launchersSignals.addLauncher(root.launchersGroup, separatorName);
} else { } else {
tasksModel.requestAddLauncher(separatorName); tasksModel.requestAddLauncher(separatorName);
@ -1752,7 +1752,7 @@ Item {
var separatorName = parabolicManager.lastPresentSeparatorName(); var separatorName = parabolicManager.lastPresentSeparatorName();
if (separatorName !== "") { if (separatorName !== "") {
if (latteView && root.launchersGroup >= Latte.Tasks.LayoutLaunchers) { if (latteView && root.launchersGroup >= LatteCore.Types.LayoutLaunchers) {
latteView.layoutsManager.launchersSignals.removeLauncher(root.viewLayoutName, latteView.layoutsManager.launchersSignals.removeLauncher(root.viewLayoutName,
root.launchersGroup, separatorName); root.launchersGroup, separatorName);
} else { } else {
@ -1941,7 +1941,7 @@ Item {
///Bottom Edge ///Bottom Edge
State { State {
name: "bottomCenter" name: "bottomCenter"
when: (root.location===PlasmaCore.Types.BottomEdge && root.alignment===Latte.Types.Center) when: (root.location===PlasmaCore.Types.BottomEdge && root.alignment===LatteCore.Types.Center)
AnchorChanges { AnchorChanges {
target: barLine target: barLine
@ -1954,7 +1954,7 @@ Item {
}, },
State { State {
name: "bottomLeft" name: "bottomLeft"
when: (root.location===PlasmaCore.Types.BottomEdge && root.alignment===Latte.Types.Left) when: (root.location===PlasmaCore.Types.BottomEdge && root.alignment===LatteCore.Types.Left)
AnchorChanges { AnchorChanges {
target: barLine target: barLine
@ -1967,7 +1967,7 @@ Item {
}, },
State { State {
name: "bottomRight" name: "bottomRight"
when: (root.location===PlasmaCore.Types.BottomEdge && root.alignment===Latte.Types.Right) when: (root.location===PlasmaCore.Types.BottomEdge && root.alignment===LatteCore.Types.Right)
AnchorChanges { AnchorChanges {
target: barLine target: barLine
@ -1981,7 +1981,7 @@ Item {
///Top Edge ///Top Edge
State { State {
name: "topCenter" name: "topCenter"
when: (root.location===PlasmaCore.Types.TopEdge && root.alignment===Latte.Types.Center) when: (root.location===PlasmaCore.Types.TopEdge && root.alignment===LatteCore.Types.Center)
AnchorChanges { AnchorChanges {
target: barLine target: barLine
@ -1994,7 +1994,7 @@ Item {
}, },
State { State {
name: "topLeft" name: "topLeft"
when: (root.location===PlasmaCore.Types.TopEdge && root.alignment===Latte.Types.Left) when: (root.location===PlasmaCore.Types.TopEdge && root.alignment===LatteCore.Types.Left)
AnchorChanges { AnchorChanges {
target: barLine target: barLine
@ -2007,7 +2007,7 @@ Item {
}, },
State { State {
name: "topRight" name: "topRight"
when: (root.location===PlasmaCore.Types.TopEdge && root.alignment===Latte.Types.Right) when: (root.location===PlasmaCore.Types.TopEdge && root.alignment===LatteCore.Types.Right)
AnchorChanges { AnchorChanges {
target: barLine target: barLine
@ -2021,7 +2021,7 @@ Item {
////Left Edge ////Left Edge
State { State {
name: "leftCenter" name: "leftCenter"
when: (root.location===PlasmaCore.Types.LeftEdge && root.alignment===Latte.Types.Center) when: (root.location===PlasmaCore.Types.LeftEdge && root.alignment===LatteCore.Types.Center)
AnchorChanges { AnchorChanges {
target: barLine target: barLine
@ -2034,7 +2034,7 @@ Item {
}, },
State { State {
name: "leftTop" name: "leftTop"
when: (root.location===PlasmaCore.Types.LeftEdge && root.alignment===Latte.Types.Top) when: (root.location===PlasmaCore.Types.LeftEdge && root.alignment===LatteCore.Types.Top)
AnchorChanges { AnchorChanges {
target: barLine target: barLine
@ -2047,7 +2047,7 @@ Item {
}, },
State { State {
name: "leftBottom" name: "leftBottom"
when: (root.location===PlasmaCore.Types.LeftEdge && root.alignment===Latte.Types.Bottom) when: (root.location===PlasmaCore.Types.LeftEdge && root.alignment===LatteCore.Types.Bottom)
AnchorChanges { AnchorChanges {
target: barLine target: barLine
@ -2061,7 +2061,7 @@ Item {
///Right Edge ///Right Edge
State { State {
name: "rightCenter" name: "rightCenter"
when: (root.location===PlasmaCore.Types.RightEdge && root.alignment===Latte.Types.Center) when: (root.location===PlasmaCore.Types.RightEdge && root.alignment===LatteCore.Types.Center)
AnchorChanges { AnchorChanges {
target: barLine target: barLine
@ -2074,7 +2074,7 @@ Item {
}, },
State { State {
name: "rightTop" name: "rightTop"
when: (root.location===PlasmaCore.Types.RightEdge && root.alignment===Latte.Types.Top) when: (root.location===PlasmaCore.Types.RightEdge && root.alignment===LatteCore.Types.Top)
AnchorChanges { AnchorChanges {
target: barLine target: barLine
@ -2087,7 +2087,7 @@ Item {
}, },
State { State {
name: "rightBottom" name: "rightBottom"
when: (root.location===PlasmaCore.Types.RightEdge && root.alignment===Latte.Types.Bottom) when: (root.location===PlasmaCore.Types.RightEdge && root.alignment===LatteCore.Types.Bottom)
AnchorChanges { AnchorChanges {
target: barLine target: barLine

@ -30,7 +30,6 @@ import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.extras 2.0 as PlasmaExtras import org.kde.plasma.extras 2.0 as PlasmaExtras
import org.kde.kquickcontrolsaddons 2.0 as KQuickControlsAddons import org.kde.kquickcontrolsaddons 2.0 as KQuickControlsAddons
import org.kde.latte 0.2 as Latte
import org.kde.latte.core 0.2 as LatteCore import org.kde.latte.core 0.2 as LatteCore
import org.kde.draganddrop 2.0 import org.kde.draganddrop 2.0

@ -21,7 +21,6 @@ import QtQuick 2.0
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.latte 0.2 as Latte
import org.kde.latte.core 0.2 as LatteCore import org.kde.latte.core 0.2 as LatteCore
import org.kde.latte.components 1.0 as LatteComponents import org.kde.latte.components 1.0 as LatteComponents

@ -20,7 +20,6 @@
import QtQuick 2.0 import QtQuick 2.0
import org.kde.latte 0.2 as Latte
import org.kde.latte.core 0.2 as LatteCore import org.kde.latte.core 0.2 as LatteCore
Item{ Item{

@ -29,7 +29,6 @@ import org.kde.plasma.private.taskmanager 0.1 as TaskManagerApplet
import org.kde.kquickcontrolsaddons 2.0 as KQuickControlAddons import org.kde.kquickcontrolsaddons 2.0 as KQuickControlAddons
import org.kde.latte 0.2 as Latte
import org.kde.latte.core 0.2 as LatteCore import org.kde.latte.core 0.2 as LatteCore
import org.kde.latte.components 1.0 as LatteComponents import org.kde.latte.components 1.0 as LatteComponents

@ -22,7 +22,6 @@ import QtQuick 2.0
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.latte 0.2 as Latte
import org.kde.latte.components 1.0 as LatteComponents import org.kde.latte.components 1.0 as LatteComponents
Item { Item {

@ -20,7 +20,6 @@
import QtQuick 2.7 import QtQuick 2.7
import QtGraphicalEffects 1.0 import QtGraphicalEffects 1.0
import org.kde.latte 0.2 as Latte
import org.kde.latte.components 1.0 as LatteComponents import org.kde.latte.components 1.0 as LatteComponents
Loader{ Loader{

@ -28,9 +28,10 @@ import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.private.taskmanager 0.1 as TaskManagerApplet import org.kde.plasma.private.taskmanager 0.1 as TaskManagerApplet
import org.kde.latte 0.2 as Latte
import org.kde.latte.core 0.2 as LatteCore import org.kde.latte.core 0.2 as LatteCore
import org.kde.latte.private.tasks 0.1 as LatteTasks
import "animations" as TaskAnimations import "animations" as TaskAnimations
import "indicator" as Indicator import "indicator" as Indicator
@ -790,7 +791,7 @@ MouseArea{
onPressed: { onPressed: {
//console.log("Pressed Task Delegate.."); //console.log("Pressed Task Delegate..");
if (LatteCore.WindowSystem.compositingActive && !LatteCore.WindowSystem.isPlatformWayland) { if (LatteCore.WindowSystem.compositingActive && !LatteCore.WindowSystem.isPlatformWayland) {
if(root.leftClickAction !== Latte.Tasks.PreviewWindows) { if(root.leftClickAction !== LatteTasks.Types.PreviewWindows) {
isAbleToShowPreview = false; isAbleToShowPreview = false;
windowsPreviewDlg.hide(2); windowsPreviewDlg.hide(2);
} }
@ -831,18 +832,18 @@ MouseArea{
if (modifierAccepted(mouse) && !root.disableAllWindowsFunctionality){ if (modifierAccepted(mouse) && !root.disableAllWindowsFunctionality){
if( !taskItem.isLauncher ){ if( !taskItem.isLauncher ){
if (root.modifierClickAction == Latte.Tasks.NewInstance) { if (root.modifierClickAction == LatteTasks.Types.NewInstance) {
tasksModel.requestNewInstance(modelIndex()); tasksModel.requestNewInstance(modelIndex());
} else if (root.modifierClickAction == Latte.Tasks.Close) { } else if (root.modifierClickAction == LatteTasks.Types.Close) {
tasksModel.requestClose(modelIndex()); tasksModel.requestClose(modelIndex());
} else if (root.modifierClickAction == Latte.Tasks.ToggleMinimized) { } else if (root.modifierClickAction == LatteTasks.Types.ToggleMinimized) {
tasksModel.requestToggleMinimized(modelIndex()); tasksModel.requestToggleMinimized(modelIndex());
} else if ( root.modifierClickAction == Latte.Tasks.CycleThroughTasks) { } else if ( root.modifierClickAction == LatteTasks.Types.CycleThroughTasks) {
if (isGroupParent) if (isGroupParent)
subWindows.activateNextTask(); subWindows.activateNextTask();
else else
activateTask(); activateTask();
} else if (root.modifierClickAction == Latte.Tasks.ToggleGrouping) { } else if (root.modifierClickAction == LatteTasks.Types.ToggleGrouping) {
tasksModel.requestToggleGrouping(modelIndex()); tasksModel.requestToggleGrouping(modelIndex());
} }
} else { } else {
@ -850,18 +851,18 @@ MouseArea{
} }
} else if (mouse.button == Qt.MidButton && !root.disableAllWindowsFunctionality){ } else if (mouse.button == Qt.MidButton && !root.disableAllWindowsFunctionality){
if( !taskItem.isLauncher ){ if( !taskItem.isLauncher ){
if (root.middleClickAction == Latte.Tasks.NewInstance) { if (root.middleClickAction == LatteTasks.Types.NewInstance) {
tasksModel.requestNewInstance(modelIndex()); tasksModel.requestNewInstance(modelIndex());
} else if (root.middleClickAction == Latte.Tasks.Close) { } else if (root.middleClickAction == LatteTasks.Types.Close) {
tasksModel.requestClose(modelIndex()); tasksModel.requestClose(modelIndex());
} else if (root.middleClickAction == Latte.Tasks.ToggleMinimized) { } else if (root.middleClickAction == LatteTasks.Types.ToggleMinimized) {
tasksModel.requestToggleMinimized(modelIndex()); tasksModel.requestToggleMinimized(modelIndex());
} else if ( root.middleClickAction == Latte.Tasks.CycleThroughTasks) { } else if ( root.middleClickAction == LatteTasks.Types.CycleThroughTasks) {
if (isGroupParent) if (isGroupParent)
subWindows.activateNextTask(); subWindows.activateNextTask();
else else
activateTask(); activateTask();
} else if (root.middleClickAction == Latte.Tasks.ToggleGrouping) { } else if (root.middleClickAction == LatteTasks.Types.ToggleGrouping) {
tasksModel.requestToggleGrouping(modelIndex()); tasksModel.requestToggleGrouping(modelIndex());
} }
} else { } else {
@ -869,19 +870,19 @@ MouseArea{
} }
} else if (mouse.button == Qt.LeftButton){ } else if (mouse.button == Qt.LeftButton){
if( !taskItem.isLauncher ){ if( !taskItem.isLauncher ){
if ( (root.leftClickAction === Latte.Tasks.PreviewWindows && isGroupParent) if ( (root.leftClickAction === LatteTasks.Types.PreviewWindows && isGroupParent)
|| ( (LatteCore.WindowSystem.isPlatformWayland || !LatteCore.WindowSystem.compositingActive) || ( (LatteCore.WindowSystem.isPlatformWayland || !LatteCore.WindowSystem.compositingActive)
&& root.leftClickAction === Latte.Tasks.PresentWindows && root.leftClickAction === LatteTasks.Types.PresentWindows
&& isGroupParent) ) { && isGroupParent) ) {
if(windowsPreviewDlg.activeItem !== taskItem){ if(windowsPreviewDlg.activeItem !== taskItem){
showPreviewWindow(); showPreviewWindow();
} else { } else {
hidePreviewWindow(); hidePreviewWindow();
} }
} else if ( (root.leftClickAction === Latte.Tasks.PresentWindows && !(isGroupParent && !LatteCore.WindowSystem.compositingActive)) } else if ( (root.leftClickAction === LatteTasks.Types.PresentWindows && !(isGroupParent && !LatteCore.WindowSystem.compositingActive))
|| ((root.leftClickAction === Latte.Tasks.PreviewWindows && !isGroupParent)) ) { || ((root.leftClickAction === LatteTasks.Types.PreviewWindows && !isGroupParent)) ) {
activateTask(); activateTask();
} else if (root.leftClickAction === Latte.Tasks.CycleThroughTasks) { } else if (root.leftClickAction === LatteTasks.Types.CycleThroughTasks) {
if (isGroupParent) if (isGroupParent)
subWindows.activateNextTask(); subWindows.activateNextTask();
else else
@ -903,7 +904,7 @@ MouseArea{
} }
onWheel: { onWheel: {
var wheelActionsEnabled = (root.taskScrollAction !== Latte.Types.ScrollNone || manualScrollTasksEnabled); var wheelActionsEnabled = (root.taskScrollAction !== LatteCore.Types.ScrollNone || manualScrollTasksEnabled);
if (isSeparator if (isSeparator
|| wheelIsBlocked || wheelIsBlocked
@ -934,8 +935,8 @@ MouseArea{
var overflowScrollingAccepted = (root.manualScrollTasksEnabled var overflowScrollingAccepted = (root.manualScrollTasksEnabled
&& scrollableList.contentsExceed && scrollableList.contentsExceed
&& (root.manualScrollTasksType === Latte.Tasks.ManualScrollVerticalHorizontal && (root.manualScrollTasksType === LatteTasks.Types.ManualScrollVerticalHorizontal
|| (root.manualScrollTasksType === Latte.Tasks.ManualScrollOnlyParallel && parallelScrolling)) ); || (root.manualScrollTasksType === LatteTasks.Types.ManualScrollOnlyParallel && parallelScrolling)) );
if (overflowScrollingAccepted) { if (overflowScrollingAccepted) {
@ -962,8 +963,8 @@ MouseArea{
var overflowScrollingAccepted = (root.manualScrollTasksEnabled var overflowScrollingAccepted = (root.manualScrollTasksEnabled
&& scrollableList.contentsExceed && scrollableList.contentsExceed
&& (root.manualScrollTasksType === Latte.Tasks.ManualScrollVerticalHorizontal && (root.manualScrollTasksType === LatteTasks.Types.ManualScrollVerticalHorizontal
|| (root.manualScrollTasksType === Latte.Tasks.ManualScrollOnlyParallel && parallelScrolling)) ); || (root.manualScrollTasksType === LatteTasks.Types.ManualScrollOnlyParallel && parallelScrolling)) );
if (overflowScrollingAccepted) { if (overflowScrollingAccepted) {
@ -972,7 +973,7 @@ MouseArea{
if (isLauncher || root.disableAllWindowsFunctionality) { if (isLauncher || root.disableAllWindowsFunctionality) {
// do nothing // do nothing
} else if (isGroupParent) { } else if (isGroupParent) {
if (root.taskScrollAction === Latte.Tasks.ScrollToggleMinimized) { if (root.taskScrollAction === LatteTasks.Types.ScrollToggleMinimized) {
subWindows.minimizeTask(); subWindows.minimizeTask();
} else { } else {
subWindows.activatePreviousTask(); subWindows.activatePreviousTask();
@ -980,7 +981,7 @@ MouseArea{
} else { } else {
var taskIndex = modelIndex(); var taskIndex = modelIndex();
var hidingTask = (!isMinimized && root.taskScrollAction === Latte.Tasks.ScrollToggleMinimized); var hidingTask = (!isMinimized && root.taskScrollAction === LatteTasks.Types.ScrollToggleMinimized);
if (isMinimized || hidingTask) { if (isMinimized || hidingTask) {
tasksModel.requestToggleMinimized(taskIndex); tasksModel.requestToggleMinimized(taskIndex);
@ -1264,9 +1265,9 @@ MouseArea{
function modifierAccepted(mouse){ function modifierAccepted(mouse){
if (mouse.modifiers & root.modifierQt){ if (mouse.modifiers & root.modifierQt){
if ((mouse.button === Qt.LeftButton && root.modifierClick === Latte.Tasks.LeftClick) if ((mouse.button === Qt.LeftButton && root.modifierClick === LatteTasks.Types.LeftClick)
|| (mouse.button === Qt.MiddleButton && root.modifierClick === Latte.Tasks.MiddleClick) || (mouse.button === Qt.MiddleButton && root.modifierClick === LatteTasks.Types.MiddleClick)
|| (mouse.button === Qt.RightButton && root.modifierClick === Latte.Tasks.RightClick)) || (mouse.button === Qt.RightButton && root.modifierClick === LatteTasks.Types.RightClick))
return true; return true;
} }

@ -22,7 +22,6 @@ import QtQuick 2.0
import org.kde.plasma.plasmoid 2.0 import org.kde.plasma.plasmoid 2.0
import org.kde.latte 0.2 as Latte
import org.kde.latte.core 0.2 as LatteCore import org.kde.latte.core 0.2 as LatteCore
SequentialAnimation { SequentialAnimation {

@ -24,7 +24,6 @@ import QtGraphicalEffects 1.0
import org.kde.plasma.plasmoid 2.0 import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.latte 0.2 as Latte
import org.kde.latte.core 0.2 as LatteCore import org.kde.latte.core 0.2 as LatteCore
/////Removing a Window from a group//// /////Removing a Window from a group////

@ -22,7 +22,6 @@ import QtQuick 2.0
import org.kde.plasma.plasmoid 2.0 import org.kde.plasma.plasmoid 2.0
import org.kde.latte 0.2 as Latte
import org.kde.latte.core 0.2 as LatteCore import org.kde.latte.core 0.2 as LatteCore
///item's added Animation ///item's added Animation

@ -21,8 +21,6 @@ import QtQuick 2.7
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.latte 0.2 as Latte
import "../../indicators/options" as TaskIndicator import "../../indicators/options" as TaskIndicator
Item { Item {

@ -19,8 +19,6 @@
import QtQuick 2.7 import QtQuick 2.7
import org.kde.latte 0.2 as Latte
Item { Item {
id: level id: level

@ -22,8 +22,6 @@ import QtQuick 2.7
import org.kde.plasma.plasmoid 2.0 import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.latte 0.2 as Latte
Loader { Loader {
id: indicatorLoader id: indicatorLoader
anchors.bottom: (root.location === PlasmaCore.Types.BottomEdge) ? parent.bottom : undefined anchors.bottom: (root.location === PlasmaCore.Types.BottomEdge) ? parent.bottom : undefined

@ -26,8 +26,6 @@ import org.kde.draganddrop 2.0
import org.kde.taskmanager 0.1 as TaskManager import org.kde.taskmanager 0.1 as TaskManager
import org.kde.latte 0.2 as Latte
import "../../code/tools.js" as TaskTools import "../../code/tools.js" as TaskTools
Item { Item {

@ -20,7 +20,7 @@ import QtQuick 2.7
import org.kde.plasma.plasmoid 2.0 import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.latte 0.2 as Latte import org.kde.latte.core 0.2 as LatteCore
Rectangle { Rectangle {
id: listViewBase id: listViewBase
@ -29,11 +29,11 @@ Rectangle {
if (plasmoid.location===PlasmaCore.Types.Floating) { if (plasmoid.location===PlasmaCore.Types.Floating) {
//! Center position Tasks when are located in the Desktop //! Center position Tasks when are located in the Desktop
return root.width < icList.width ? (root.width/2) : icList.width/2; return root.width < icList.width ? (root.width/2) : icList.width/2;
} else if (root.alignment === Latte.Types.Center) { } else if (root.alignment === LatteCore.Types.Center) {
return icList.width / 2; return icList.width / 2;
} else if (root.alignment === Latte.Types.Left){ } else if (root.alignment === LatteCore.Types.Left){
return 0; return 0;
} else if (root.alignment === Latte.Types.Right){ } else if (root.alignment === LatteCore.Types.Right){
return icList.width; return icList.width;
} }
} else { } else {
@ -45,11 +45,11 @@ Rectangle {
if (!root.vertical) { if (!root.vertical) {
return 0; return 0;
} else { } else {
if (root.alignment === Latte.Types.Center) { if (root.alignment === LatteCore.Types.Center) {
return icList.height / 2; return icList.height / 2;
} else if (root.alignment === Latte.Types.Top){ } else if (root.alignment === LatteCore.Types.Top){
return 0; return 0;
} else if (root.alignment === Latte.Types.Bottom){ } else if (root.alignment === LatteCore.Types.Bottom){
return icList.height; return icList.height;
} }
} }

@ -21,7 +21,7 @@ import QtQuick.Controls 1.4
import org.kde.plasma.plasmoid 2.0 import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.latte 0.2 as Latte import org.kde.latte.core 0.2 as LatteCore
Flickable{ Flickable{
id: flickableContainer id: flickableContainer
@ -32,7 +32,7 @@ Flickable{
property int offset: 0 property int offset: 0
readonly property bool animationsFinished: !horizontalAnimation.running && !verticalAnimation.running readonly property bool animationsFinished: !horizontalAnimation.running && !verticalAnimation.running
readonly property bool centered: root.alignment === Latte.Types.Center readonly property bool centered: root.alignment === LatteCore.Types.Center
readonly property bool reversed: Qt.application.layoutDirection === Qt.RightToLeft readonly property bool reversed: Qt.application.layoutDirection === Qt.RightToLeft
readonly property bool contentsExceed: { readonly property bool contentsExceed: {
@ -63,46 +63,46 @@ Flickable{
readonly property int alignment: { readonly property int alignment: {
if (root.location === PlasmaCore.Types.LeftEdge) { if (root.location === PlasmaCore.Types.LeftEdge) {
if (centered) return Latte.Types.LeftEdgeCenterAlign; if (centered) return LatteCore.Types.LeftEdgeCenterAlign;
if (root.alignment === Latte.Types.Top) return Latte.Types.LeftEdgeTopAlign; if (root.alignment === LatteCore.Types.Top) return LatteCore.Types.LeftEdgeTopAlign;
if (root.alignment === Latte.Types.Bottom) return Latte.Types.LeftEdgeBottomAlign; if (root.alignment === LatteCore.Types.Bottom) return LatteCore.Types.LeftEdgeBottomAlign;
} }
if (root.location === PlasmaCore.Types.RightEdge) { if (root.location === PlasmaCore.Types.RightEdge) {
if (centered) return Latte.Types.RightEdgeCenterAlign; if (centered) return LatteCore.Types.RightEdgeCenterAlign;
if (root.alignment === Latte.Types.Top) return Latte.Types.RightEdgeTopAlign; if (root.alignment === LatteCore.Types.Top) return LatteCore.Types.RightEdgeTopAlign;
if (root.alignment === Latte.Types.Bottom) return Latte.Types.RightEdgeBottomAlign; if (root.alignment === LatteCore.Types.Bottom) return LatteCore.Types.RightEdgeBottomAlign;
} }
if (root.location === PlasmaCore.Types.BottomEdge) { if (root.location === PlasmaCore.Types.BottomEdge) {
if (centered) return Latte.Types.BottomEdgeCenterAlign; if (centered) return LatteCore.Types.BottomEdgeCenterAlign;
if ((root.alignment === Latte.Types.Left && !reversed) if ((root.alignment === LatteCore.Types.Left && !reversed)
|| (root.alignment === Latte.Types.Right && reversed)) { || (root.alignment === LatteCore.Types.Right && reversed)) {
return Latte.Types.BottomEdgeLeftAlign; return LatteCore.Types.BottomEdgeLeftAlign;
} }
if ((root.alignment === Latte.Types.Right && !reversed) if ((root.alignment === LatteCore.Types.Right && !reversed)
|| (root.alignment === Latte.Types.Left && reversed)) { || (root.alignment === LatteCore.Types.Left && reversed)) {
return Latte.Types.BottomEdgeRightAlign; return LatteCore.Types.BottomEdgeRightAlign;
} }
} }
if (root.location === PlasmaCore.Types.TopEdge) { if (root.location === PlasmaCore.Types.TopEdge) {
if (centered) return Latte.Types.TopEdgeCenterAlign; if (centered) return LatteCore.Types.TopEdgeCenterAlign;
if ((root.alignment === Latte.Types.Left && !reversed) if ((root.alignment === LatteCore.Types.Left && !reversed)
|| (root.alignment === Latte.Types.Right && reversed)) { || (root.alignment === LatteCore.Types.Right && reversed)) {
return Latte.Types.TopEdgeLeftAlign; return LatteCore.Types.TopEdgeLeftAlign;
} }
if ((root.alignment === Latte.Types.Right && !reversed) if ((root.alignment === LatteCore.Types.Right && !reversed)
|| (root.alignment === Latte.Types.Left && reversed)) { || (root.alignment === LatteCore.Types.Left && reversed)) {
return Latte.Types.TopEdgeRightAlign; return LatteCore.Types.TopEdgeRightAlign;
} }
} }
return Latte.Types.BottomEdgeCenterAlign; return LatteCore.Types.BottomEdgeCenterAlign;
} }
function increasePos() { function increasePos() {
@ -229,7 +229,7 @@ Flickable{
///Left Edge ///Left Edge
State { State {
name: "leftCenter" name: "leftCenter"
when: flickableContainer.alignment === Latte.Types.LeftEdgeCenterAlign when: flickableContainer.alignment === LatteCore.Types.LeftEdgeCenterAlign
AnchorChanges { AnchorChanges {
target: flickableContainer target: flickableContainer
@ -243,7 +243,7 @@ Flickable{
}, },
State { State {
name: "leftTop" name: "leftTop"
when: flickableContainer.alignment === Latte.Types.LeftEdgeTopAlign when: flickableContainer.alignment === LatteCore.Types.LeftEdgeTopAlign
AnchorChanges { AnchorChanges {
target: flickableContainer target: flickableContainer
@ -257,7 +257,7 @@ Flickable{
}, },
State { State {
name: "leftBottom" name: "leftBottom"
when: flickableContainer.alignment === Latte.Types.LeftEdgeBottomAlign when: flickableContainer.alignment === LatteCore.Types.LeftEdgeBottomAlign
AnchorChanges { AnchorChanges {
target: flickableContainer target: flickableContainer
@ -272,7 +272,7 @@ Flickable{
///Right Edge ///Right Edge
State { State {
name: "rightCenter" name: "rightCenter"
when: flickableContainer.alignment === Latte.Types.RightEdgeCenterAlign when: flickableContainer.alignment === LatteCore.Types.RightEdgeCenterAlign
AnchorChanges { AnchorChanges {
target: flickableContainer target: flickableContainer
@ -286,7 +286,7 @@ Flickable{
}, },
State { State {
name: "rightTop" name: "rightTop"
when: flickableContainer.alignment === Latte.Types.RightEdgeTopAlign when: flickableContainer.alignment === LatteCore.Types.RightEdgeTopAlign
AnchorChanges { AnchorChanges {
target: flickableContainer target: flickableContainer
@ -300,7 +300,7 @@ Flickable{
}, },
State { State {
name: "rightBottom" name: "rightBottom"
when: flickableContainer.alignment === Latte.Types.RightEdgeBottomAlign when: flickableContainer.alignment === LatteCore.Types.RightEdgeBottomAlign
AnchorChanges { AnchorChanges {
target: flickableContainer target: flickableContainer
@ -315,7 +315,7 @@ Flickable{
///Bottom Edge ///Bottom Edge
State { State {
name: "bottomCenter" name: "bottomCenter"
when: flickableContainer.alignment === Latte.Types.BottomEdgeCenterAlign when: flickableContainer.alignment === LatteCore.Types.BottomEdgeCenterAlign
AnchorChanges { AnchorChanges {
target: flickableContainer target: flickableContainer
@ -329,7 +329,7 @@ Flickable{
}, },
State { State {
name: "bottomLeft" name: "bottomLeft"
when: flickableContainer.alignment === Latte.Types.BottomEdgeLeftAlign when: flickableContainer.alignment === LatteCore.Types.BottomEdgeLeftAlign
AnchorChanges { AnchorChanges {
target: flickableContainer target: flickableContainer
@ -343,7 +343,7 @@ Flickable{
}, },
State { State {
name: "bottomRight" name: "bottomRight"
when: flickableContainer.alignment === Latte.Types.BottomEdgeRightAlign when: flickableContainer.alignment === LatteCore.Types.BottomEdgeRightAlign
AnchorChanges { AnchorChanges {
target: flickableContainer target: flickableContainer
@ -358,7 +358,7 @@ Flickable{
///Top Edge ///Top Edge
State { State {
name: "topCenter" name: "topCenter"
when: flickableContainer.alignment === Latte.Types.TopEdgeCenterAlign when: flickableContainer.alignment === LatteCore.Types.TopEdgeCenterAlign
AnchorChanges { AnchorChanges {
target: flickableContainer target: flickableContainer
@ -372,7 +372,7 @@ Flickable{
}, },
State { State {
name: "topLeft" name: "topLeft"
when: flickableContainer.alignment === Latte.Types.TopEdgeLeftAlign when: flickableContainer.alignment === LatteCore.Types.TopEdgeLeftAlign
AnchorChanges { AnchorChanges {
target: flickableContainer target: flickableContainer
@ -386,7 +386,7 @@ Flickable{
}, },
State { State {
name: "topRight" name: "topRight"
when: flickableContainer.alignment === Latte.Types.TopEdgeRightAlign when: flickableContainer.alignment === LatteCore.Types.TopEdgeRightAlign
AnchorChanges { AnchorChanges {
target: flickableContainer target: flickableContainer

@ -0,0 +1,33 @@
/*
* Copyright 2020 Michail Vourlakos <mvourlakos@gmail.com>
*
* This file is part of Latte-Dock
*
* Latte-Dock is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* Latte-Dock is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "lattetasksplugin.h"
// local
#include "types.h"
// Qt
#include <QtQml>
void LatteTasksPlugin::registerTypes(const char *uri)
{
Q_ASSERT(uri == QLatin1String("org.kde.latte.private.tasks"));
qmlRegisterUncreatableType<Latte::Tasks::Types>(uri, 0, 1, "Types", "Latte Tasks Types uncreatable");
}

@ -0,0 +1,35 @@
/*
* Copyright 2020 Michail Vourlakos <mvourlakos@gmail.com>
*
* This file is part of Latte-Dock
*
* Latte-Dock is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* Latte-Dock is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef LATTETASKSPLUGIN_H
#define LATTETASKSPLUGIN_H
// Qt
#include <QQmlExtensionPlugin>
class LatteTasksPlugin : public QQmlExtensionPlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
public:
void registerTypes(const char *uri) override;
};
#endif

@ -0,0 +1,2 @@
module org.kde.latte.private.tasks
plugin lattetasksplugin

@ -0,0 +1,20 @@
/*
* Copyright 2020 Michail Vourlakos <mvourlakos@gmail.com>
*
* This file is part of Latte-Dock
*
* Latte-Dock is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* Latte-Dock is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "types.h"

@ -0,0 +1,91 @@
/*
* Copyright 2020 Michail Vourlakos <mvourlakos@gmail.com>
*
* This file is part of Latte-Dock
*
* Latte-Dock is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* Latte-Dock is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef LATTETASKSTYPES_H
#define LATTETASKSTYPES_H
// Qt
#include <QObject>
#include <QMetaEnum>
#include <QMetaType>
namespace Latte {
namespace Tasks {
class Types
{
Q_GADGET
public:
Types() = delete;
~Types() {}
enum Modifier
{
Shift = 0,
Ctrl,
Alt,
Meta
};
Q_ENUM(Modifier);
enum ClickAction
{
LeftClick = 0,
MiddleClick,
RightClick
};
Q_ENUM(ClickAction);
enum TaskAction
{
NoneAction = 0,
Close,
NewInstance,
ToggleMinimized,
CycleThroughTasks,
ToggleGrouping,
PresentWindows,
PreviewWindows,
HighlightWindows,
PreviewAndHighlightWindows
};
Q_ENUM(TaskAction);
enum TaskScrollAction
{
ScrollNone = 0,
ScrollTasks,
ScrollToggleMinimized
};
Q_ENUM(TaskScrollAction);
enum ManualScrollType
{
ManualScrollDisabled = 0,
ManualScrollOnlyParallel,
ManualScrollVerticalHorizontal
};
Q_ENUM(ManualScrollType);
};
}
}
#endif

@ -34,7 +34,6 @@ import org.kde.plasma.plasmoid 2.0
import org.kde.kquickcontrolsaddons 2.0 as KQuickControlAddons import org.kde.kquickcontrolsaddons 2.0 as KQuickControlAddons
import org.kde.latte 0.2 as Latte
import org.kde.latte.core 0.2 as LatteCore import org.kde.latte.core 0.2 as LatteCore
import org.kde.latte.components 1.0 as LatteComponents import org.kde.latte.components 1.0 as LatteComponents
@ -44,9 +43,9 @@ import "../controls" as LatteExtraControls
FocusScope { FocusScope {
id: dialog id: dialog
readonly property bool basicLevel: viewConfig.complexity === Latte.Types.BasicSettings readonly property bool basicLevel: viewConfig.complexity === LatteCore.Types.BasicSettings
readonly property bool advancedLevel: viewConfig.complexity === Latte.Types.AdvancedSettings readonly property bool advancedLevel: viewConfig.complexity === LatteCore.Types.AdvancedSettings
readonly property bool expertLevel: viewConfig.complexity === Latte.Types.ExpertSettings readonly property bool expertLevel: viewConfig.complexity === LatteCore.Types.ExpertSettings
readonly property bool highLevel: advancedLevel || expertLevel readonly property bool highLevel: advancedLevel || expertLevel
@ -93,7 +92,7 @@ FocusScope {
LayoutMirroring.enabled: Qt.application.layoutDirection === Qt.RightToLeft LayoutMirroring.enabled: Qt.application.layoutDirection === Qt.RightToLeft
LayoutMirroring.childrenInherit: true LayoutMirroring.childrenInherit: true
readonly property bool viewIsPanel: latteView.type === Latte.Types.PanelView readonly property bool viewIsPanel: latteView.type === LatteCore.Types.PanelView
property bool panelIsVertical: plasmoid.formFactor === PlasmaCore.Types.Vertical property bool panelIsVertical: plasmoid.formFactor === PlasmaCore.Types.Vertical
property int subGroupSpacing: units.largeSpacing + units.smallSpacing * 1.5 property int subGroupSpacing: units.largeSpacing + units.smallSpacing * 1.5
@ -389,13 +388,13 @@ FocusScope {
LatteComponents.Switch { LatteComponents.Switch {
id: complexitySwitch id: complexitySwitch
checked: (viewConfig.complexity === Latte.Types.ExpertSettings) checked: (viewConfig.complexity === LatteCore.Types.ExpertSettings)
onCheckedChanged: { onCheckedChanged: {
if (checked) { if (checked) {
viewConfig.complexity = Latte.Types.ExpertSettings; viewConfig.complexity = LatteCore.Types.ExpertSettings;
} else { } else {
viewConfig.complexity = Latte.Types.BasicSettings; viewConfig.complexity = LatteCore.Types.BasicSettings;
} }
} }
} }
@ -666,7 +665,7 @@ FocusScope {
} }
function updateCopyText() { function updateCopyText() {
var copyText = latteView.type === Latte.Types.DockView ? i18n("Copy Dock") : i18n("Copy Panel") var copyText = latteView.type === LatteCore.Types.DockView ? i18n("Copy Dock") : i18n("Copy Panel")
actionsModel.get(0).name = copyText; actionsModel.get(0).name = copyText;
} }
} }

@ -33,7 +33,6 @@ import org.kde.plasma.plasmoid 2.0
import org.kde.kquickcontrolsaddons 2.0 as KQuickControlAddons import org.kde.kquickcontrolsaddons 2.0 as KQuickControlAddons
import org.kde.latte 0.2 as Latte
import org.kde.latte.core 0.2 as LatteCore import org.kde.latte.core 0.2 as LatteCore
import "../controls" as LatteExtraControls import "../controls" as LatteExtraControls

@ -29,7 +29,6 @@ import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.components 3.0 as PlasmaComponents3 import org.kde.plasma.components 3.0 as PlasmaComponents3
import org.kde.plasma.plasmoid 2.0 import org.kde.plasma.plasmoid 2.0
import org.kde.latte 0.2 as Latte
import org.kde.latte.core 0.2 as LatteCore import org.kde.latte.core 0.2 as LatteCore
import org.kde.latte.components 1.0 as LatteComponents import org.kde.latte.components 1.0 as LatteComponents
@ -174,7 +173,7 @@ PlasmaComponents.Page {
Layout.fillWidth: true Layout.fillWidth: true
value: plasmoid.configuration.iconSize value: plasmoid.configuration.iconSize
from: 16 from: 16
to: latteView.visibility.mode === Latte.Types.SideBar ? 512 : 256 to: latteView.visibility.mode === LatteCore.Types.SideBar ? 512 : 256
stepSize: dialog.highLevel || (plasmoid.configuration.iconSize % 8 !== 0) || dialog.viewIsPanel ? 1 : 8 stepSize: dialog.highLevel || (plasmoid.configuration.iconSize % 8 !== 0) || dialog.viewIsPanel ? 1 : 8
wheelEnabled: false wheelEnabled: false
@ -223,7 +222,7 @@ PlasmaComponents.Page {
Layout.fillWidth: true Layout.fillWidth: true
value: plasmoid.configuration.proportionIconSize value: plasmoid.configuration.proportionIconSize
from: 1.0 from: 1.0
to: latteView.visibility.mode === Latte.Types.SideBar ? 25 : 12 to: latteView.visibility.mode === LatteCore.Types.SideBar ? 25 : 12
stepSize: 0.5 stepSize: 0.5
wheelEnabled: false wheelEnabled: false
@ -366,13 +365,13 @@ PlasmaComponents.Page {
var newTotal = Math.abs(plasmoid.configuration.offset) + value; var newTotal = Math.abs(plasmoid.configuration.offset) + value;
//centered and justify alignments based on offset and get out of the screen in some cases //centered and justify alignments based on offset and get out of the screen in some cases
var centeredCheck = ((plasmoid.configuration.alignment === Latte.Types.Center) var centeredCheck = ((plasmoid.configuration.alignment === LatteCore.Types.Center)
|| (plasmoid.configuration.alignment === Latte.Types.Justify)) || (plasmoid.configuration.alignment === LatteCore.Types.Justify))
&& ((Math.abs(plasmoid.configuration.offset) + value/2) > 50); && ((Math.abs(plasmoid.configuration.offset) + value/2) > 50);
if (newTotal > 100 || centeredCheck) { if (newTotal > 100 || centeredCheck) {
if ((plasmoid.configuration.alignment === Latte.Types.Center) if ((plasmoid.configuration.alignment === LatteCore.Types.Center)
|| (plasmoid.configuration.alignment === Latte.Types.Justify)) { || (plasmoid.configuration.alignment === LatteCore.Types.Justify)) {
var suggestedValue = (plasmoid.configuration.offset<0) ? Math.min(0, -(100-value)): Math.max(0, 100-value); var suggestedValue = (plasmoid.configuration.offset<0) ? Math.min(0, -(100-value)): Math.max(0, 100-value);
@ -426,7 +425,7 @@ PlasmaComponents.Page {
Layout.maximumWidth: Layout.minimumWidth Layout.maximumWidth: Layout.minimumWidth
spacing: units.smallSpacing spacing: units.smallSpacing
visible: dialog.expertLevel visible: dialog.expertLevel
enabled: (plasmoid.configuration.alignment !== Latte.Types.Justify) enabled: (plasmoid.configuration.alignment !== LatteCore.Types.Justify)
PlasmaComponents.Label { PlasmaComponents.Label {
id: minLengthLbl id: minLengthLbl
@ -498,10 +497,10 @@ PlasmaComponents.Page {
id: offsetSlider id: offsetSlider
value: plasmoid.configuration.offset value: plasmoid.configuration.offset
from: ((plasmoid.configuration.alignment === Latte.Types.Center) from: ((plasmoid.configuration.alignment === LatteCore.Types.Center)
|| (plasmoid.configuration.alignment === Latte.Types.Justify)) ? -20 : 0 || (plasmoid.configuration.alignment === LatteCore.Types.Justify)) ? -20 : 0
to: ((plasmoid.configuration.alignment === Latte.Types.Center) to: ((plasmoid.configuration.alignment === LatteCore.Types.Center)
|| (plasmoid.configuration.alignment === Latte.Types.Justify)) ? 20 : 40 || (plasmoid.configuration.alignment === LatteCore.Types.Justify)) ? 20 : 40
stepSize: 1 stepSize: 1
wheelEnabled: false wheelEnabled: false
@ -511,12 +510,12 @@ PlasmaComponents.Page {
var newTotal = Math.abs(value) + plasmoid.configuration.maxLength; var newTotal = Math.abs(value) + plasmoid.configuration.maxLength;
//centered and justify alignments based on offset and get out of the screen in some cases //centered and justify alignments based on offset and get out of the screen in some cases
var centeredCheck = ((plasmoid.configuration.alignment === Latte.Types.Center) var centeredCheck = ((plasmoid.configuration.alignment === LatteCore.Types.Center)
|| (plasmoid.configuration.alignment === Latte.Types.Justify)) || (plasmoid.configuration.alignment === LatteCore.Types.Justify))
&& ((Math.abs(value) + plasmoid.configuration.maxLength/2) > 50); && ((Math.abs(value) + plasmoid.configuration.maxLength/2) > 50);
if (newTotal > 100 || centeredCheck) { if (newTotal > 100 || centeredCheck) {
plasmoid.configuration.maxLength = ((plasmoid.configuration.alignment === Latte.Types.Center) plasmoid.configuration.maxLength = ((plasmoid.configuration.alignment === LatteCore.Types.Center)
|| (plasmoid.configuration.alignment === Latte.Types.Justify)) ? || (plasmoid.configuration.alignment === LatteCore.Types.Justify)) ?
2*(50 - Math.abs(value)) :100 - Math.abs(value); 2*(50 - Math.abs(value)) :100 - Math.abs(value);
} }
} }
@ -756,7 +755,7 @@ PlasmaComponents.Page {
exclusiveGroup: themeColorsGroup exclusiveGroup: themeColorsGroup
tooltip: i18n("Plasma theme color palette is going to be used") tooltip: i18n("Plasma theme color palette is going to be used")
readonly property int colors: Latte.Types.PlasmaThemeColors readonly property int colors: LatteCore.Types.PlasmaThemeColors
} }
PlasmaComponents.Button { PlasmaComponents.Button {
@ -768,7 +767,7 @@ PlasmaComponents.Page {
exclusiveGroup: themeColorsGroup exclusiveGroup: themeColorsGroup
tooltip: i18n("Reverse color palette from plasma theme is going to be used") tooltip: i18n("Reverse color palette from plasma theme is going to be used")
readonly property int colors: Latte.Types.ReverseThemeColors readonly property int colors: LatteCore.Types.ReverseThemeColors
} }
PlasmaComponents.Button { PlasmaComponents.Button {
@ -780,7 +779,7 @@ PlasmaComponents.Page {
exclusiveGroup: themeColorsGroup exclusiveGroup: themeColorsGroup
tooltip: i18n("Smart color palette is going to provide best contrast after taking into account the environment such as the underlying background") tooltip: i18n("Smart color palette is going to provide best contrast after taking into account the environment such as the underlying background")
readonly property int colors: Latte.Types.SmartThemeColors readonly property int colors: LatteCore.Types.SmartThemeColors
} }
LatteComponents.SubHeader { LatteComponents.SubHeader {
@ -797,7 +796,7 @@ PlasmaComponents.Page {
exclusiveGroup: windowColorsGroup exclusiveGroup: windowColorsGroup
tooltip: i18n("Colors are not going to be based on any window") tooltip: i18n("Colors are not going to be based on any window")
readonly property int colors: Latte.Types.NoneWindowColors readonly property int colors: LatteCore.Types.NoneWindowColors
} }
PlasmaComponents.Button { PlasmaComponents.Button {
@ -811,7 +810,7 @@ PlasmaComponents.Page {
i18n("Colors are going to be based on the active window") : i18n("Colors are going to be based on the active window") :
i18n("Colors are going to be based on the active window.\nNotice: For optimal experience you are advised to install Colors KWin Script from KDE Store") i18n("Colors are going to be based on the active window.\nNotice: For optimal experience you are advised to install Colors KWin Script from KDE Store")
readonly property int colors: Latte.Types.ActiveWindowColors readonly property int colors: LatteCore.Types.ActiveWindowColors
PlasmaCore.IconItem { PlasmaCore.IconItem {
anchors.right: parent.right anchors.right: parent.right
@ -836,7 +835,7 @@ PlasmaComponents.Page {
i18n("Colors are going to be based on windows that are touching the view") : i18n("Colors are going to be based on windows that are touching the view") :
i18n("Colors are going to be based on windows that are touching the view.\nNotice: For optimal experience you are advised to install Colors KWin Script from KDE Store") i18n("Colors are going to be based on windows that are touching the view.\nNotice: For optimal experience you are advised to install Colors KWin Script from KDE Store")
readonly property int colors: Latte.Types.TouchingWindowColors readonly property int colors: LatteCore.Types.TouchingWindowColors
PlasmaCore.IconItem { PlasmaCore.IconItem {
anchors.right: parent.right anchors.right: parent.right

@ -28,7 +28,7 @@ import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.components 3.0 as PlasmaComponents3 import org.kde.plasma.components 3.0 as PlasmaComponents3
import org.kde.plasma.plasmoid 2.0 import org.kde.plasma.plasmoid 2.0
import org.kde.latte 0.2 as Latte import org.kde.latte.core 0.2 as LatteCore
import org.kde.latte.components 1.0 as LatteComponents import org.kde.latte.components 1.0 as LatteComponents
import "../../controls" as LatteExtraControls import "../../controls" as LatteExtraControls
@ -296,7 +296,7 @@ PlasmaComponents.Page {
checkable: true checkable: true
exclusiveGroup: alignmentGroup exclusiveGroup: alignmentGroup
property int alignment: panelIsVertical ? Latte.Types.Top : Latte.Types.Left property int alignment: panelIsVertical ? LatteCore.Types.Top : LatteCore.Types.Left
} }
PlasmaComponents.Button { PlasmaComponents.Button {
Layout.minimumWidth: parent.buttonSize Layout.minimumWidth: parent.buttonSize
@ -307,7 +307,7 @@ PlasmaComponents.Page {
checkable: true checkable: true
exclusiveGroup: alignmentGroup exclusiveGroup: alignmentGroup
property int alignment: Latte.Types.Center property int alignment: LatteCore.Types.Center
} }
PlasmaComponents.Button { PlasmaComponents.Button {
Layout.minimumWidth: parent.buttonSize Layout.minimumWidth: parent.buttonSize
@ -318,7 +318,7 @@ PlasmaComponents.Page {
checkable: true checkable: true
exclusiveGroup: alignmentGroup exclusiveGroup: alignmentGroup
property int alignment: panelIsVertical ? Latte.Types.Bottom : Latte.Types.Right property int alignment: panelIsVertical ? LatteCore.Types.Bottom : LatteCore.Types.Right
} }
PlasmaComponents.Button { PlasmaComponents.Button {
@ -330,7 +330,7 @@ PlasmaComponents.Page {
checkable: true checkable: true
exclusiveGroup: alignmentGroup exclusiveGroup: alignmentGroup
property int alignment: Latte.Types.Justify property int alignment: LatteCore.Types.Justify
} }
} }
} }
@ -379,7 +379,7 @@ PlasmaComponents.Page {
checkable: true checkable: true
exclusiveGroup: visibilityGroup exclusiveGroup: visibilityGroup
property int mode: Latte.Types.AlwaysVisible property int mode: LatteCore.Types.AlwaysVisible
} }
PlasmaComponents.Button { PlasmaComponents.Button {
Layout.minimumWidth: parent.buttonSize Layout.minimumWidth: parent.buttonSize
@ -389,7 +389,7 @@ PlasmaComponents.Page {
checkable: true checkable: true
exclusiveGroup: visibilityGroup exclusiveGroup: visibilityGroup
property int mode: Latte.Types.AutoHide property int mode: LatteCore.Types.AutoHide
} }
PlasmaComponents.Button { PlasmaComponents.Button {
Layout.minimumWidth: parent.buttonSize Layout.minimumWidth: parent.buttonSize
@ -399,7 +399,7 @@ PlasmaComponents.Page {
checkable: true checkable: true
exclusiveGroup: visibilityGroup exclusiveGroup: visibilityGroup
property int mode: Latte.Types.DodgeActive property int mode: LatteCore.Types.DodgeActive
} }
PlasmaComponents.Button { PlasmaComponents.Button {
Layout.minimumWidth: parent.buttonSize Layout.minimumWidth: parent.buttonSize
@ -409,7 +409,7 @@ PlasmaComponents.Page {
checkable: true checkable: true
exclusiveGroup: visibilityGroup exclusiveGroup: visibilityGroup
property int mode: Latte.Types.DodgeMaximized property int mode: LatteCore.Types.DodgeMaximized
} }
PlasmaComponents.Button { PlasmaComponents.Button {
id: dodgeAllWindowsBtn id: dodgeAllWindowsBtn
@ -420,7 +420,7 @@ PlasmaComponents.Page {
checkable: true checkable: true
exclusiveGroup: visibilityGroup exclusiveGroup: visibilityGroup
property int mode: Latte.Types.DodgeAllWindows property int mode: LatteCore.Types.DodgeAllWindows
} }
LatteExtraControls.CustomWindowsModeButton { LatteExtraControls.CustomWindowsModeButton {
@ -443,10 +443,10 @@ PlasmaComponents.Page {
Layout.fillWidth: true Layout.fillWidth: true
spacing: units.smallSpacing spacing: units.smallSpacing
enabled: !(latteView.visibility.mode === Latte.Types.AlwaysVisible enabled: !(latteView.visibility.mode === LatteCore.Types.AlwaysVisible
|| latteView.visibility.mode === Latte.Types.WindowsGoBelow || latteView.visibility.mode === LatteCore.Types.WindowsGoBelow
|| latteView.visibility.mode === Latte.Types.WindowsAlwaysCover || latteView.visibility.mode === LatteCore.Types.WindowsAlwaysCover
|| latteView.visibility.mode === Latte.Types.SideBar) || latteView.visibility.mode === LatteCore.Types.SideBar)
LatteComponents.Header { LatteComponents.Header {
text: i18n("Delay") text: i18n("Delay")
@ -574,11 +574,11 @@ PlasmaComponents.Page {
onCurrentIndexChanged: { onCurrentIndexChanged: {
switch(currentIndex) { switch(currentIndex) {
case Latte.Types.ActiveInCurrentScreen: case LatteCore.Types.ActiveInCurrentScreen:
plasmoid.configuration.activeWindowFilter = Latte.Types.ActiveInCurrentScreen; plasmoid.configuration.activeWindowFilter = LatteCore.Types.ActiveInCurrentScreen;
break; break;
case Latte.Types.ActiveFromAllScreens: case LatteCore.Types.ActiveFromAllScreens:
plasmoid.configuration.activeWindowFilter = Latte.Types.ActiveFromAllScreens; plasmoid.configuration.activeWindowFilter = LatteCore.Types.ActiveFromAllScreens;
break; break;
} }
} }
@ -659,20 +659,20 @@ PlasmaComponents.Page {
onCurrentIndexChanged: { onCurrentIndexChanged: {
switch(currentIndex) { switch(currentIndex) {
case Latte.Types.ScrollNone: case LatteCore.Types.ScrollNone:
plasmoid.configuration.scrollAction = Latte.Types.ScrollNone; plasmoid.configuration.scrollAction = LatteCore.Types.ScrollNone;
break; break;
case Latte.Types.ScrollDesktops: case LatteCore.Types.ScrollDesktops:
plasmoid.configuration.scrollAction = Latte.Types.ScrollDesktops; plasmoid.configuration.scrollAction = LatteCore.Types.ScrollDesktops;
break; break;
case Latte.Types.ScrollActivities: case LatteCore.Types.ScrollActivities:
plasmoid.configuration.scrollAction = Latte.Types.ScrollActivities; plasmoid.configuration.scrollAction = LatteCore.Types.ScrollActivities;
break; break;
case Latte.Types.ScrollTasks: case LatteCore.Types.ScrollTasks:
plasmoid.configuration.scrollAction = Latte.Types.ScrollTasks; plasmoid.configuration.scrollAction = LatteCore.Types.ScrollTasks;
break; break;
case Latte.Types.ScrollToggleMinimized: case LatteCore.Types.ScrollToggleMinimized:
plasmoid.configuration.scrollAction = Latte.Types.ScrollToggleMinimized; plasmoid.configuration.scrollAction = LatteCore.Types.ScrollToggleMinimized;
break; break;
} }
} }
@ -773,10 +773,10 @@ PlasmaComponents.Page {
spacing: units.smallSpacing spacing: units.smallSpacing
visible: dialog.expertLevel visible: dialog.expertLevel
enabled: !(latteView.visibility.mode === Latte.Types.AlwaysVisible enabled: !(latteView.visibility.mode === LatteCore.Types.AlwaysVisible
|| latteView.visibility.mode === Latte.Types.WindowsGoBelow || latteView.visibility.mode === LatteCore.Types.WindowsGoBelow
|| latteView.visibility.mode === Latte.Types.WindowsCanCover || latteView.visibility.mode === LatteCore.Types.WindowsCanCover
|| latteView.visibility.mode === Latte.Types.WindowsAlwaysCover) || latteView.visibility.mode === LatteCore.Types.WindowsAlwaysCover)
LatteComponents.Header { LatteComponents.Header {
text: i18n("Environment") text: i18n("Environment")
@ -793,7 +793,7 @@ PlasmaComponents.Page {
tooltip: i18n("After the view becomes hidden, KWin is informed to track user feedback. For example an edge visual hint is shown whenever the mouse approaches the hidden view") tooltip: i18n("After the view becomes hidden, KWin is informed to track user feedback. For example an edge visual hint is shown whenever the mouse approaches the hidden view")
enabled: !dialog.viewIsPanel enabled: !dialog.viewIsPanel
&& !latteView.byPassWM && !latteView.byPassWM
&& latteView.visibility.mode !== Latte.Types.SideBar && latteView.visibility.mode !== LatteCore.Types.SideBar
onClicked: { onClicked: {
latteView.visibility.enableKWinEdges = checked; latteView.visibility.enableKWinEdges = checked;

@ -28,7 +28,7 @@ import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.components 3.0 as PlasmaComponents3 import org.kde.plasma.components 3.0 as PlasmaComponents3
import org.kde.plasma.plasmoid 2.0 import org.kde.plasma.plasmoid 2.0
import org.kde.latte 0.2 as Latte import org.kde.latte.core 0.2 as LatteCore
import org.kde.latte.components 1.0 as LatteComponents import org.kde.latte.components 1.0 as LatteComponents
import "../../controls" as LatteExtraControls import "../../controls" as LatteExtraControls
@ -58,15 +58,15 @@ PlasmaComponents.Page {
Layout.minimumHeight: implicitHeight Layout.minimumHeight: implicitHeight
Layout.topMargin: units.smallSpacing Layout.topMargin: units.smallSpacing
checked: plasmoid.configuration.shadows !== Latte.Types.NoneShadow checked: plasmoid.configuration.shadows !== LatteCore.Types.NoneShadow
text: i18n("Shadows") text: i18n("Shadows")
tooltip: i18n("Enable/disable applet shadows") tooltip: i18n("Enable/disable applet shadows")
onPressed: { onPressed: {
if(plasmoid.configuration.shadows !== Latte.Types.AllAppletsShadow){ if(plasmoid.configuration.shadows !== LatteCore.Types.AllAppletsShadow){
plasmoid.configuration.shadows = Latte.Types.AllAppletsShadow; plasmoid.configuration.shadows = LatteCore.Types.AllAppletsShadow;
} else { } else {
plasmoid.configuration.shadows = Latte.Types.NoneShadow; plasmoid.configuration.shadows = LatteCore.Types.NoneShadow;
} }
} }
} }
@ -199,11 +199,11 @@ PlasmaComponents.Page {
} }
if (current === defaultShadowBtn) { if (current === defaultShadowBtn) {
plasmoid.configuration.shadowColorType = Latte.Types.DefaultColorShadow; plasmoid.configuration.shadowColorType = LatteCore.Types.DefaultColorShadow;
} else if (current === themeShadowBtn) { } else if (current === themeShadowBtn) {
plasmoid.configuration.shadowColorType = Latte.Types.ThemeColorShadow; plasmoid.configuration.shadowColorType = LatteCore.Types.ThemeColorShadow;
} else if (current === userShadowBtn) { } else if (current === userShadowBtn) {
plasmoid.configuration.shadowColorType = Latte.Types.UserColorShadow; plasmoid.configuration.shadowColorType = LatteCore.Types.UserColorShadow;
} }
} }
@ -215,7 +215,7 @@ PlasmaComponents.Page {
Layout.fillWidth: true Layout.fillWidth: true
text: i18nc("default shadow", "Default") text: i18nc("default shadow", "Default")
checked: plasmoid.configuration.shadowColorType === Latte.Types.DefaultColorShadow checked: plasmoid.configuration.shadowColorType === LatteCore.Types.DefaultColorShadow
checkable: true checkable: true
exclusiveGroup: shadowColorGroup exclusiveGroup: shadowColorGroup
tooltip: i18n("Default shadow for applets") tooltip: i18n("Default shadow for applets")
@ -226,7 +226,7 @@ PlasmaComponents.Page {
Layout.fillWidth: true Layout.fillWidth: true
text: i18nc("theme shadow", "Theme") text: i18nc("theme shadow", "Theme")
checked: plasmoid.configuration.shadowColorType === Latte.Types.ThemeColorShadow checked: plasmoid.configuration.shadowColorType === LatteCore.Types.ThemeColorShadow
checkable: true checkable: true
exclusiveGroup: shadowColorGroup exclusiveGroup: shadowColorGroup
tooltip: i18n("Shadow from theme color palette") tooltip: i18n("Shadow from theme color palette")
@ -240,7 +240,7 @@ PlasmaComponents.Page {
text: " " text: " "
checkable: true checkable: true
checked: plasmoid.configuration.shadowColorType === Latte.Types.UserColorShadow checked: plasmoid.configuration.shadowColorType === LatteCore.Types.UserColorShadow
tooltip: i18n("Use set shadow color") tooltip: i18n("Use set shadow color")
exclusiveGroup: shadowColorGroup exclusiveGroup: shadowColorGroup

@ -27,10 +27,11 @@ import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.components 3.0 as PlasmaComponents3 import org.kde.plasma.components 3.0 as PlasmaComponents3
import org.kde.plasma.plasmoid 2.0 import org.kde.plasma.plasmoid 2.0
import org.kde.latte 0.2 as Latte
import org.kde.latte.core 0.2 as LatteCore import org.kde.latte.core 0.2 as LatteCore
import org.kde.latte.components 1.0 as LatteComponents import org.kde.latte.components 1.0 as LatteComponents
import org.kde.latte.private.tasks 0.1 as LatteTasks
PlasmaComponents.Page { PlasmaComponents.Page {
Layout.maximumWidth: content.width + content.Layout.leftMargin * 2 Layout.maximumWidth: content.width + content.Layout.leftMargin * 2
Layout.maximumHeight: content.height + units.smallSpacing * 2 Layout.maximumHeight: content.height + units.smallSpacing * 2
@ -361,7 +362,7 @@ PlasmaComponents.Page {
exclusiveGroup: launchersGroup exclusiveGroup: launchersGroup
tooltip: i18n("Use a unique set of launchers for this view which is independent from any other view") tooltip: i18n("Use a unique set of launchers for this view which is independent from any other view")
readonly property int group: Latte.Tasks.UniqueLaunchers readonly property int group: LatteCore.Types.UniqueLaunchers
} }
PlasmaComponents.Button { PlasmaComponents.Button {
@ -376,7 +377,7 @@ PlasmaComponents.Page {
//! it is shown only when the user has activated that option manually from the text layout file //! it is shown only when the user has activated that option manually from the text layout file
visible: tasks.configuration.launchersGroup === group visible: tasks.configuration.launchersGroup === group
readonly property int group: Latte.Tasks.LayoutLaunchers readonly property int group: LatteCore.Types.LayoutLaunchers
} }
PlasmaComponents.Button { PlasmaComponents.Button {
@ -388,7 +389,7 @@ PlasmaComponents.Page {
exclusiveGroup: launchersGroup exclusiveGroup: launchersGroup
tooltip: i18n("Use the global set of launchers for this latteView. This group provides launchers <b>synchronization</b> between different views and between <b>different layouts</b>") tooltip: i18n("Use the global set of launchers for this latteView. This group provides launchers <b>synchronization</b> between different views and between <b>different layouts</b>")
readonly property int group: Latte.Tasks.GlobalLaunchers readonly property int group: LatteCore.Types.GlobalLaunchers
} }
} }
} }
@ -513,11 +514,11 @@ PlasmaComponents.Page {
currentIndex: { currentIndex: {
switch(tasks.configuration.leftClickAction) { switch(tasks.configuration.leftClickAction) {
case Latte.Tasks.PresentWindows: case LatteTasks.Types.PresentWindows:
return 0; return 0;
case Latte.Tasks.CycleThroughTasks: case LatteTasks.Types.CycleThroughTasks:
return 1; return 1;
case Latte.Tasks.PreviewWindows: case LatteTasks.Types.PreviewWindows:
return 2; return 2;
} }
@ -527,13 +528,13 @@ PlasmaComponents.Page {
onCurrentIndexChanged: { onCurrentIndexChanged: {
switch(currentIndex) { switch(currentIndex) {
case 0: case 0:
tasks.configuration.leftClickAction = Latte.Tasks.PresentWindows; tasks.configuration.leftClickAction = LatteTasks.Types.PresentWindows;
break; break;
case 1: case 1:
tasks.configuration.leftClickAction = Latte.Tasks.CycleThroughTasks; tasks.configuration.leftClickAction = LatteTasks.Types.CycleThroughTasks;
break; break;
case 2: case 2:
tasks.configuration.leftClickAction = Latte.Tasks.PreviewWindows; tasks.configuration.leftClickAction = LatteTasks.Types.PreviewWindows;
break; break;
} }
} }
@ -576,13 +577,13 @@ PlasmaComponents.Page {
currentIndex: { currentIndex: {
switch(tasks.configuration.hoverAction) { switch(tasks.configuration.hoverAction) {
case Latte.Tasks.NoneAction: case LatteTasks.Types.NoneAction:
return 0; return 0;
case Latte.Tasks.PreviewWindows: case LatteTasks.Types.PreviewWindows:
return 1; return 1;
case Latte.Tasks.HighlightWindows: case LatteTasks.Types.HighlightWindows:
return 2; return 2;
case Latte.Tasks.PreviewAndHighlightWindows: case LatteTasks.Types.PreviewAndHighlightWindows:
return 3; return 3;
} }
@ -592,16 +593,16 @@ PlasmaComponents.Page {
onCurrentIndexChanged: { onCurrentIndexChanged: {
switch(currentIndex) { switch(currentIndex) {
case 0: case 0:
tasks.configuration.hoverAction = Latte.Tasks.NoneAction; tasks.configuration.hoverAction = LatteTasks.Types.NoneAction;
break; break;
case 1: case 1:
tasks.configuration.hoverAction = Latte.Tasks.PreviewWindows; tasks.configuration.hoverAction = LatteTasks.Types.PreviewWindows;
break; break;
case 2: case 2:
tasks.configuration.hoverAction = Latte.Tasks.HighlightWindows; tasks.configuration.hoverAction = LatteTasks.Types.HighlightWindows;
break; break;
case 3: case 3:
tasks.configuration.hoverAction = Latte.Tasks.PreviewAndHighlightWindows; tasks.configuration.hoverAction = LatteTasks.Types.PreviewAndHighlightWindows;
break; break;
} }
} }

@ -22,14 +22,14 @@ import QtQuick 2.1
import org.kde.plasma.plasmoid 2.0 import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.latte 0.2 as Latte import org.kde.latte.core 0.2 as LatteCore
import org.kde.latte.components 1.0 as LatteComponents import org.kde.latte.components 1.0 as LatteComponents
LatteComponents.ComboBoxButton{ LatteComponents.ComboBoxButton{
id: custom id: custom
checkable: true checkable: true
buttonToolTip: mode === Latte.Types.SideBar ? i18n("SideBar can be shown only when the user has explicitly requested it. For example through an external applet, shortcut or script") : "" buttonToolTip: mode === LatteCore.Types.SideBar ? i18n("SideBar can be shown only when the user has explicitly requested it. For example through an external applet, shortcut or script") : ""
comboBoxTextRole: "name" comboBoxTextRole: "name"
comboBoxBlankSpaceForEmptyIcons: false comboBoxBlankSpaceForEmptyIcons: false

@ -28,7 +28,7 @@ import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.plasmoid 2.0 import org.kde.plasma.plasmoid 2.0
import org.kde.latte 0.2 as Latte import org.kde.latte.core 0.2 as LatteCore
Grid { Grid {
id: typeRow id: typeRow
@ -63,15 +63,15 @@ Grid {
width: horizontal ? (parent.width - parent.spacing)/ 2 : parent.width width: horizontal ? (parent.width - parent.spacing)/ 2 : parent.width
checkable: true checkable: true
checked: latteView.type === Latte.Types.DockView checked: latteView.type === LatteCore.Types.DockView
text: i18nc("dock type","Dock") text: i18nc("dock type","Dock")
exclusiveGroup: viewTypeGroup exclusiveGroup: viewTypeGroup
tooltip: i18n("Change the behavior and appearance to Dock type") tooltip: i18n("Change the behavior and appearance to Dock type")
onPressedChanged: { onPressedChanged: {
if (pressed && !checked) { if (pressed && !checked) {
latteView.visibility.mode = Latte.Types.DodgeActive; latteView.visibility.mode = LatteCore.Types.DodgeActive;
plasmoid.configuration.alignment = Latte.Types.Center; plasmoid.configuration.alignment = LatteCore.Types.Center;
plasmoid.configuration.useThemePanel = true; plasmoid.configuration.useThemePanel = true;
plasmoid.configuration.solidPanel = false; plasmoid.configuration.solidPanel = false;
plasmoid.configuration.panelSize = 5; plasmoid.configuration.panelSize = 5;
@ -82,7 +82,7 @@ Grid {
//! Empty Areas //! Empty Areas
plasmoid.configuration.dragActiveWindowEnabled = false; plasmoid.configuration.dragActiveWindowEnabled = false;
plasmoid.configuration.scrollAction = Latte.Types.ScrollNone; plasmoid.configuration.scrollAction = LatteCore.Types.ScrollNone;
//! Animations //! Animations
plasmoid.configuration.animationLauncherBouncing = true; plasmoid.configuration.animationLauncherBouncing = true;
@ -107,15 +107,15 @@ Grid {
width: dockTypeButton.width width: dockTypeButton.width
checkable: true checkable: true
checked: latteView.type === Latte.Types.PanelView checked: latteView.type === LatteCore.Types.PanelView
text: i18nc("panel type","Panel") text: i18nc("panel type","Panel")
exclusiveGroup: viewTypeGroup exclusiveGroup: viewTypeGroup
tooltip: i18n("Change the behavior and appearance to Panel type") tooltip: i18n("Change the behavior and appearance to Panel type")
onPressedChanged: { onPressedChanged: {
if (pressed && !checked) { if (pressed && !checked) {
latteView.visibility.mode = Latte.Types.AlwaysVisible; latteView.visibility.mode = LatteCore.Types.AlwaysVisible;
plasmoid.configuration.alignment = Latte.Types.Justify; plasmoid.configuration.alignment = LatteCore.Types.Justify;
plasmoid.configuration.useThemePanel = true; plasmoid.configuration.useThemePanel = true;
plasmoid.configuration.solidPanel = false; plasmoid.configuration.solidPanel = false;
plasmoid.configuration.panelSize = 100; plasmoid.configuration.panelSize = 100;

@ -25,7 +25,6 @@ import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.extras 2.0 as PlasmaExtras import org.kde.plasma.extras 2.0 as PlasmaExtras
import org.kde.latte 0.2 as Latte
import org.kde.latte.core 0.2 as LatteCore import org.kde.latte.core 0.2 as LatteCore
PlasmaCore.FrameSvgItem { PlasmaCore.FrameSvgItem {

Loading…
Cancel
Save