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)
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)
//! is empty in Justify mode
function initializationPhase(availableSpace, sizePerApplet, noOfApplets){
if (root.panelAlignment === Latte.Types.Justify) {
if (root.panelAlignment === LatteCore.Types.Justify) {
initLayoutForFillsCalculations(startLayout);
initLayoutForFillsCalculations(endLayout);
}
@ -203,7 +203,7 @@ function initializationPhase(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);
availableSpace = res[0]; sizePerApplet = res[1]; noOfApplets = res[2];
// console.log( " i2 : " + availableSpace + " _ " + sizePerApplet + " _ " + noOfApplets );
@ -228,7 +228,7 @@ function updateSizeForAppletsInFill() {
return;
// 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 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.extras 2.0 as PlasmaExtras
import org.kde.latte 0.2 as Latte
import org.kde.latte.core 0.2 as LatteCore
Window{
width: mainGrid.width + 10
@ -315,22 +315,22 @@ Window{
Text{
text: {
switch(plasmoid.configuration.alignment){
case Latte.Types.Left:
case LatteCore.Types.Left:
return "Left";
break;
case Latte.Types.Right:
case LatteCore.Types.Right:
return "Right";
break;
case Latte.Types.Center:
case LatteCore.Types.Center:
return "Center";
break;
case Latte.Types.Top:
case LatteCore.Types.Top:
return "Top";
break;
case Latte.Types.Bottom:
case LatteCore.Types.Bottom:
return "Bottom";
break;
case Latte.Types.Justify:
case LatteCore.Types.Justify:
return "Justify";
break;
}
@ -349,40 +349,40 @@ Window{
return "";
switch(latteView.visibility.mode){
case Latte.Types.AlwaysVisible:
case LatteCore.Types.AlwaysVisible:
return "Always Visible";
break;
case Latte.Types.AutoHide:
case LatteCore.Types.AutoHide:
return "Auto Hide";
break;
case Latte.Types.DodgeActive:
case LatteCore.Types.DodgeActive:
return "Dodge Active";
break;
case Latte.Types.DodgeMaximized:
case LatteCore.Types.DodgeMaximized:
return "Dodge Maximized";
break;
case Latte.Types.DodgeAllWindows:
case LatteCore.Types.DodgeAllWindows:
return "Dodge All Windows";
break;
case Latte.Types.DodgeAllWindows:
case LatteCore.Types.DodgeAllWindows:
return "Dodge All Windows";
break;
case Latte.Types.WindowsGoBelow:
case LatteCore.Types.WindowsGoBelow:
return "Windows Go Below";
break;
case Latte.Types.WindowsCanCover:
case LatteCore.Types.WindowsCanCover:
return "Windows Can Cover";
break;
case Latte.Types.WindowsAlwaysCover:
case LatteCore.Types.WindowsAlwaysCover:
return "Windows Always Cover";
break;
case Latte.Types.SideBar:
case LatteCore.Types.SideBar:
return "OnDemand SideBar";
break;
case Latte.Types.NormalWindow:
case LatteCore.Types.NormalWindow:
return "Normal Window";
break;
case Latte.Types.None:
case LatteCore.Types.None:
return "None";
break;
}

@ -22,8 +22,6 @@ import QtQuick 2.7
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.draganddrop 2.0 as DragDrop
import org.kde.latte 0.2 as Latte
DragDrop.DropArea {
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.kquickcontrolsaddons 2.0
import org.kde.latte 0.2 as Latte
import org.kde.latte.core 0.2 as LatteCore
import "colorizer" as Colorizer
@ -56,7 +55,7 @@ Item{
if (root.behaveAsPlasmaPanel && LatteCore.WindowSystem.compositingActive && !root.editMode) {
return root.width;
} else {
if ((root.panelAlignment === Latte.Types.Justify) && root.isHorizontal) {
if ((root.panelAlignment === LatteCore.Types.Justify) && root.isHorizontal) {
return root.maxLength;
} else {
return Math.max(root.minLength, layoutsContainerItem.mainLayout.width + spacing);
@ -68,7 +67,7 @@ Item{
if (root.behaveAsPlasmaPanel && LatteCore.WindowSystem.compositingActive && !root.editMode) {
return root.height;
} else {
if ((root.panelAlignment === Latte.Types.Justify) && root.isVertical) {
if ((root.panelAlignment === LatteCore.Types.Justify) && root.isVertical) {
return root.maxLength;
} else {
return Math.max(root.minLength, layoutsContainerItem.mainLayout.height + spacing);
@ -77,11 +76,11 @@ Item{
}
property int spacing: {
if (root.panelAlignment === Latte.Types.Justify && root.maxLengthPerCentage === 100) {
if (root.panelAlignment === LatteCore.Types.Justify && root.maxLengthPerCentage === 100) {
return 0;
} else if (!LatteCore.WindowSystem.compositingActive) {
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;
} else {
return root.panelEdgeSpacing/4;
@ -203,9 +202,9 @@ Item{
if (imagePath === "") {
return 0;
} else {
if (root.panelAlignment === Latte.Types.Left && root.offset===0)
if (root.panelAlignment === LatteCore.Types.Left && root.offset===0)
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;
else
return margins.left+margins.right;
@ -216,9 +215,9 @@ Item{
if (imagePath === "") {
return 0;
} else {
if (root.panelAlignment === Latte.Types.Top && root.offset===0)
if (root.panelAlignment === LatteCore.Types.Top && root.offset===0)
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;
else
return margins.top + margins.bottom;
@ -701,7 +700,7 @@ Item{
///Left
State {
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 {
target: barLine
@ -714,13 +713,13 @@ Item{
PropertyChanges{
target: barLine
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
State {
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 {
target: barLine
@ -739,7 +738,7 @@ Item{
///Left
State {
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 {
target: barLine
@ -758,7 +757,7 @@ Item{
///Right
State {
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 {
target: barLine
@ -771,12 +770,12 @@ Item{
PropertyChanges{
target: barLine
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 {
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 {
target: barLine
@ -794,7 +793,7 @@ Item{
},
State {
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 {
target: barLine
@ -813,7 +812,7 @@ Item{
///Bottom
State {
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 {
target: barLine
@ -826,14 +825,14 @@ Item{
PropertyChanges{
target: barLine
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 {
name: "bottomLeft"
when: (plasmoid.location === PlasmaCore.Types.BottomEdge)
&&(((root.panelAlignment === Latte.Types.Left)&&(Qt.application.layoutDirection !== Qt.RightToLeft))
|| ((root.panelAlignment === Latte.Types.Right)&&(Qt.application.layoutDirection === Qt.RightToLeft)))
&&(((root.panelAlignment === LatteCore.Types.Left)&&(Qt.application.layoutDirection !== Qt.RightToLeft))
|| ((root.panelAlignment === LatteCore.Types.Right)&&(Qt.application.layoutDirection === Qt.RightToLeft)))
AnchorChanges {
target: barLine
@ -853,8 +852,8 @@ Item{
State {
name: "bottomRight"
when: (plasmoid.location === PlasmaCore.Types.BottomEdge)
&&(((root.panelAlignment === Latte.Types.Right)&&(Qt.application.layoutDirection !== Qt.RightToLeft))
||((root.panelAlignment === Latte.Types.Left)&&(Qt.application.layoutDirection === Qt.RightToLeft)))
&&(((root.panelAlignment === LatteCore.Types.Right)&&(Qt.application.layoutDirection !== Qt.RightToLeft))
||((root.panelAlignment === LatteCore.Types.Left)&&(Qt.application.layoutDirection === Qt.RightToLeft)))
AnchorChanges {
target: barLine
@ -873,7 +872,7 @@ Item{
///Top
State {
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 {
target: barLine
@ -886,14 +885,14 @@ Item{
PropertyChanges{
target: barLine
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 {
name: "topLeft"
when: (plasmoid.location === PlasmaCore.Types.TopEdge)
&&(((root.panelAlignment === Latte.Types.Left)&&(Qt.application.layoutDirection !== Qt.RightToLeft))
|| ((root.panelAlignment === Latte.Types.Right)&&(Qt.application.layoutDirection === Qt.RightToLeft)))
&&(((root.panelAlignment === LatteCore.Types.Left)&&(Qt.application.layoutDirection !== Qt.RightToLeft))
|| ((root.panelAlignment === LatteCore.Types.Right)&&(Qt.application.layoutDirection === Qt.RightToLeft)))
AnchorChanges {
target: barLine
@ -912,8 +911,8 @@ Item{
State {
name: "topRight"
when: (plasmoid.location === PlasmaCore.Types.TopEdge)
&&(((root.panelAlignment === Latte.Types.Right)&&(Qt.application.layoutDirection !== Qt.RightToLeft))
||((root.panelAlignment === Latte.Types.Left)&&(Qt.application.layoutDirection === Qt.RightToLeft)))
&&(((root.panelAlignment === LatteCore.Types.Right)&&(Qt.application.layoutDirection !== Qt.RightToLeft))
||((root.panelAlignment === LatteCore.Types.Left)&&(Qt.application.layoutDirection === Qt.RightToLeft)))
AnchorChanges {
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.components 2.0 as PlasmaComponents
import org.kde.latte 0.2 as Latte
Item{
Component.onCompleted: {

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

@ -22,7 +22,7 @@ import QtQuick 2.8
import org.kde.plasma.core 2.0 as PlasmaCore
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 {
id: sizer
@ -31,7 +31,7 @@ Ability {
// the automatic icon size algorithm should better be disabled
readonly property bool isActive: !root.containsOnlyPlasmaTasks
&& 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 bool automaticSizeAnimation: false
@ -162,10 +162,10 @@ Ability {
//console.log("max length: "+ maxLength);
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
} 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
}

@ -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.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 "colorizer" as Colorizer
@ -89,11 +89,11 @@ Item {
property bool lastChildOfEndLayout: index === layoutsContainer.endLayout.lastVisibleIndex
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;
}
if (root.panelAlignment === Latte.Types.Justify) {
if (root.panelAlignment === LatteCore.Types.Justify) {
//! Justify case
if (root.maxLengthPerCentage!==100) {
return false;
@ -118,17 +118,17 @@ Item {
//! [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
/*if (root.panelAlignment === Latte.Types.Left) {
/*if (root.panelAlignment === LatteCore.Types.Left) {
//! Left case
return firstChildOfMainLayout;
} else if (root.panelAlignment === Latte.Types.Right) {
} else if (root.panelAlignment === LatteCore.Types.Right) {
//! Right case
return lastChildOfMainLayout
}
if (root.panelAlignment === Latte.Types.Top) {
if (root.panelAlignment === LatteCore.Types.Top) {
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));
}*/

@ -20,7 +20,6 @@
import QtQuick 2.1
import org.kde.latte 0.2 as Latte
import org.kde.latte.core 0.2 as LatteCore
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.components 2.0 as PlasmaComponents
import org.kde.latte 0.2 as Latte
import org.kde.latte.core 0.2 as LatteCore
import "../../code/MathTools.js" as MathTools
@ -44,7 +43,7 @@ Item{
//! width for applets that use fillWidth/fillHeight such plasma taskmanagers and AWC
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 ?
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
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 ?
appletItem.sizeForFill : Math.min(appletItem.sizeForFill, applet.Layout.maximumHeight);

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

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

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

@ -21,8 +21,6 @@ import QtQuick 2.7
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.latte 0.2 as Latte
Loader {
id: indicatorLoader
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.core 2.0 as PlasmaCore
import org.kde.latte 0.2 as Latte
Item{
id: main
clip: true

@ -22,7 +22,6 @@ import QtQuick 2.7
import org.kde.plasma.plasmoid 2.0
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 "../../code/ColorizerTools.js" as ColorizerTools
@ -31,7 +30,7 @@ Loader{
id: manager
//! 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
@ -62,13 +61,13 @@ Loader{
readonly property color editModeTextColor: latteView && latteView.layout ? latteView.layout.textColor : "white"
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 bool applyingWindowColors: (root.windowColors === Latte.Types.ActiveWindowColors && latteView && latteView.windowsTracker
readonly property bool applyingWindowColors: (root.windowColors === LatteCore.Types.ActiveWindowColors && latteView && latteView.windowsTracker
&& selectedWindowsTracker.activeWindowScheme)
|| (root.windowColors === Latte.Types.TouchingWindowColors && latteView && latteView.windowsTracker
|| (root.windowColors === LatteCore.Types.TouchingWindowColors && latteView && latteView.windowsTracker
&& latteView.windowsTracker.currentScreen.touchingWindowScheme)
property QtObject applyTheme: {
@ -77,11 +76,11 @@ Loader{
}
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;
}
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
//! the active window scheme is used for convenience
if (latteView.windowsTracker.currentScreen.existsWindowTouching
@ -97,18 +96,18 @@ Loader{
if (themeExtended) {
if (root.userShowPanelBackground && root.plasmaBackgroundForPopups && root.hasExpandedApplet /*for expanded popups when it is enabled*/
|| 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.windowColors === Latte.Types.NoneWindowColors
|| (root.themeColors === LatteCore.Types.SmartThemeColors /*for Smart theming that Windows colors are not used and the user wants solidness at some cases*/
&& root.windowColors === LatteCore.Types.NoneWindowColors
&& root.forceSolidPanel) ) {
/* plasma style*/
return theme;
}
if (root.themeColors === Latte.Types.ReverseThemeColors) {
if (root.themeColors === LatteCore.Types.ReverseThemeColors) {
return themeExtended.isLightTheme ? themeExtended.darkTheme : themeExtended.lightTheme;
}
if (root.themeColors === Latte.Types.SmartThemeColors) {
if (root.themeColors === LatteCore.Types.SmartThemeColors) {
//! Smart Colors Case
if (!root.forcePanelForBusyBackground) {
//! simple case that not a busy background is applied
@ -143,7 +142,7 @@ Loader{
&& root.inConfigureAppletsMode
&& LatteCore.WindowSystem.compositingActive
&& root.panelTransparency<40
&& (root.themeColors === Latte.Types.SmartThemeColors)) {
&& (root.themeColors === LatteCore.Types.SmartThemeColors)) {
return latteView.layout.textColor;
}
@ -165,7 +164,7 @@ Loader{
readonly property color buttonFocusColor: applyTheme.buttonFocusColor
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) {
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.components 2.0 as PlasmaComponents
import org.kde.latte 0.2 as Latte
import org.kde.latte.core 0.2 as LatteCore
import "controls" as SettingsControls
@ -37,7 +36,7 @@ Item {
readonly property bool containsMouse: rearrangeBtn.containsMouse || stickOnBottomBtn.containsMouse || stickOnTopBtn.containsMouse
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: {
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.components 2.0 as PlasmaComponents
import org.kde.latte 0.2 as Latte
import "controls" as SettingsControls
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.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.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.components 2.0 as PlasmaComponents
import org.kde.latte 0.2 as Latte
Item{
id: button
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.components 2.0 as PlasmaComponents
import org.kde.latte 0.2 as Latte
import org.kde.latte.core 0.2 as LatteCore
Item{
id: rulerItem
@ -87,13 +87,13 @@ Item{
property: "xL"
value: {
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;
} else if (root.panelAlignment === Latte.Types.Left) {
} else if (root.panelAlignment === LatteCore.Types.Left) {
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;
} else if (root.panelAlignment === Latte.Types.Right) {
} else if (root.panelAlignment === LatteCore.Types.Right) {
return root.width - rulerItem.length - root.offset;
}
} else {
@ -107,13 +107,13 @@ Item{
property: "yL"
value: {
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;
} else if (root.panelAlignment === Latte.Types.Top) {
} else if (root.panelAlignment === LatteCore.Types.Top) {
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;
} else if (root.panelAlignment === Latte.Types.Bottom) {
} else if (root.panelAlignment === LatteCore.Types.Bottom) {
return root.height - rulerItem.length - root.offset;
}
} 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.core 2.0 as PlasmaCore
import org.kde.latte 0.2 as Latte
import org.kde.latte.core 0.2 as LatteCore
MouseArea{
id: rulerMouseArea
@ -58,13 +58,13 @@ MouseArea{
var newTotal = Math.abs(plasmoid.configuration.offset) + value;
//centered and justify alignments based on offset and get out of the screen in some cases
var centeredCheck = ((plasmoid.configuration.alignment === Latte.Types.Center)
|| (plasmoid.configuration.alignment === Latte.Types.Justify))
var centeredCheck = ((plasmoid.configuration.alignment === LatteCore.Types.Center)
|| (plasmoid.configuration.alignment === LatteCore.Types.Justify))
&& ((Math.abs(plasmoid.configuration.offset) + value/2) > 50);
if (newTotal > 100 || centeredCheck) {
if ((plasmoid.configuration.alignment === Latte.Types.Center)
|| (plasmoid.configuration.alignment === Latte.Types.Justify)) {
if ((plasmoid.configuration.alignment === LatteCore.Types.Center)
|| (plasmoid.configuration.alignment === LatteCore.Types.Justify)) {
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.core 2.0 as PlasmaCore
import org.kde.latte 0.2 as Latte
import "../applet/indicator" as AppletIndicator
Item{

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

@ -22,7 +22,7 @@ import QtQuick 2.7
import org.kde.plasma.core 2.0 as PlasmaCore
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 "indicator" as Indicator
@ -34,7 +34,7 @@ Loader {
width: active ? item.width : 0
height: active ? item.height: 0
property int alignment: Latte.Types.BottomEdgeCenterAlign
property int alignment: LatteCore.Types.BottomEdgeCenterAlign
sourceComponent: MouseArea{
id: mainArea
@ -56,7 +56,7 @@ Loader {
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 lastPressY: -1
@ -124,7 +124,7 @@ Loader {
return;
}
if (root.scrollAction === Latte.Types.ScrollNone) {
if (root.scrollAction === LatteCore.Types.ScrollNone) {
root.emptyAreasWheel(wheel);
return;
}
@ -146,11 +146,11 @@ Loader {
if (angle>10) {
//! upwards
if (root.scrollAction === Latte.Types.ScrollDesktops) {
if (root.scrollAction === LatteCore.Types.ScrollDesktops) {
latteView.windowsTracker.switchToPreviousVirtualDesktop();
} else if (root.scrollAction === Latte.Types.ScrollActivities) {
} else if (root.scrollAction === LatteCore.Types.ScrollActivities) {
latteView.windowsTracker.switchToPreviousActivity();
} else if (root.scrollAction === Latte.Types.ScrollToggleMinimized) {
} else if (root.scrollAction === LatteCore.Types.ScrollToggleMinimized) {
if (!ctrlPressed) {
tasksLoader.item.activateNextPrevTask(true);
} else if (!selectedWindowsTracker.lastActiveWindow.isMaximized){
@ -161,11 +161,11 @@ Loader {
}
} else if (angle<-10) {
//! downwards
if (root.scrollAction === Latte.Types.ScrollDesktops) {
if (root.scrollAction === LatteCore.Types.ScrollDesktops) {
latteView.windowsTracker.switchToNextVirtualDesktop();
} else if (root.scrollAction === Latte.Types.ScrollActivities) {
} else if (root.scrollAction === LatteCore.Types.ScrollActivities) {
latteView.windowsTracker.switchToNextActivity();
} else if (root.scrollAction === Latte.Types.ScrollToggleMinimized) {
} else if (root.scrollAction === LatteCore.Types.ScrollToggleMinimized) {
if (!ctrlPressed) {
if (selectedWindowsTracker.lastActiveWindow.isValid
&& !selectedWindowsTracker.lastActiveWindow.isMinimized
@ -238,7 +238,7 @@ Loader {
states:[
State {
name: "bottomCenter"
when: (alignment === Latte.Types.BottomEdgeCenterAlign)
when: (alignment === LatteCore.Types.BottomEdgeCenterAlign)
AnchorChanges {
target: environmentLoader
@ -248,7 +248,7 @@ Loader {
},
State {
name: "bottomLeft"
when: (alignment === Latte.Types.BottomEdgeLeftAlign)
when: (alignment === LatteCore.Types.BottomEdgeLeftAlign)
AnchorChanges {
target: environmentLoader
@ -258,7 +258,7 @@ Loader {
},
State {
name: "bottomRight"
when: (alignment === Latte.Types.BottomEdgeRightAlign)
when: (alignment === LatteCore.Types.BottomEdgeRightAlign)
AnchorChanges {
target: environmentLoader
@ -268,7 +268,7 @@ Loader {
},
State {
name: "topCenter"
when: (alignment === Latte.Types.TopEdgeCenterAlign)
when: (alignment === LatteCore.Types.TopEdgeCenterAlign)
AnchorChanges {
target: environmentLoader
@ -278,7 +278,7 @@ Loader {
},
State {
name: "topLeft"
when: (alignment === Latte.Types.TopEdgeLeftAlign)
when: (alignment === LatteCore.Types.TopEdgeLeftAlign)
AnchorChanges {
target: environmentLoader
@ -288,7 +288,7 @@ Loader {
},
State {
name: "topRight"
when: (alignment === Latte.Types.TopEdgeRightAlign)
when: (alignment === LatteCore.Types.TopEdgeRightAlign)
AnchorChanges {
target: environmentLoader
@ -298,7 +298,7 @@ Loader {
},
State {
name: "leftCenter"
when: (alignment === Latte.Types.LeftEdgeCenterAlign)
when: (alignment === LatteCore.Types.LeftEdgeCenterAlign)
AnchorChanges {
target: environmentLoader
@ -308,7 +308,7 @@ Loader {
},
State {
name: "leftTop"
when: (alignment === Latte.Types.LeftEdgeTopAlign)
when: (alignment === LatteCore.Types.LeftEdgeTopAlign)
AnchorChanges {
target: environmentLoader
@ -318,7 +318,7 @@ Loader {
},
State {
name: "leftBottom"
when: (alignment === Latte.Types.LeftEdgeBottomAlign)
when: (alignment === LatteCore.Types.LeftEdgeBottomAlign)
AnchorChanges {
target: environmentLoader
@ -328,7 +328,7 @@ Loader {
},
State {
name: "rightCenter"
when: (alignment === Latte.Types.RightEdgeCenterAlign)
when: (alignment === LatteCore.Types.RightEdgeCenterAlign)
AnchorChanges {
target: environmentLoader
@ -338,7 +338,7 @@ Loader {
},
State {
name: "rightTop"
when: (alignment === Latte.Types.RightEdgeTopAlign)
when: (alignment === LatteCore.Types.RightEdgeTopAlign)
AnchorChanges {
target: environmentLoader
@ -348,7 +348,7 @@ Loader {
},
State {
name: "rightBottom"
when: (alignment === Latte.Types.RightEdgeBottomAlign)
when: (alignment === LatteCore.Types.RightEdgeBottomAlign)
AnchorChanges {
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.latte 0.2 as Latte
import org.kde.latte.core 0.2 as LatteCore
import "../../code/HeuristicTools.js" as HeuristicTools
@ -34,7 +33,7 @@ Item{
id: layoutsContainer
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 )
|| (behaveAsPlasmaPanel && root.inConfigureAppletsMode))*/
@ -125,7 +124,7 @@ Item{
z:10
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 contentsHeight: _startLayout.height + _mainLayout.height + _endLayout.height
@ -184,7 +183,7 @@ Item{
onYChanged: root.updateEffectsArea();
EnvironmentActions {
active: root.scrollAction !== Latte.Types.ScrollNone || root.dragActiveWindowEnabled || root.closeActiveWindowEnabled
active: root.scrollAction !== LatteCore.Types.ScrollNone || root.dragActiveWindowEnabled || root.closeActiveWindowEnabled
alignment: _mainLayout.alignment
}
@ -194,13 +193,13 @@ Item{
offset: root.totalPanelEdgeSpacing/2
alignment: {
switch(plasmoid.location) {
case PlasmaCore.Types.BottomEdge: return Latte.Types.BottomEdgeLeftAlign;
case PlasmaCore.Types.TopEdge: return Latte.Types.TopEdgeLeftAlign;
case PlasmaCore.Types.LeftEdge: return Latte.Types.LeftEdgeTopAlign;
case PlasmaCore.Types.RightEdge: return Latte.Types.RightEdgeTopAlign;
case PlasmaCore.Types.BottomEdge: return LatteCore.Types.BottomEdgeLeftAlign;
case PlasmaCore.Types.TopEdge: return LatteCore.Types.TopEdgeLeftAlign;
case PlasmaCore.Types.LeftEdge: return LatteCore.Types.LeftEdgeTopAlign;
case PlasmaCore.Types.RightEdge: return LatteCore.Types.RightEdgeTopAlign;
}
return Latte.Types.BottomEdgeLeftAlign;
return LatteCore.Types.BottomEdgeLeftAlign;
}
}
@ -209,52 +208,52 @@ Item{
beginIndex: 100
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 int appliedOffset: root.panelAlignment === Latte.Types.Justify ? 0 : root.offset
readonly property int appliedOffset: root.panelAlignment === LatteCore.Types.Justify ? 0 : root.offset
alignment: {
if (plasmoid.location === PlasmaCore.Types.LeftEdge) {
if (centered) return Latte.Types.LeftEdgeCenterAlign;
if (root.panelAlignment === Latte.Types.Top) return Latte.Types.LeftEdgeTopAlign;
if (root.panelAlignment === Latte.Types.Bottom) return Latte.Types.LeftEdgeBottomAlign;
if (centered) return LatteCore.Types.LeftEdgeCenterAlign;
if (root.panelAlignment === LatteCore.Types.Top) return LatteCore.Types.LeftEdgeTopAlign;
if (root.panelAlignment === LatteCore.Types.Bottom) return LatteCore.Types.LeftEdgeBottomAlign;
}
if (plasmoid.location === PlasmaCore.Types.RightEdge) {
if (centered) return Latte.Types.RightEdgeCenterAlign;
if (root.panelAlignment === Latte.Types.Top) return Latte.Types.RightEdgeTopAlign;
if (root.panelAlignment === Latte.Types.Bottom) return Latte.Types.RightEdgeBottomAlign;
if (centered) return LatteCore.Types.RightEdgeCenterAlign;
if (root.panelAlignment === LatteCore.Types.Top) return LatteCore.Types.RightEdgeTopAlign;
if (root.panelAlignment === LatteCore.Types.Bottom) return LatteCore.Types.RightEdgeBottomAlign;
}
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)
|| (root.panelAlignment === Latte.Types.Right && reversed)) {
return Latte.Types.BottomEdgeLeftAlign;
if ((root.panelAlignment === LatteCore.Types.Left && !reversed)
|| (root.panelAlignment === LatteCore.Types.Right && reversed)) {
return LatteCore.Types.BottomEdgeLeftAlign;
}
if ((root.panelAlignment === Latte.Types.Right && !reversed)
|| (root.panelAlignment === Latte.Types.Left && reversed)) {
return Latte.Types.BottomEdgeRightAlign;
if ((root.panelAlignment === LatteCore.Types.Right && !reversed)
|| (root.panelAlignment === LatteCore.Types.Left && reversed)) {
return LatteCore.Types.BottomEdgeRightAlign;
}
}
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)
|| (root.panelAlignment === Latte.Types.Right && reversed)) {
return Latte.Types.TopEdgeLeftAlign;
if ((root.panelAlignment === LatteCore.Types.Left && !reversed)
|| (root.panelAlignment === LatteCore.Types.Right && reversed)) {
return LatteCore.Types.TopEdgeLeftAlign;
}
if ((root.panelAlignment === Latte.Types.Right && !reversed)
|| (root.panelAlignment === Latte.Types.Left && reversed)) {
return Latte.Types.TopEdgeRightAlign;
if ((root.panelAlignment === LatteCore.Types.Right && !reversed)
|| (root.panelAlignment === LatteCore.Types.Left && reversed)) {
return LatteCore.Types.TopEdgeRightAlign;
}
}
return Latte.Types.BottomEdgeCenterAlign;
return LatteCore.Types.BottomEdgeCenterAlign;
}
transitions: Transition {
@ -272,13 +271,13 @@ Item{
offset: root.totalPanelEdgeSpacing/2
alignment: {
switch(plasmoid.location) {
case PlasmaCore.Types.BottomEdge: return Latte.Types.BottomEdgeRightAlign;
case PlasmaCore.Types.TopEdge: return Latte.Types.TopEdgeRightAlign;
case PlasmaCore.Types.LeftEdge: return Latte.Types.LeftEdgeBottomAlign;
case PlasmaCore.Types.RightEdge: return Latte.Types.RightEdgeBottomAlign;
case PlasmaCore.Types.BottomEdge: return LatteCore.Types.BottomEdgeRightAlign;
case PlasmaCore.Types.TopEdge: return LatteCore.Types.TopEdgeRightAlign;
case PlasmaCore.Types.LeftEdge: return LatteCore.Types.LeftEdgeBottomAlign;
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 org.kde.latte 0.2 as Latte
Item{
id: indicatorBridge
anchors.fill: parent

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

@ -21,11 +21,11 @@ import QtQuick 2.7
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 {
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 {
TaskManager.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.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
@ -95,20 +94,20 @@ Item {
return (visibilityManager.panelIsBiggerFromIconSize
&& (maxZoomFactor === 1.0)
&& (plasmoid.configuration.alignment === Latte.Types.Justify)
&& (plasmoid.configuration.alignment === LatteCore.Types.Justify)
&& !root.editMode
&& !visibilityManager.inLocationAnimation);
}
property int viewType: {
if ((plasmoid.configuration.alignment === Latte.Types.Justify)
if ((plasmoid.configuration.alignment === LatteCore.Types.Justify)
&& (plasmoid.configuration.useThemePanel)
&& (plasmoid.configuration.panelSize === 100)
&& (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)
@ -156,15 +155,15 @@ Item {
&& !inConfigureAppletsMode
&& !forceSolidPanel
&& !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)
|| normalBusyForTouchingBusyVerticalView )
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
&& root.themeColors === Latte.Types.SmartThemeColors
&& root.themeColors === LatteCore.Types.SmartThemeColors
&& plasmoid.configuration.backgroundOnlyOnMaximized
/*&& !plasmoid.configuration.solidBackgroundForMaximized
&& !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
/*(latteView && latteView.windowsTracker /*is touching a vertical view that is in busy state and the user prefers solidness*/
/* && latteView.windowsTracker.currentScreen.isTouchingBusyVerticalView
&& root.themeColors === Latte.Types.SmartThemeColors
&& root.themeColors === LatteCore.Types.SmartThemeColors
&& plasmoid.configuration.backgroundOnlyOnMaximized
&& plasmoid.configuration.solidBackgroundForMaximized
&& !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
//(latteView && latteView.windowsTracker /*is touching a vertical view that is in busy state and the user prefers solidness*/
/* && latteView.windowsTracker.currentScreen.isTouchingBusyVerticalView
&& root.themeColors === Latte.Types.SmartThemeColors
&& root.themeColors === LatteCore.Types.SmartThemeColors
&& plasmoid.configuration.backgroundOnlyOnMaximized
&& plasmaBackgroundForPopups)*/
@ -190,9 +189,9 @@ Item {
&& latteView.windowsTracker.currentScreen.existsWindowMaximized
property bool hideLengthScreenGaps: hideThickScreenGap
&& (latteView.visibility.mode === Latte.Types.AlwaysVisible
|| latteView.visibility.mode === Latte.Types.WindowsGoBelow)
&& (plasmoid.configuration.alignment === Latte.Types.Justify)
&& (latteView.visibility.mode === LatteCore.Types.AlwaysVisible
|| latteView.visibility.mode === LatteCore.Types.WindowsGoBelow)
&& (plasmoid.configuration.alignment === LatteCore.Types.Justify)
&& plasmoid.configuration.maxLength>85
&& !root.editMode
@ -201,7 +200,7 @@ Item {
property int themeColors: plasmoid.configuration.themeColors
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
@ -216,7 +215,7 @@ Item {
property bool closeActiveWindowEnabled: plasmoid.configuration.closeActiveWindowEnabled
property bool dragActiveWindowEnabled: plasmoid.configuration.dragActiveWindowEnabled
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 inSlidingOut: visibilityManager ? visibilityManager.inSlidingOut : false
property bool inStartup: true
@ -331,10 +330,10 @@ Item {
property int appShadowSizeOriginal: enableShadows ? (0.5*container.maxIconSize) * (plasmoid.configuration.shadowSize/100) : 0
property string appChosenShadowColor: {
if (plasmoid.configuration.shadowColorType === Latte.Types.ThemeColorShadow) {
if (plasmoid.configuration.shadowColorType === LatteCore.Types.ThemeColorShadow) {
var strC = String(theme.textColor);
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;
}
@ -359,7 +358,7 @@ Item {
}
//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
property int realPanelSize: 0
@ -435,12 +434,12 @@ Item {
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...
//property int layoutsContainer.mainLayoutPosition: !plasmoid.immutable ? Latte.Types.Center : (root.isVertical ? Latte.Types.Top : Latte.Types.Left)
//property int panelAlignment: plasmoid.configuration.alignment !== Latte.Types.Justify ? plasmoid.configuration.alignment : layoutsContainer.mainLayoutPosition
//property int layoutsContainer.mainLayoutPosition: !plasmoid.immutable ? LatteCore.Types.Center : (root.isVertical ? LatteCore.Types.Top : LatteCore.Types.Left)
//property int panelAlignment: plasmoid.configuration.alignment !== LatteCore.Types.Justify ? plasmoid.configuration.alignment : layoutsContainer.mainLayoutPosition
property int panelAlignment: !root.inConfigureAppletsMode ? plasmoid.configuration.alignment :
( plasmoid.configuration.alignment === Latte.Types.Justify ?
Latte.Types.Center : plasmoid.configuration.alignment )
( plasmoid.configuration.alignment === LatteCore.Types.Justify ?
LatteCore.Types.Center : plasmoid.configuration.alignment )
property int panelUserSetAlignment: plasmoid.configuration.alignment
@ -479,9 +478,9 @@ Item {
property QtObject selectedWindowsTracker: {
if (latteView && latteView.windowsTracker) {
switch(plasmoid.configuration.activeWindowFilter) {
case Latte.Types.ActiveInCurrentScreen:
case LatteCore.Types.ActiveInCurrentScreen:
return latteView.windowsTracker.currentScreen;
case Latte.Types.ActiveFromAllScreens:
case LatteCore.Types.ActiveFromAllScreens:
return latteView.windowsTracker.allScreens;
}
}
@ -503,11 +502,11 @@ Item {
readonly property bool hasInternalSeparator: latteApplet ? latteApplet.hasInternalSeparator : false
property int animationStep: {
if (!universalSettings || universalSettings.mouseSensitivity === Latte.Types.HighSensitivity) {
if (!universalSettings || universalSettings.mouseSensitivity === LatteCore.Types.HighSensitivity) {
return 1;
} else if (universalSettings.mouseSensitivity === Latte.Types.MediumSensitivity) {
} else if (universalSettings.mouseSensitivity === LatteCore.Types.MediumSensitivity) {
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);
}
}
@ -665,7 +664,7 @@ Item {
}
onInConfigureAppletsModeChanged: {
if (inConfigureAppletsMode && panelUserSetAlignment===Latte.Types.Justify) {
if (inConfigureAppletsMode && panelUserSetAlignment===LatteCore.Types.Justify) {
joinLayoutsToMainLayout();
} else if (!inConfigureAppletsMode) {
splitMainLayoutToLayouts();
@ -682,7 +681,7 @@ Item {
}
if (!inConfigureAppletsMode){
if (panelUserSetAlignment===Latte.Types.Justify) {
if (panelUserSetAlignment===LatteCore.Types.Justify) {
addInternalViewSplitters();
splitMainLayoutToLayouts();
} else {
@ -690,7 +689,7 @@ Item {
root.destroyInternalViewSplitters();
}
} else {
if (panelUserSetAlignment===Latte.Types.Justify) {
if (panelUserSetAlignment===LatteCore.Types.Justify) {
addInternalViewSplitters();
} else {
root.destroyInternalViewSplitters();
@ -748,15 +747,15 @@ Item {
onIsVerticalChanged: {
if (isVertical) {
if (plasmoid.configuration.alignment === Latte.Types.Left)
plasmoid.configuration.alignment = Latte.Types.Top;
else if (plasmoid.configuration.alignment === Latte.Types.Right)
plasmoid.configuration.alignment = Latte.Types.Bottom;
if (plasmoid.configuration.alignment === LatteCore.Types.Left)
plasmoid.configuration.alignment = LatteCore.Types.Top;
else if (plasmoid.configuration.alignment === LatteCore.Types.Right)
plasmoid.configuration.alignment = LatteCore.Types.Bottom;
} else {
if (plasmoid.configuration.alignment === Latte.Types.Top)
plasmoid.configuration.alignment = Latte.Types.Left;
else if (plasmoid.configuration.alignment === Latte.Types.Bottom)
plasmoid.configuration.alignment = Latte.Types.Right;
if (plasmoid.configuration.alignment === LatteCore.Types.Top)
plasmoid.configuration.alignment = LatteCore.Types.Left;
else if (plasmoid.configuration.alignment === LatteCore.Types.Bottom)
plasmoid.configuration.alignment = LatteCore.Types.Right;
}
}
@ -879,10 +878,10 @@ Item {
///to add applets
/* if (plasmoid.immutable) {
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);
} 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);
}
} 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 3.0 as PlasmaComponents3
import org.kde.latte 0.2 as Latte
import org.kde.latte.components 1.0 as LatteComponents
Rectangle {

@ -22,8 +22,6 @@ import QtQuick 2.1
import org.kde.plasma.core 2.0 as PlasmaCore
import QtGraphicalEffects 1.0
import org.kde.latte 0.2 as Latte
Item{
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.latte 0.2 as Latte
import "." as LatteExtraControls
import "private" as Private

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

@ -29,9 +29,13 @@
// Qt
#include <QtQml>
// Latte
#include <Latte>
void LatteCorePlugin::registerTypes(const char *uri)
{
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::IconItem>(uri, 0, 2, "IconItem");
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)
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.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.private.tasks 0.1 as LatteTasks
import "../code/activitiesTools.js" as ActivitiesTools
@ -730,7 +730,7 @@ PlasmaComponents.ContextMenu {
if (tasksModel.launcherPosition(get(atm.LauncherUrlWithoutIcon)) != -1) {
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,
root.launchersGroup, launcher);
} else {
@ -741,7 +741,7 @@ PlasmaComponents.ContextMenu {
} else {
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,
root.launchersGroup, launcher);
} else {
@ -790,7 +790,7 @@ PlasmaComponents.ContextMenu {
result.clicked.connect(
function() {
if (result.checked) {
if (latteView && root.launchersGroup >= Latte.Tasks.LayoutLaunchers) {
if (latteView && root.launchersGroup >= LatteCore.Types.LayoutLaunchers) {
latteView.layoutsManager.launchersSignals.addLauncherToActivity(root.viewLayoutName,
root.launchersGroup, url, id);
} else {
@ -802,7 +802,7 @@ PlasmaComponents.ContextMenu {
root.launchersUpdatedFor(url);
}
} else {
if (latteView && root.launchersGroup >= Latte.Tasks.LayoutLaunchers) {
if (latteView && root.launchersGroup >= LatteCore.Types.LayoutLaunchers) {
latteView.layoutsManager.launchersSignals.removeLauncherFromActivity(root.viewLayoutName,
root.launchersGroup, url, id);
} else {
@ -861,7 +861,7 @@ PlasmaComponents.ContextMenu {
onClicked: {
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,
root.launchersGroup, launcher);
} else {
@ -905,7 +905,7 @@ PlasmaComponents.ContextMenu {
//root.removeLastSeparator();
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,
root.launchersGroup, launcher);
} else {

@ -22,8 +22,6 @@ import QtQuick 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.
// 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

@ -22,8 +22,6 @@ import QtQuick 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
//! concerning Tasks AND Launchers.
//!

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

@ -22,8 +22,6 @@ import QtQuick 2.7
import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.latte 0.2 as Latte
Item{
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.components 2.0 as PlasmaComponents
import org.kde.latte 0.2 as Latte
import org.kde.latte.components 1.0 as LatteComponents
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.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.applet.abilities 0.1 as AppletAbility
import org.kde.latte.private.tasks 0.1 as LatteTasks
import "abilities" as Ability
import "previews" as Previews
@ -160,13 +160,13 @@ Item {
property bool disableRightSpacer: false
property bool dockIsHidden: latteView ? latteView.dockIsHidden : false
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
property bool parabolicEffectEnabled: latteView ? latteView.parabolicEffectEnabled : zoomFactor>1 && !root.editMode
property bool scrollingEnabled: plasmoid.configuration.scrollTasksEnabled
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 bool showInfoBadge: plasmoid.configuration.showInfoBadge
@ -177,7 +177,7 @@ Item {
property bool showOnlyCurrentScreen: plasmoid.configuration.showOnlyCurrentScreen
property bool showOnlyCurrentDesktop: plasmoid.configuration.showOnlyCurrentDesktop
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
property bool showWindowActions: plasmoid.configuration.showWindowActions
property bool showWindowsOnlyFromLaunchers: plasmoid.configuration.showWindowsOnlyFromLaunchers
@ -198,22 +198,22 @@ Item {
property int modifierClickAction: plasmoid.configuration.modifierClickAction
property int modifierClick: plasmoid.configuration.modifierClick
property int modifierQt:{
if (modifier === Latte.Tasks.Shift)
if (modifier === LatteTasks.Types.Shift)
return Qt.ShiftModifier;
else if (modifier === Latte.Tasks.Ctrl)
else if (modifier === LatteTasks.Types.Ctrl)
return Qt.ControlModifier;
else if (modifier === Latte.Tasks.Alt)
else if (modifier === LatteTasks.Types.Alt)
return Qt.AltModifier;
else if (modifier === Latte.Tasks.Meta)
else if (modifier === LatteTasks.Types.Meta)
return Qt.MetaModifier;
else return -1;
}
property int taskScrollAction: plasmoid.configuration.taskScrollAction
onTaskScrollActionChanged: {
if (taskScrollAction > Latte.Tasks.ScrollToggleMinimized) {
//! migrating scroll action to Latte.Tasks.ScrollAction
plasmoid.configuration.taskScrollAction = plasmoid.configuration.taskScrollAction-Latte.Tasks.ScrollToggleMinimized;
if (taskScrollAction > LatteTasks.Types.ScrollToggleMinimized) {
//! migrating scroll action to LatteTasks.Types.ScrollAction
plasmoid.configuration.taskScrollAction = plasmoid.configuration.taskScrollAction-LatteTasks.Types.ScrollToggleMinimized;
}
}
@ -314,8 +314,8 @@ Item {
plasmoid.action("configure").visible = false;
plasmoid.configuration.isInLatteDock = true;
if (root.launchersGroup === Latte.Tasks.LayoutLaunchers
|| root.launchersGroup === Latte.Tasks.GlobalLaunchers) {
if (root.launchersGroup === LatteCore.Types.LayoutLaunchers
|| root.launchersGroup === LatteCore.Types.GlobalLaunchers) {
tasksModel.updateLaunchersList();
}
} else {
@ -406,23 +406,23 @@ Item {
}
if (inConfigureAppletsMode) {
return Latte.Types.Center;
} else if (latteView.panelUserSetAlignment === Latte.Types.Justify) {
return LatteCore.Types.Center;
} else if (latteView.panelUserSetAlignment === LatteCore.Types.Justify) {
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) {
return Latte.Types.Center;
return LatteCore.Types.Center;
} 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 Latte.Types.Center;
return LatteCore.Types.Center;
}
}
@ -473,12 +473,12 @@ Item {
if (viewLayout) {
if (latteView && latteView.layoutsManager
&& latteView.viewLayout && latteView.universalSettings
&& (root.launchersGroup === Latte.Tasks.LayoutLaunchers
|| root.launchersGroup === Latte.Tasks.GlobalLaunchers)) {
&& (root.launchersGroup === LatteCore.Types.LayoutLaunchers
|| root.launchersGroup === LatteCore.Types.GlobalLaunchers)) {
if (root.launchersGroup === Latte.Tasks.LayoutLaunchers) {
if (root.launchersGroup === LatteCore.Types.LayoutLaunchers) {
launchersList = latteView.viewLayout.launchers;
} else if (root.launchersGroup === Latte.Tasks.GlobalLaunchers) {
} else if (root.launchersGroup === LatteCore.Types.GlobalLaunchers) {
launchersList = latteView.universalSettings.launchers;
}
}
@ -701,12 +701,12 @@ Item {
function updateLaunchersList(){
if (latteView
&& (root.launchersGroup === Latte.Tasks.LayoutLaunchers
|| root.launchersGroup === Latte.Tasks.GlobalLaunchers)) {
if (root.launchersGroup === Latte.Tasks.LayoutLaunchers) {
&& (root.launchersGroup === LatteCore.Types.LayoutLaunchers
|| root.launchersGroup === LatteCore.Types.GlobalLaunchers)) {
if (root.launchersGroup === LatteCore.Types.LayoutLaunchers) {
console.log("Tasks: Applying LAYOUT Launchers List...");
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...");
tasksModel.launcherList = latteView.universalSettings.launchers;
}
@ -735,17 +735,17 @@ Item {
if (viewLayout) {
if (latteView && latteView.layoutsManager
&& latteView.viewLayout && latteView.universalSettings
&& (root.launchersGroup === Latte.Tasks.LayoutLaunchers
|| root.launchersGroup === Latte.Tasks.GlobalLaunchers)) {
&& (root.launchersGroup === LatteCore.Types.LayoutLaunchers
|| root.launchersGroup === LatteCore.Types.GlobalLaunchers)) {
if (root.launchersGroup === Latte.Tasks.LayoutLaunchers) {
if (root.launchersGroup === LatteCore.Types.LayoutLaunchers) {
latteView.viewLayout.launchers = launcherList;
} else if (root.launchersGroup === Latte.Tasks.GlobalLaunchers) {
} else if (root.launchersGroup === LatteCore.Types.GlobalLaunchers) {
latteView.universalSettings.launchers = launcherList;
}
if (inDraggingPhase) {
if (latteView && root.launchersGroup >= Latte.Tasks.LayoutLaunchers) {
if (latteView && root.launchersGroup >= LatteCore.Types.LayoutLaunchers) {
latteView.layoutsManager.launchersSignals.validateLaunchersOrder(root.viewLayoutName,
plasmoid.id,
root.launchersGroup,
@ -785,12 +785,12 @@ Item {
ActivitiesTools.importLaunchersToNewArchitecture();
if (viewLayout && latteView.universalSettings
&& (root.launchersGroup === Latte.Tasks.LayoutLaunchers
|| root.launchersGroup === Latte.Tasks.GlobalLaunchers)) {
&& (root.launchersGroup === LatteCore.Types.LayoutLaunchers
|| root.launchersGroup === LatteCore.Types.GlobalLaunchers)) {
if (root.launchersGroup === Latte.Tasks.LayoutLaunchers) {
if (root.launchersGroup === LatteCore.Types.LayoutLaunchers) {
launcherList = latteView.viewLayout.launchers;
} else if (root.launchersGroup === Latte.Tasks.GlobalLaunchers) {
} else if (root.launchersGroup === LatteCore.Types.GlobalLaunchers) {
launcherList = latteView.universalSettings.launchers;
}
} else {
@ -1209,7 +1209,7 @@ Item {
onUrlsDropped: {
//! 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,
root.launchersGroup, urls);
return;
@ -1567,7 +1567,7 @@ Item {
if (separatorName !== "") {
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,
root.launchersGroup, separatorName);
} else {
@ -1740,7 +1740,7 @@ Item {
if (separatorName !== "") {
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);
} else {
tasksModel.requestAddLauncher(separatorName);
@ -1752,7 +1752,7 @@ Item {
var separatorName = parabolicManager.lastPresentSeparatorName();
if (separatorName !== "") {
if (latteView && root.launchersGroup >= Latte.Tasks.LayoutLaunchers) {
if (latteView && root.launchersGroup >= LatteCore.Types.LayoutLaunchers) {
latteView.layoutsManager.launchersSignals.removeLauncher(root.viewLayoutName,
root.launchersGroup, separatorName);
} else {
@ -1941,7 +1941,7 @@ Item {
///Bottom Edge
State {
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 {
target: barLine
@ -1954,7 +1954,7 @@ Item {
},
State {
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 {
target: barLine
@ -1967,7 +1967,7 @@ Item {
},
State {
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 {
target: barLine
@ -1981,7 +1981,7 @@ Item {
///Top Edge
State {
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 {
target: barLine
@ -1994,7 +1994,7 @@ Item {
},
State {
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 {
target: barLine
@ -2007,7 +2007,7 @@ Item {
},
State {
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 {
target: barLine
@ -2021,7 +2021,7 @@ Item {
////Left Edge
State {
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 {
target: barLine
@ -2034,7 +2034,7 @@ Item {
},
State {
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 {
target: barLine
@ -2047,7 +2047,7 @@ Item {
},
State {
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 {
target: barLine
@ -2061,7 +2061,7 @@ Item {
///Right Edge
State {
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 {
target: barLine
@ -2074,7 +2074,7 @@ Item {
},
State {
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 {
target: barLine
@ -2087,7 +2087,7 @@ Item {
},
State {
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 {
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.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.draganddrop 2.0

@ -21,7 +21,6 @@ import QtQuick 2.0
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

@ -20,7 +20,6 @@
import QtQuick 2.0
import org.kde.latte 0.2 as Latte
import org.kde.latte.core 0.2 as LatteCore
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.latte 0.2 as Latte
import org.kde.latte.core 0.2 as LatteCore
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.latte 0.2 as Latte
import org.kde.latte.components 1.0 as LatteComponents
Item {

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

@ -22,7 +22,6 @@ import QtQuick 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
SequentialAnimation {

@ -24,7 +24,6 @@ import QtGraphicalEffects 1.0
import org.kde.plasma.plasmoid 2.0
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
/////Removing a Window from a group////

@ -22,7 +22,6 @@ import QtQuick 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
///item's added Animation

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

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

@ -22,8 +22,6 @@ import QtQuick 2.7
import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.latte 0.2 as Latte
Loader {
id: indicatorLoader
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.latte 0.2 as Latte
import "../../code/tools.js" as TaskTools
Item {

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

@ -21,7 +21,7 @@ import QtQuick.Controls 1.4
import org.kde.plasma.plasmoid 2.0
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{
id: flickableContainer
@ -32,7 +32,7 @@ Flickable{
property int offset: 0
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 contentsExceed: {
@ -63,46 +63,46 @@ Flickable{
readonly property int alignment: {
if (root.location === PlasmaCore.Types.LeftEdge) {
if (centered) return Latte.Types.LeftEdgeCenterAlign;
if (root.alignment === Latte.Types.Top) return Latte.Types.LeftEdgeTopAlign;
if (root.alignment === Latte.Types.Bottom) return Latte.Types.LeftEdgeBottomAlign;
if (centered) return LatteCore.Types.LeftEdgeCenterAlign;
if (root.alignment === LatteCore.Types.Top) return LatteCore.Types.LeftEdgeTopAlign;
if (root.alignment === LatteCore.Types.Bottom) return LatteCore.Types.LeftEdgeBottomAlign;
}
if (root.location === PlasmaCore.Types.RightEdge) {
if (centered) return Latte.Types.RightEdgeCenterAlign;
if (root.alignment === Latte.Types.Top) return Latte.Types.RightEdgeTopAlign;
if (root.alignment === Latte.Types.Bottom) return Latte.Types.RightEdgeBottomAlign;
if (centered) return LatteCore.Types.RightEdgeCenterAlign;
if (root.alignment === LatteCore.Types.Top) return LatteCore.Types.RightEdgeTopAlign;
if (root.alignment === LatteCore.Types.Bottom) return LatteCore.Types.RightEdgeBottomAlign;
}
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)
|| (root.alignment === Latte.Types.Right && reversed)) {
return Latte.Types.BottomEdgeLeftAlign;
if ((root.alignment === LatteCore.Types.Left && !reversed)
|| (root.alignment === LatteCore.Types.Right && reversed)) {
return LatteCore.Types.BottomEdgeLeftAlign;
}
if ((root.alignment === Latte.Types.Right && !reversed)
|| (root.alignment === Latte.Types.Left && reversed)) {
return Latte.Types.BottomEdgeRightAlign;
if ((root.alignment === LatteCore.Types.Right && !reversed)
|| (root.alignment === LatteCore.Types.Left && reversed)) {
return LatteCore.Types.BottomEdgeRightAlign;
}
}
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)
|| (root.alignment === Latte.Types.Right && reversed)) {
return Latte.Types.TopEdgeLeftAlign;
if ((root.alignment === LatteCore.Types.Left && !reversed)
|| (root.alignment === LatteCore.Types.Right && reversed)) {
return LatteCore.Types.TopEdgeLeftAlign;
}
if ((root.alignment === Latte.Types.Right && !reversed)
|| (root.alignment === Latte.Types.Left && reversed)) {
return Latte.Types.TopEdgeRightAlign;
if ((root.alignment === LatteCore.Types.Right && !reversed)
|| (root.alignment === LatteCore.Types.Left && reversed)) {
return LatteCore.Types.TopEdgeRightAlign;
}
}
return Latte.Types.BottomEdgeCenterAlign;
return LatteCore.Types.BottomEdgeCenterAlign;
}
function increasePos() {
@ -229,7 +229,7 @@ Flickable{
///Left Edge
State {
name: "leftCenter"
when: flickableContainer.alignment === Latte.Types.LeftEdgeCenterAlign
when: flickableContainer.alignment === LatteCore.Types.LeftEdgeCenterAlign
AnchorChanges {
target: flickableContainer
@ -243,7 +243,7 @@ Flickable{
},
State {
name: "leftTop"
when: flickableContainer.alignment === Latte.Types.LeftEdgeTopAlign
when: flickableContainer.alignment === LatteCore.Types.LeftEdgeTopAlign
AnchorChanges {
target: flickableContainer
@ -257,7 +257,7 @@ Flickable{
},
State {
name: "leftBottom"
when: flickableContainer.alignment === Latte.Types.LeftEdgeBottomAlign
when: flickableContainer.alignment === LatteCore.Types.LeftEdgeBottomAlign
AnchorChanges {
target: flickableContainer
@ -272,7 +272,7 @@ Flickable{
///Right Edge
State {
name: "rightCenter"
when: flickableContainer.alignment === Latte.Types.RightEdgeCenterAlign
when: flickableContainer.alignment === LatteCore.Types.RightEdgeCenterAlign
AnchorChanges {
target: flickableContainer
@ -286,7 +286,7 @@ Flickable{
},
State {
name: "rightTop"
when: flickableContainer.alignment === Latte.Types.RightEdgeTopAlign
when: flickableContainer.alignment === LatteCore.Types.RightEdgeTopAlign
AnchorChanges {
target: flickableContainer
@ -300,7 +300,7 @@ Flickable{
},
State {
name: "rightBottom"
when: flickableContainer.alignment === Latte.Types.RightEdgeBottomAlign
when: flickableContainer.alignment === LatteCore.Types.RightEdgeBottomAlign
AnchorChanges {
target: flickableContainer
@ -315,7 +315,7 @@ Flickable{
///Bottom Edge
State {
name: "bottomCenter"
when: flickableContainer.alignment === Latte.Types.BottomEdgeCenterAlign
when: flickableContainer.alignment === LatteCore.Types.BottomEdgeCenterAlign
AnchorChanges {
target: flickableContainer
@ -329,7 +329,7 @@ Flickable{
},
State {
name: "bottomLeft"
when: flickableContainer.alignment === Latte.Types.BottomEdgeLeftAlign
when: flickableContainer.alignment === LatteCore.Types.BottomEdgeLeftAlign
AnchorChanges {
target: flickableContainer
@ -343,7 +343,7 @@ Flickable{
},
State {
name: "bottomRight"
when: flickableContainer.alignment === Latte.Types.BottomEdgeRightAlign
when: flickableContainer.alignment === LatteCore.Types.BottomEdgeRightAlign
AnchorChanges {
target: flickableContainer
@ -358,7 +358,7 @@ Flickable{
///Top Edge
State {
name: "topCenter"
when: flickableContainer.alignment === Latte.Types.TopEdgeCenterAlign
when: flickableContainer.alignment === LatteCore.Types.TopEdgeCenterAlign
AnchorChanges {
target: flickableContainer
@ -372,7 +372,7 @@ Flickable{
},
State {
name: "topLeft"
when: flickableContainer.alignment === Latte.Types.TopEdgeLeftAlign
when: flickableContainer.alignment === LatteCore.Types.TopEdgeLeftAlign
AnchorChanges {
target: flickableContainer
@ -386,7 +386,7 @@ Flickable{
},
State {
name: "topRight"
when: flickableContainer.alignment === Latte.Types.TopEdgeRightAlign
when: flickableContainer.alignment === LatteCore.Types.TopEdgeRightAlign
AnchorChanges {
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.latte 0.2 as Latte
import org.kde.latte.core 0.2 as LatteCore
import org.kde.latte.components 1.0 as LatteComponents
@ -44,9 +43,9 @@ import "../controls" as LatteExtraControls
FocusScope {
id: dialog
readonly property bool basicLevel: viewConfig.complexity === Latte.Types.BasicSettings
readonly property bool advancedLevel: viewConfig.complexity === Latte.Types.AdvancedSettings
readonly property bool expertLevel: viewConfig.complexity === Latte.Types.ExpertSettings
readonly property bool basicLevel: viewConfig.complexity === LatteCore.Types.BasicSettings
readonly property bool advancedLevel: viewConfig.complexity === LatteCore.Types.AdvancedSettings
readonly property bool expertLevel: viewConfig.complexity === LatteCore.Types.ExpertSettings
readonly property bool highLevel: advancedLevel || expertLevel
@ -93,7 +92,7 @@ FocusScope {
LayoutMirroring.enabled: Qt.application.layoutDirection === Qt.RightToLeft
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 int subGroupSpacing: units.largeSpacing + units.smallSpacing * 1.5
@ -389,13 +388,13 @@ FocusScope {
LatteComponents.Switch {
id: complexitySwitch
checked: (viewConfig.complexity === Latte.Types.ExpertSettings)
checked: (viewConfig.complexity === LatteCore.Types.ExpertSettings)
onCheckedChanged: {
if (checked) {
viewConfig.complexity = Latte.Types.ExpertSettings;
viewConfig.complexity = LatteCore.Types.ExpertSettings;
} else {
viewConfig.complexity = Latte.Types.BasicSettings;
viewConfig.complexity = LatteCore.Types.BasicSettings;
}
}
}
@ -666,7 +665,7 @@ FocusScope {
}
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;
}
}

@ -33,7 +33,6 @@ import org.kde.plasma.plasmoid 2.0
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 "../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.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
@ -174,7 +173,7 @@ PlasmaComponents.Page {
Layout.fillWidth: true
value: plasmoid.configuration.iconSize
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
wheelEnabled: false
@ -223,7 +222,7 @@ PlasmaComponents.Page {
Layout.fillWidth: true
value: plasmoid.configuration.proportionIconSize
from: 1.0
to: latteView.visibility.mode === Latte.Types.SideBar ? 25 : 12
to: latteView.visibility.mode === LatteCore.Types.SideBar ? 25 : 12
stepSize: 0.5
wheelEnabled: false
@ -366,13 +365,13 @@ PlasmaComponents.Page {
var newTotal = Math.abs(plasmoid.configuration.offset) + value;
//centered and justify alignments based on offset and get out of the screen in some cases
var centeredCheck = ((plasmoid.configuration.alignment === Latte.Types.Center)
|| (plasmoid.configuration.alignment === Latte.Types.Justify))
var centeredCheck = ((plasmoid.configuration.alignment === LatteCore.Types.Center)
|| (plasmoid.configuration.alignment === LatteCore.Types.Justify))
&& ((Math.abs(plasmoid.configuration.offset) + value/2) > 50);
if (newTotal > 100 || centeredCheck) {
if ((plasmoid.configuration.alignment === Latte.Types.Center)
|| (plasmoid.configuration.alignment === Latte.Types.Justify)) {
if ((plasmoid.configuration.alignment === LatteCore.Types.Center)
|| (plasmoid.configuration.alignment === LatteCore.Types.Justify)) {
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
spacing: units.smallSpacing
visible: dialog.expertLevel
enabled: (plasmoid.configuration.alignment !== Latte.Types.Justify)
enabled: (plasmoid.configuration.alignment !== LatteCore.Types.Justify)
PlasmaComponents.Label {
id: minLengthLbl
@ -498,10 +497,10 @@ PlasmaComponents.Page {
id: offsetSlider
value: plasmoid.configuration.offset
from: ((plasmoid.configuration.alignment === Latte.Types.Center)
|| (plasmoid.configuration.alignment === Latte.Types.Justify)) ? -20 : 0
to: ((plasmoid.configuration.alignment === Latte.Types.Center)
|| (plasmoid.configuration.alignment === Latte.Types.Justify)) ? 20 : 40
from: ((plasmoid.configuration.alignment === LatteCore.Types.Center)
|| (plasmoid.configuration.alignment === LatteCore.Types.Justify)) ? -20 : 0
to: ((plasmoid.configuration.alignment === LatteCore.Types.Center)
|| (plasmoid.configuration.alignment === LatteCore.Types.Justify)) ? 20 : 40
stepSize: 1
wheelEnabled: false
@ -511,12 +510,12 @@ PlasmaComponents.Page {
var newTotal = Math.abs(value) + plasmoid.configuration.maxLength;
//centered and justify alignments based on offset and get out of the screen in some cases
var centeredCheck = ((plasmoid.configuration.alignment === Latte.Types.Center)
|| (plasmoid.configuration.alignment === Latte.Types.Justify))
var centeredCheck = ((plasmoid.configuration.alignment === LatteCore.Types.Center)
|| (plasmoid.configuration.alignment === LatteCore.Types.Justify))
&& ((Math.abs(value) + plasmoid.configuration.maxLength/2) > 50);
if (newTotal > 100 || centeredCheck) {
plasmoid.configuration.maxLength = ((plasmoid.configuration.alignment === Latte.Types.Center)
|| (plasmoid.configuration.alignment === Latte.Types.Justify)) ?
plasmoid.configuration.maxLength = ((plasmoid.configuration.alignment === LatteCore.Types.Center)
|| (plasmoid.configuration.alignment === LatteCore.Types.Justify)) ?
2*(50 - Math.abs(value)) :100 - Math.abs(value);
}
}
@ -756,7 +755,7 @@ PlasmaComponents.Page {
exclusiveGroup: themeColorsGroup
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 {
@ -768,7 +767,7 @@ PlasmaComponents.Page {
exclusiveGroup: themeColorsGroup
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 {
@ -780,7 +779,7 @@ PlasmaComponents.Page {
exclusiveGroup: themeColorsGroup
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 {
@ -797,7 +796,7 @@ PlasmaComponents.Page {
exclusiveGroup: windowColorsGroup
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 {
@ -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.\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 {
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.\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 {
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.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 "../../controls" as LatteExtraControls
@ -296,7 +296,7 @@ PlasmaComponents.Page {
checkable: true
exclusiveGroup: alignmentGroup
property int alignment: panelIsVertical ? Latte.Types.Top : Latte.Types.Left
property int alignment: panelIsVertical ? LatteCore.Types.Top : LatteCore.Types.Left
}
PlasmaComponents.Button {
Layout.minimumWidth: parent.buttonSize
@ -307,7 +307,7 @@ PlasmaComponents.Page {
checkable: true
exclusiveGroup: alignmentGroup
property int alignment: Latte.Types.Center
property int alignment: LatteCore.Types.Center
}
PlasmaComponents.Button {
Layout.minimumWidth: parent.buttonSize
@ -318,7 +318,7 @@ PlasmaComponents.Page {
checkable: true
exclusiveGroup: alignmentGroup
property int alignment: panelIsVertical ? Latte.Types.Bottom : Latte.Types.Right
property int alignment: panelIsVertical ? LatteCore.Types.Bottom : LatteCore.Types.Right
}
PlasmaComponents.Button {
@ -330,7 +330,7 @@ PlasmaComponents.Page {
checkable: true
exclusiveGroup: alignmentGroup
property int alignment: Latte.Types.Justify
property int alignment: LatteCore.Types.Justify
}
}
}
@ -379,7 +379,7 @@ PlasmaComponents.Page {
checkable: true
exclusiveGroup: visibilityGroup
property int mode: Latte.Types.AlwaysVisible
property int mode: LatteCore.Types.AlwaysVisible
}
PlasmaComponents.Button {
Layout.minimumWidth: parent.buttonSize
@ -389,7 +389,7 @@ PlasmaComponents.Page {
checkable: true
exclusiveGroup: visibilityGroup
property int mode: Latte.Types.AutoHide
property int mode: LatteCore.Types.AutoHide
}
PlasmaComponents.Button {
Layout.minimumWidth: parent.buttonSize
@ -399,7 +399,7 @@ PlasmaComponents.Page {
checkable: true
exclusiveGroup: visibilityGroup
property int mode: Latte.Types.DodgeActive
property int mode: LatteCore.Types.DodgeActive
}
PlasmaComponents.Button {
Layout.minimumWidth: parent.buttonSize
@ -409,7 +409,7 @@ PlasmaComponents.Page {
checkable: true
exclusiveGroup: visibilityGroup
property int mode: Latte.Types.DodgeMaximized
property int mode: LatteCore.Types.DodgeMaximized
}
PlasmaComponents.Button {
id: dodgeAllWindowsBtn
@ -420,7 +420,7 @@ PlasmaComponents.Page {
checkable: true
exclusiveGroup: visibilityGroup
property int mode: Latte.Types.DodgeAllWindows
property int mode: LatteCore.Types.DodgeAllWindows
}
LatteExtraControls.CustomWindowsModeButton {
@ -443,10 +443,10 @@ PlasmaComponents.Page {
Layout.fillWidth: true
spacing: units.smallSpacing
enabled: !(latteView.visibility.mode === Latte.Types.AlwaysVisible
|| latteView.visibility.mode === Latte.Types.WindowsGoBelow
|| latteView.visibility.mode === Latte.Types.WindowsAlwaysCover
|| latteView.visibility.mode === Latte.Types.SideBar)
enabled: !(latteView.visibility.mode === LatteCore.Types.AlwaysVisible
|| latteView.visibility.mode === LatteCore.Types.WindowsGoBelow
|| latteView.visibility.mode === LatteCore.Types.WindowsAlwaysCover
|| latteView.visibility.mode === LatteCore.Types.SideBar)
LatteComponents.Header {
text: i18n("Delay")
@ -574,11 +574,11 @@ PlasmaComponents.Page {
onCurrentIndexChanged: {
switch(currentIndex) {
case Latte.Types.ActiveInCurrentScreen:
plasmoid.configuration.activeWindowFilter = Latte.Types.ActiveInCurrentScreen;
case LatteCore.Types.ActiveInCurrentScreen:
plasmoid.configuration.activeWindowFilter = LatteCore.Types.ActiveInCurrentScreen;
break;
case Latte.Types.ActiveFromAllScreens:
plasmoid.configuration.activeWindowFilter = Latte.Types.ActiveFromAllScreens;
case LatteCore.Types.ActiveFromAllScreens:
plasmoid.configuration.activeWindowFilter = LatteCore.Types.ActiveFromAllScreens;
break;
}
}
@ -659,20 +659,20 @@ PlasmaComponents.Page {
onCurrentIndexChanged: {
switch(currentIndex) {
case Latte.Types.ScrollNone:
plasmoid.configuration.scrollAction = Latte.Types.ScrollNone;
case LatteCore.Types.ScrollNone:
plasmoid.configuration.scrollAction = LatteCore.Types.ScrollNone;
break;
case Latte.Types.ScrollDesktops:
plasmoid.configuration.scrollAction = Latte.Types.ScrollDesktops;
case LatteCore.Types.ScrollDesktops:
plasmoid.configuration.scrollAction = LatteCore.Types.ScrollDesktops;
break;
case Latte.Types.ScrollActivities:
plasmoid.configuration.scrollAction = Latte.Types.ScrollActivities;
case LatteCore.Types.ScrollActivities:
plasmoid.configuration.scrollAction = LatteCore.Types.ScrollActivities;
break;
case Latte.Types.ScrollTasks:
plasmoid.configuration.scrollAction = Latte.Types.ScrollTasks;
case LatteCore.Types.ScrollTasks:
plasmoid.configuration.scrollAction = LatteCore.Types.ScrollTasks;
break;
case Latte.Types.ScrollToggleMinimized:
plasmoid.configuration.scrollAction = Latte.Types.ScrollToggleMinimized;
case LatteCore.Types.ScrollToggleMinimized:
plasmoid.configuration.scrollAction = LatteCore.Types.ScrollToggleMinimized;
break;
}
}
@ -773,10 +773,10 @@ PlasmaComponents.Page {
spacing: units.smallSpacing
visible: dialog.expertLevel
enabled: !(latteView.visibility.mode === Latte.Types.AlwaysVisible
|| latteView.visibility.mode === Latte.Types.WindowsGoBelow
|| latteView.visibility.mode === Latte.Types.WindowsCanCover
|| latteView.visibility.mode === Latte.Types.WindowsAlwaysCover)
enabled: !(latteView.visibility.mode === LatteCore.Types.AlwaysVisible
|| latteView.visibility.mode === LatteCore.Types.WindowsGoBelow
|| latteView.visibility.mode === LatteCore.Types.WindowsCanCover
|| latteView.visibility.mode === LatteCore.Types.WindowsAlwaysCover)
LatteComponents.Header {
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")
enabled: !dialog.viewIsPanel
&& !latteView.byPassWM
&& latteView.visibility.mode !== Latte.Types.SideBar
&& latteView.visibility.mode !== LatteCore.Types.SideBar
onClicked: {
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.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 "../../controls" as LatteExtraControls
@ -58,15 +58,15 @@ PlasmaComponents.Page {
Layout.minimumHeight: implicitHeight
Layout.topMargin: units.smallSpacing
checked: plasmoid.configuration.shadows !== Latte.Types.NoneShadow
checked: plasmoid.configuration.shadows !== LatteCore.Types.NoneShadow
text: i18n("Shadows")
tooltip: i18n("Enable/disable applet shadows")
onPressed: {
if(plasmoid.configuration.shadows !== Latte.Types.AllAppletsShadow){
plasmoid.configuration.shadows = Latte.Types.AllAppletsShadow;
if(plasmoid.configuration.shadows !== LatteCore.Types.AllAppletsShadow){
plasmoid.configuration.shadows = LatteCore.Types.AllAppletsShadow;
} else {
plasmoid.configuration.shadows = Latte.Types.NoneShadow;
plasmoid.configuration.shadows = LatteCore.Types.NoneShadow;
}
}
}
@ -199,11 +199,11 @@ PlasmaComponents.Page {
}
if (current === defaultShadowBtn) {
plasmoid.configuration.shadowColorType = Latte.Types.DefaultColorShadow;
plasmoid.configuration.shadowColorType = LatteCore.Types.DefaultColorShadow;
} else if (current === themeShadowBtn) {
plasmoid.configuration.shadowColorType = Latte.Types.ThemeColorShadow;
plasmoid.configuration.shadowColorType = LatteCore.Types.ThemeColorShadow;
} 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
text: i18nc("default shadow", "Default")
checked: plasmoid.configuration.shadowColorType === Latte.Types.DefaultColorShadow
checked: plasmoid.configuration.shadowColorType === LatteCore.Types.DefaultColorShadow
checkable: true
exclusiveGroup: shadowColorGroup
tooltip: i18n("Default shadow for applets")
@ -226,7 +226,7 @@ PlasmaComponents.Page {
Layout.fillWidth: true
text: i18nc("theme shadow", "Theme")
checked: plasmoid.configuration.shadowColorType === Latte.Types.ThemeColorShadow
checked: plasmoid.configuration.shadowColorType === LatteCore.Types.ThemeColorShadow
checkable: true
exclusiveGroup: shadowColorGroup
tooltip: i18n("Shadow from theme color palette")
@ -240,7 +240,7 @@ PlasmaComponents.Page {
text: " "
checkable: true
checked: plasmoid.configuration.shadowColorType === Latte.Types.UserColorShadow
checked: plasmoid.configuration.shadowColorType === LatteCore.Types.UserColorShadow
tooltip: i18n("Use set shadow color")
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.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.private.tasks 0.1 as LatteTasks
PlasmaComponents.Page {
Layout.maximumWidth: content.width + content.Layout.leftMargin * 2
Layout.maximumHeight: content.height + units.smallSpacing * 2
@ -361,7 +362,7 @@ PlasmaComponents.Page {
exclusiveGroup: launchersGroup
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 {
@ -376,7 +377,7 @@ PlasmaComponents.Page {
//! it is shown only when the user has activated that option manually from the text layout file
visible: tasks.configuration.launchersGroup === group
readonly property int group: Latte.Tasks.LayoutLaunchers
readonly property int group: LatteCore.Types.LayoutLaunchers
}
PlasmaComponents.Button {
@ -388,7 +389,7 @@ PlasmaComponents.Page {
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>")
readonly property int group: Latte.Tasks.GlobalLaunchers
readonly property int group: LatteCore.Types.GlobalLaunchers
}
}
}
@ -513,11 +514,11 @@ PlasmaComponents.Page {
currentIndex: {
switch(tasks.configuration.leftClickAction) {
case Latte.Tasks.PresentWindows:
case LatteTasks.Types.PresentWindows:
return 0;
case Latte.Tasks.CycleThroughTasks:
case LatteTasks.Types.CycleThroughTasks:
return 1;
case Latte.Tasks.PreviewWindows:
case LatteTasks.Types.PreviewWindows:
return 2;
}
@ -527,13 +528,13 @@ PlasmaComponents.Page {
onCurrentIndexChanged: {
switch(currentIndex) {
case 0:
tasks.configuration.leftClickAction = Latte.Tasks.PresentWindows;
tasks.configuration.leftClickAction = LatteTasks.Types.PresentWindows;
break;
case 1:
tasks.configuration.leftClickAction = Latte.Tasks.CycleThroughTasks;
tasks.configuration.leftClickAction = LatteTasks.Types.CycleThroughTasks;
break;
case 2:
tasks.configuration.leftClickAction = Latte.Tasks.PreviewWindows;
tasks.configuration.leftClickAction = LatteTasks.Types.PreviewWindows;
break;
}
}
@ -576,13 +577,13 @@ PlasmaComponents.Page {
currentIndex: {
switch(tasks.configuration.hoverAction) {
case Latte.Tasks.NoneAction:
case LatteTasks.Types.NoneAction:
return 0;
case Latte.Tasks.PreviewWindows:
case LatteTasks.Types.PreviewWindows:
return 1;
case Latte.Tasks.HighlightWindows:
case LatteTasks.Types.HighlightWindows:
return 2;
case Latte.Tasks.PreviewAndHighlightWindows:
case LatteTasks.Types.PreviewAndHighlightWindows:
return 3;
}
@ -592,16 +593,16 @@ PlasmaComponents.Page {
onCurrentIndexChanged: {
switch(currentIndex) {
case 0:
tasks.configuration.hoverAction = Latte.Tasks.NoneAction;
tasks.configuration.hoverAction = LatteTasks.Types.NoneAction;
break;
case 1:
tasks.configuration.hoverAction = Latte.Tasks.PreviewWindows;
tasks.configuration.hoverAction = LatteTasks.Types.PreviewWindows;
break;
case 2:
tasks.configuration.hoverAction = Latte.Tasks.HighlightWindows;
tasks.configuration.hoverAction = LatteTasks.Types.HighlightWindows;
break;
case 3:
tasks.configuration.hoverAction = Latte.Tasks.PreviewAndHighlightWindows;
tasks.configuration.hoverAction = LatteTasks.Types.PreviewAndHighlightWindows;
break;
}
}

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

Loading…
Cancel
Save