mirror of
https://github.com/KDE/latte-dock.git
synced 2025-02-05 05:47:26 +03:00
update semantics
--dropped more old nowDock variables --fixed brokken drag visual
This commit is contained in:
parent
673a5f4d2d
commit
169b2b0345
@ -79,7 +79,7 @@ Item {
|
||||
property string title: isInternalViewSplitter ? "Now Dock Splitter" : ""
|
||||
|
||||
property Item applet
|
||||
property Item nowDock: applet && (applet.pluginName === root.plasmoidName) ?
|
||||
property Item latteApplet: applet && (applet.pluginName === root.plasmoidName) ?
|
||||
(applet.children[0] ? applet.children[0] : null) : null
|
||||
property Item appletWrapper: applet &&
|
||||
((applet.pluginName === root.plasmoidName) ||
|
||||
@ -95,7 +95,7 @@ Item {
|
||||
}*/
|
||||
|
||||
onIndexChanged: {
|
||||
if (container.nowDock) {
|
||||
if (container.latteApplet) {
|
||||
root.latteAppletPos = index;
|
||||
}
|
||||
}
|
||||
@ -128,25 +128,25 @@ Item {
|
||||
}
|
||||
|
||||
|
||||
if(container.nowDock){
|
||||
if(container.latteApplet){
|
||||
if(index===startLayout.beginIndex || index===mainLayout.beginIndex || index===endLayout.beginIndex)
|
||||
nowDock.disableLeftSpacer = false;
|
||||
latteApplet.disableLeftSpacer = false;
|
||||
else
|
||||
nowDock.disableLeftSpacer = true;
|
||||
latteApplet.disableLeftSpacer = true;
|
||||
|
||||
if( index === startLayout.beginIndex + startLayout.count - 1
|
||||
|| index===mainLayout.beginIndex + mainLayout.count - 1
|
||||
|| index === endLayout.beginIndex + endLayout.count - 1)
|
||||
nowDock.disableRightSpacer = false;
|
||||
latteApplet.disableRightSpacer = false;
|
||||
else
|
||||
nowDock.disableRightSpacer = true;
|
||||
latteApplet.disableRightSpacer = true;
|
||||
}
|
||||
}
|
||||
|
||||
//this functions gets the signal from the plasmoid, it can be used for signal items
|
||||
//outside the NowDock Plasmoid
|
||||
//outside the LatteApplet Plasmoid
|
||||
//property int debCounter: 0;
|
||||
function interceptNowDockUpdateScale(dIndex, newScale, step){
|
||||
function interceptLatteAppletUpdateScale(dIndex, newScale, step){
|
||||
if(!root.editMode){
|
||||
if(dIndex === -1){
|
||||
layoutsContainer.updateScale(index-1,newScale, step);
|
||||
@ -189,14 +189,14 @@ Item {
|
||||
wrapper.zoomScale = 1;
|
||||
}
|
||||
|
||||
onNowDockChanged: {
|
||||
if(container.nowDock){
|
||||
root.nowDock = container.nowDock;
|
||||
root.nowDockContainer = container;
|
||||
onLatteAppletChanged: {
|
||||
if(container.latteApplet){
|
||||
root.latteApplet = container.latteApplet;
|
||||
root.latteAppletContainer = container;
|
||||
root.latteAppletPos = index;
|
||||
nowDock.nowDockPanel = root;
|
||||
nowDock.forceHidePanel = true;
|
||||
nowDock.updateScale.connect(interceptNowDockUpdateScale);
|
||||
latteApplet.latteDock = root;
|
||||
latteApplet.forceHidePanel = true;
|
||||
latteApplet.updateScale.connect(interceptLatteAppletUpdateScale);
|
||||
}
|
||||
}
|
||||
|
||||
@ -246,13 +246,13 @@ Item {
|
||||
width: container.computeWidth
|
||||
height: container.computeHeight
|
||||
|
||||
anchors.rightMargin: (nowDock || (showZoomed && root.editMode)) ||
|
||||
anchors.rightMargin: (latteApplet || (showZoomed && root.editMode)) ||
|
||||
(plasmoid.location !== PlasmaCore.Types.RightEdge) ? 0 : shownAppletMargin
|
||||
anchors.leftMargin: (nowDock || (showZoomed && root.editMode)) ||
|
||||
anchors.leftMargin: (latteApplet || (showZoomed && root.editMode)) ||
|
||||
(plasmoid.location !== PlasmaCore.Types.LeftEdge) ? 0 : shownAppletMargin
|
||||
anchors.topMargin: (nowDock || (showZoomed && root.editMode)) ||
|
||||
anchors.topMargin: (latteApplet || (showZoomed && root.editMode)) ||
|
||||
(plasmoid.location !== PlasmaCore.Types.TopEdge)? 0 : shownAppletMargin
|
||||
anchors.bottomMargin: (nowDock || (showZoomed && root.editMode)) ||
|
||||
anchors.bottomMargin: (latteApplet || (showZoomed && root.editMode)) ||
|
||||
(plasmoid.location !== PlasmaCore.Types.BottomEdge) ? 0 : shownAppletMargin
|
||||
|
||||
|
||||
@ -293,10 +293,10 @@ Item {
|
||||
Item{
|
||||
id: wrapper
|
||||
|
||||
width: container.isInternalViewSplitter && !root.editMode ? 0 : Math.round( nowDock ? ((container.showZoomed && root.isVertical) ?
|
||||
scaledWidth : nowDock.tasksWidth) : scaledWidth )
|
||||
height: container.isInternalViewSplitter&& !root.editMode ? 0 : Math.round( nowDock ? ((container.showZoomed && root.isHorizontal) ?
|
||||
scaledHeight : nowDock.tasksHeight ): scaledHeight )
|
||||
width: container.isInternalViewSplitter && !root.editMode ? 0 : Math.round( latteApplet ? ((container.showZoomed && root.isVertical) ?
|
||||
scaledWidth : latteApplet.tasksWidth) : scaledWidth )
|
||||
height: container.isInternalViewSplitter&& !root.editMode ? 0 : Math.round( latteApplet ? ((container.showZoomed && root.isHorizontal) ?
|
||||
scaledHeight : latteApplet.tasksHeight ): scaledHeight )
|
||||
|
||||
property bool disableScaleWidth: false
|
||||
property bool disableScaleHeight: false
|
||||
@ -680,11 +680,11 @@ Item {
|
||||
// currentLayout.updateScale(index-2, 1, 0);
|
||||
// currentLayout.updateScale(index+2, 1, 0);
|
||||
|
||||
if (root.nowDock) {
|
||||
if (root.latteApplet) {
|
||||
if ((index-1) > root.latteAppletPos ){
|
||||
root.nowDock.clearZoom();
|
||||
root.latteApplet.clearZoom();
|
||||
} else if((index+1)<root.latteAppletPos) {
|
||||
root.nowDock.clearZoom();
|
||||
root.latteApplet.clearZoom();
|
||||
}
|
||||
}
|
||||
|
||||
@ -706,11 +706,11 @@ Item {
|
||||
|
||||
function signalUpdateScale(nIndex, nScale, step){
|
||||
if(container && (container.index === nIndex)){
|
||||
if ( ((canBeHovered && !lockZoom ) || container.nowDock)
|
||||
if ( ((canBeHovered && !lockZoom ) || container.latteApplet)
|
||||
&& (applet && applet.status !== PlasmaCore.Types.HiddenStatus)
|
||||
//&& (index != currentLayout.hoveredIndex)
|
||||
){
|
||||
if(!container.nowDock){
|
||||
if(!container.latteApplet){
|
||||
if(nScale >= 0)
|
||||
zoomScale = nScale + step;
|
||||
else
|
||||
@ -718,11 +718,11 @@ Item {
|
||||
}
|
||||
else{
|
||||
if(layoutsContainer.hoveredIndex<container.index){
|
||||
nowDock.updateScale(0, nScale, step);
|
||||
nowDock.updateScale(1, 1, 0);
|
||||
latteApplet.updateScale(0, nScale, step);
|
||||
latteApplet.updateScale(1, 1, 0);
|
||||
} else if(layoutsContainer.hoveredIndex>container.index) {
|
||||
nowDock.updateScale(root.tasksCount-1, nScale, step);
|
||||
nowDock.updateScale(root.tasksCount-2, 1, 0);
|
||||
latteApplet.updateScale(root.tasksCount-1, nScale, step);
|
||||
latteApplet.updateScale(root.tasksCount-2, 1, 0);
|
||||
}
|
||||
}
|
||||
} ///if the applet is hidden must forward its scale events to its neighbours
|
||||
@ -779,8 +779,8 @@ Item {
|
||||
id: appletMouseArea
|
||||
|
||||
anchors.fill: parent
|
||||
enabled: (!nowDock)&&(canBeHovered)&&(!lockZoom)&&(!root.editMode)
|
||||
hoverEnabled: !root.editMode && (!nowDock) && canBeHovered ? true : false
|
||||
enabled: (!latteApplet)&&(canBeHovered)&&(!lockZoom)&&(!root.editMode)
|
||||
hoverEnabled: !root.editMode && (!latteApplet) && canBeHovered ? true : false
|
||||
propagateComposedEvents: true
|
||||
|
||||
property bool pressed: false
|
||||
|
@ -52,7 +52,7 @@ Item{
|
||||
//it is used in order to not break the calculations for the thickness placement
|
||||
//especially in automatic icon sizes calculations
|
||||
property real iconMarginOriginal: 0.12*plasmoid.configuration.iconSize
|
||||
property int statesLineSizeOriginal: root.nowDock ? Math.ceil( plasmoid.configuration.iconSize/13 ) : 0
|
||||
property int statesLineSizeOriginal: root.latteApplet ? Math.ceil( plasmoid.configuration.iconSize/13 ) : 0
|
||||
|
||||
property int thicknessAutoHidden: 2
|
||||
property int thicknessMid: root.statesLineSize + (1 + (0.65 * (root.zoomFactor-1)))*(root.iconSize+root.iconMargin) //needed in some animations
|
||||
@ -444,8 +444,8 @@ Item{
|
||||
interval: 400
|
||||
onTriggered: {
|
||||
root.clearZoom();
|
||||
if (root.nowDock) {
|
||||
nowDock.clearZoom();
|
||||
if (root.latteApplet) {
|
||||
latteApplet.clearZoom();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ DragDrop.DropArea {
|
||||
property bool inStartup: true
|
||||
property bool isHorizontal: plasmoid.formFactor === PlasmaCore.Types.Horizontal
|
||||
property bool isVertical: !isHorizontal
|
||||
property bool isHovered: nowDock ? ((nowDockHoveredIndex !== -1) && (layoutsContainer.hoveredIndex !== -1)) //|| wholeArea.containsMouse
|
||||
property bool isHovered: latteApplet ? ((latteAppletHoveredIndex !== -1) && (layoutsContainer.hoveredIndex !== -1)) //|| wholeArea.containsMouse
|
||||
: (layoutsContainer.hoveredIndex !== -1) //|| wholeArea.containsMouse
|
||||
property bool normalState : false
|
||||
property bool onlyAddingStarup: true //is used for the initialization phase in startup where there arent removals, this variable provides a way to grow icon size
|
||||
@ -92,7 +92,7 @@ DragDrop.DropArea {
|
||||
property int themePanelSize: plasmoid.configuration.panelSize
|
||||
|
||||
property int iconMargin: Math.ceil(0.12 * iconSize)
|
||||
property int statesLineSize: nowDock ? Math.ceil( root.iconSize/13 ) : 0
|
||||
property int statesLineSize: latteApplet ? Math.ceil( root.iconSize/13 ) : 0
|
||||
|
||||
|
||||
///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...
|
||||
@ -112,8 +112,8 @@ DragDrop.DropArea {
|
||||
|
||||
property Item dragOverlay
|
||||
property Item toolBox
|
||||
property Item nowDockContainer
|
||||
property Item nowDock
|
||||
property Item latteAppletContainer
|
||||
property Item latteApplet
|
||||
property QtObject dock
|
||||
|
||||
// TO BE DELETED, if not needed: property int counter:0;
|
||||
@ -123,7 +123,7 @@ DragDrop.DropArea {
|
||||
property bool dockIsHidden: dock ? dock.visibility.isHidden : false
|
||||
property bool dotsOnActive: plasmoid.configuration.dotsOnActive
|
||||
property bool highlightWindows: plasmoid.configuration.highlightWindows
|
||||
property bool reverseLinesPosition: plasmoid.configuration.reverseLinesPosition// nowDock ? nowDock.reverseLinesPosition : false
|
||||
property bool reverseLinesPosition: plasmoid.configuration.reverseLinesPosition// latteApplet ? latteApplet.reverseLinesPosition : false
|
||||
property bool showGlow: plasmoid.configuration.showGlow
|
||||
property bool showToolTips: plasmoid.configuration.showToolTips
|
||||
property bool showWindowActions: plasmoid.configuration.showWindowActions
|
||||
@ -135,9 +135,9 @@ DragDrop.DropArea {
|
||||
property bool threeColorsWindows: plasmoid.configuration.threeColorsWindows
|
||||
|
||||
property int durationTime: plasmoid.configuration.durationTime
|
||||
property int nowDockHoveredIndex: nowDock ? nowDock.hoveredIndex : -1
|
||||
property int tasksCount: nowDock ? nowDock.tasksCount : 0
|
||||
///END properties from nowDock
|
||||
property int latteAppletHoveredIndex: latteApplet ? latteApplet.hoveredIndex : -1
|
||||
property int tasksCount: latteApplet ? latteApplet.tasksCount : 0
|
||||
///END properties from latteApplet
|
||||
|
||||
/* Layout.preferredWidth: plasmoid.immutable ?
|
||||
(plasmoid.configuration.panelPosition === Latte.Dock.Justify ?
|
||||
@ -453,12 +453,12 @@ DragDrop.DropArea {
|
||||
dndSpacer.parent = root;
|
||||
}
|
||||
|
||||
onNowDockChanged: {
|
||||
if (nowDock) {
|
||||
nowDock.signalAnimationsNeedBothAxis.connect(slotAnimationsNeedBothAxis);
|
||||
nowDock.signalAnimationsNeedLength.connect(slotAnimationsNeedLength);
|
||||
nowDock.signalAnimationsNeedThickness.connect(slotAnimationsNeedThickness);
|
||||
nowDock.signalDraggingState.connect(slotDisableHiding);
|
||||
onLatteAppletChanged: {
|
||||
if (latteApplet) {
|
||||
latteApplet.signalAnimationsNeedBothAxis.connect(slotAnimationsNeedBothAxis);
|
||||
latteApplet.signalAnimationsNeedLength.connect(slotAnimationsNeedLength);
|
||||
latteApplet.signalAnimationsNeedThickness.connect(slotAnimationsNeedThickness);
|
||||
latteApplet.signalDraggingState.connect(slotDisableHiding);
|
||||
}
|
||||
}
|
||||
|
||||
@ -750,13 +750,13 @@ DragDrop.DropArea {
|
||||
if(result)
|
||||
return true;
|
||||
|
||||
if(!result && nowDock && nowDock.outsideContainsMouse()){
|
||||
layoutsContainer.hoveredIndex = nowDockContainer.index;
|
||||
if(!result && latteApplet && latteApplet.outsideContainsMouse()){
|
||||
layoutsContainer.hoveredIndex = latteAppletContainer.index;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (nowDock){
|
||||
nowDock.clearZoom();
|
||||
if (latteApplet){
|
||||
latteApplet.clearZoom();
|
||||
}
|
||||
|
||||
return false;
|
||||
@ -863,8 +863,8 @@ DragDrop.DropArea {
|
||||
|
||||
//when need length animations are ended it would be a good idea
|
||||
//to update the tasks geometries in the plasmoid
|
||||
if(animationsNeedLength === 0 && nowDock) {
|
||||
nowDock.publishTasksGeometries();
|
||||
if(animationsNeedLength === 0 && latteApplet) {
|
||||
latteApplet.publishTasksGeometries();
|
||||
}
|
||||
|
||||
visibilityManager.updateMaskArea();
|
||||
@ -1124,7 +1124,7 @@ DragDrop.DropArea {
|
||||
|
||||
signal updateScale(int delegateIndex, real newScale, real step)
|
||||
|
||||
property int allCount: root.nowDock ? mainLayout.count-1+nowDock.tasksCount : mainLayout.count
|
||||
property int allCount: root.latteApplet ? mainLayout.count-1+latteApplet.tasksCount : mainLayout.count
|
||||
property int currentSpot: -1000
|
||||
property int hoveredIndex: -1
|
||||
|
||||
|
@ -84,11 +84,11 @@
|
||||
</entry>
|
||||
<entry name="transparentPanel" type="Bool">
|
||||
<default>false</default>
|
||||
</entry>
|
||||
</entry>
|
||||
<entry name="highlightWindows" type="Bool">
|
||||
<default>false</default>
|
||||
</entry>
|
||||
<entry name="isInNowDockPanel" type="Bool">
|
||||
<entry name="isInLatteDock" type="Bool">
|
||||
<default>false</default>
|
||||
</entry>
|
||||
<entry name="showToolTips" type="Bool">
|
||||
|
@ -44,9 +44,9 @@ Item {
|
||||
property alias cfg_durationTime : durationTime.value
|
||||
property alias cfg_reverseLinesPosition : reverseLinesPosition.checked
|
||||
|
||||
property alias cfg_isInNowDockPanel: mainItem.isInNowDockPanel
|
||||
property alias cfg_isInLatteDock: mainItem.isInLatteDock
|
||||
|
||||
property bool isInNowDockPanel
|
||||
property bool isInLatteDock
|
||||
|
||||
ColumnLayout {
|
||||
id:mainColumn
|
||||
@ -73,7 +73,7 @@ Item {
|
||||
ComboBox {
|
||||
// 16, 22, 32, 48, 64,128, 256
|
||||
id: iconSizeCmb
|
||||
enabled: !mainItem.isInNowDockPanel
|
||||
enabled: !mainItem.isInLatteDock
|
||||
|
||||
property int realValue
|
||||
property bool startup: true
|
||||
@ -230,7 +230,7 @@ Item {
|
||||
Label{Layout.columnSpan: 3}
|
||||
|
||||
Item{
|
||||
enabled: !mainItem.isInNowDockPanel
|
||||
enabled: !mainItem.isInLatteDock
|
||||
Layout.columnSpan: 3
|
||||
Layout.fillWidth: true
|
||||
Label {
|
||||
@ -244,7 +244,7 @@ Item {
|
||||
//////
|
||||
|
||||
Label {
|
||||
enabled: !mainItem.isInNowDockPanel
|
||||
enabled: !mainItem.isInLatteDock
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
|
||||
@ -253,7 +253,7 @@ Item {
|
||||
|
||||
Slider {
|
||||
id: zoomLevel
|
||||
enabled: !mainItem.isInNowDockPanel
|
||||
enabled: !mainItem.isInLatteDock
|
||||
Layout.fillWidth: true
|
||||
minimumValue: 0
|
||||
maximumValue: 20
|
||||
@ -263,7 +263,7 @@ Item {
|
||||
|
||||
Label {
|
||||
id:zoomLevelText
|
||||
enabled: !mainItem.isInNowDockPanel
|
||||
enabled: !mainItem.isInLatteDock
|
||||
Layout.minimumWidth: metricsLabel2.width
|
||||
Layout.maximumWidth: metricsLabel2.width
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
@ -291,7 +291,7 @@ Item {
|
||||
|
||||
CheckBox {
|
||||
id: zoomHelper
|
||||
enabled: !mainItem.isInNowDockPanel
|
||||
enabled: !mainItem.isInLatteDock
|
||||
text: i18n("Show a red line on the limit needed for animations")
|
||||
|
||||
Layout.columnSpan: 3
|
||||
@ -301,21 +301,21 @@ Item {
|
||||
|
||||
DropShadow {
|
||||
id:shadowText
|
||||
anchors.fill: inNowDockLabel
|
||||
enabled: isInNowDockPanel
|
||||
anchors.fill: inLatteDockLabel
|
||||
enabled: isInLatteDock
|
||||
radius: 3
|
||||
samples: 5
|
||||
color: "#cc080808"
|
||||
source: inNowDockLabel
|
||||
source: inLatteDockLabel
|
||||
|
||||
verticalOffset: 2
|
||||
horizontalOffset: -1
|
||||
visible: isInNowDockPanel
|
||||
visible: isInLatteDock
|
||||
}
|
||||
|
||||
|
||||
Label {
|
||||
id:inNowDockLabel
|
||||
id:inLatteDockLabel
|
||||
anchors.horizontalCenter: mainItem.horizontalCenter
|
||||
anchors.bottom: mainColumn.bottom
|
||||
anchors.bottomMargin: mainColumn.height / 12
|
||||
@ -323,7 +323,7 @@ Item {
|
||||
|
||||
width: 0.85 * mainItem.width
|
||||
text: i18n("For the disabled settings you should use the Latte Dock Configuration Window")
|
||||
visible: mainItem.isInNowDockPanel
|
||||
visible: mainItem.isInLatteDock
|
||||
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
// font.bold: true
|
||||
|
@ -596,7 +596,7 @@ PlasmaComponents.ContextMenu {
|
||||
PlasmaComponents.MenuItem {
|
||||
property QtObject configureAction: null
|
||||
|
||||
visible: !nowDockPanel
|
||||
visible: !latteDock
|
||||
enabled: configureAction && configureAction.enabled
|
||||
|
||||
text: configureAction ? configureAction.text : ""
|
||||
@ -631,7 +631,7 @@ PlasmaComponents.ContextMenu {
|
||||
PlasmaComponents.MenuItem {
|
||||
id: containmentMenuItem
|
||||
|
||||
visible: nowDockPanel
|
||||
visible: latteDock
|
||||
enabled: visible
|
||||
|
||||
icon: "latte-dock"
|
||||
@ -645,7 +645,7 @@ PlasmaComponents.ContextMenu {
|
||||
function refresh() {
|
||||
clearMenuItems();
|
||||
|
||||
var actionList = nowDockPanel.containmentActions();
|
||||
var actionList = latteDock.containmentActions();
|
||||
|
||||
var visibleActions=0;
|
||||
|
||||
|
@ -235,6 +235,7 @@ Item{
|
||||
|
||||
//////
|
||||
Loader{
|
||||
id: progressLoader
|
||||
anchors.fill: parent
|
||||
active: (centralItem.smartLauncherEnabled && centralItem.smartLauncherItem
|
||||
&& centralItem.smartLauncherItem.progressVisible)
|
||||
@ -384,7 +385,7 @@ Item{
|
||||
|
||||
Colorize{
|
||||
id: stateColorizer
|
||||
source: iconGraphic
|
||||
source: progressLoader.active ? progressLoader : iconImageBuffer
|
||||
anchors.fill: iconGraphic
|
||||
//visible: false
|
||||
opacity:0
|
||||
|
@ -45,10 +45,10 @@ Item {
|
||||
///IMPORTANT: These values must be tested when the Now Dock Panel support
|
||||
///also the four new anchors. A small issue is shown between the animation
|
||||
/// of the now dock plasmoid and the neighbour widgets...
|
||||
Layout.minimumWidth: (userPanelPosition !== 0)&&(!nowDockPanel) ? clearWidth : -1
|
||||
Layout.minimumHeight: (userPanelPosition !== 0)&&(!nowDockPanel) ? clearHeight : -1
|
||||
Layout.preferredWidth: (userPanelPosition !== 0)&&(!nowDockPanel) ? tasksWidth : -1
|
||||
Layout.preferredHeight: (userPanelPosition !== 0)&&(!nowDockPanel) ? tasksHeight : -1
|
||||
Layout.minimumWidth: (userPanelPosition !== 0)&&(!latteDock) ? clearWidth : -1
|
||||
Layout.minimumHeight: (userPanelPosition !== 0)&&(!latteDock) ? clearHeight : -1
|
||||
Layout.preferredWidth: (userPanelPosition !== 0)&&(!latteDock) ? tasksWidth : -1
|
||||
Layout.preferredHeight: (userPanelPosition !== 0)&&(!latteDock) ? tasksHeight : -1
|
||||
|
||||
property bool debugLocation: false
|
||||
|
||||
@ -88,37 +88,37 @@ Item {
|
||||
property color minimizedDotColor: textColorLuma > 0.5 ? Qt.darker(theme.textColor, 1+ (1-textColorLuma)) : Qt.lighter(theme.textColor, 1+(1-textColorLuma))
|
||||
|
||||
//BEGIN Now Dock Panel properties
|
||||
property bool enableShadows: nowDockPanel ? nowDockPanel.enableShadows > 0 : plasmoid.configuration.showShadows
|
||||
property bool enableShadows: latteDock ? latteDock.enableShadows > 0 : plasmoid.configuration.showShadows
|
||||
property bool forceHidePanel: false
|
||||
property bool disableLeftSpacer: false
|
||||
property bool disableRightSpacer: false
|
||||
property bool dockIsHidden: nowDockPanel ? nowDockPanel.dockIsHidden : false
|
||||
property bool highlightWindows: nowDockPanel ? nowDockPanel.highlightWindows: plasmoid.configuration.highlightWindows
|
||||
property bool reverseLinesPosition: nowDockPanel ? nowDockPanel.reverseLinesPosition : plasmoid.configuration.reverseLinesPosition
|
||||
property bool dotsOnActive: nowDockPanel ? nowDockPanel.dotsOnActive : plasmoid.configuration.dotsOnActive
|
||||
property bool showGlow: nowDockPanel ? nowDockPanel.showGlow : plasmoid.configuration.showGlow
|
||||
property bool showOnlyCurrentScreen: nowDockPanel ? nowDockPanel.showOnlyCurrentScreen : plasmoid.configuration.showOnlyCurrentScreen
|
||||
property bool showOnlyCurrentDesktop: nowDockPanel ? nowDockPanel.showOnlyCurrentDesktop : plasmoid.configuration.showOnlyCurrentDesktop
|
||||
property bool showOnlyCurrentActivity: nowDockPanel ? nowDockPanel.showOnlyCurrentActivity : plasmoid.configuration.showOnlyCurrentActivity
|
||||
property bool showPreviews: nowDockPanel ? nowDockPanel.showToolTips : plasmoid.configuration.showToolTips
|
||||
property bool showWindowActions: nowDockPanel ? nowDockPanel.showWindowActions : plasmoid.configuration.showWindowActions
|
||||
property bool smartLaunchersEnabled: nowDockPanel ? nowDockPanel.smartLaunchersEnabled : plasmoid.configuration.smartLaunchersEnabled
|
||||
property bool threeColorsWindows: nowDockPanel ? nowDockPanel.threeColorsWindows : plasmoid.configuration.threeColorsWindows
|
||||
property bool dockIsHidden: latteDock ? latteDock.dockIsHidden : false
|
||||
property bool highlightWindows: latteDock ? latteDock.highlightWindows: plasmoid.configuration.highlightWindows
|
||||
property bool reverseLinesPosition: latteDock ? latteDock.reverseLinesPosition : plasmoid.configuration.reverseLinesPosition
|
||||
property bool dotsOnActive: latteDock ? latteDock.dotsOnActive : plasmoid.configuration.dotsOnActive
|
||||
property bool showGlow: latteDock ? latteDock.showGlow : plasmoid.configuration.showGlow
|
||||
property bool showOnlyCurrentScreen: latteDock ? latteDock.showOnlyCurrentScreen : plasmoid.configuration.showOnlyCurrentScreen
|
||||
property bool showOnlyCurrentDesktop: latteDock ? latteDock.showOnlyCurrentDesktop : plasmoid.configuration.showOnlyCurrentDesktop
|
||||
property bool showOnlyCurrentActivity: latteDock ? latteDock.showOnlyCurrentActivity : plasmoid.configuration.showOnlyCurrentActivity
|
||||
property bool showPreviews: latteDock ? latteDock.showToolTips : plasmoid.configuration.showToolTips
|
||||
property bool showWindowActions: latteDock ? latteDock.showWindowActions : plasmoid.configuration.showWindowActions
|
||||
property bool smartLaunchersEnabled: latteDock ? latteDock.smartLaunchersEnabled : plasmoid.configuration.smartLaunchersEnabled
|
||||
property bool threeColorsWindows: latteDock ? latteDock.threeColorsWindows : plasmoid.configuration.threeColorsWindows
|
||||
|
||||
property int durationTime: nowDockPanel ? nowDockPanel.durationTime : plasmoid.configuration.durationTime
|
||||
property int iconMargin: nowDockPanel ? nowDockPanel.iconMargin : 0.12*iconSize
|
||||
property int iconSize: nowDockPanel ? nowDockPanel.iconSize : Math.max(plasmoid.configuration.iconSize, 16)
|
||||
property int statesLineSize: nowDockPanel ? nowDockPanel.statesLineSize : Math.ceil( root.iconSize/13 )
|
||||
property int durationTime: latteDock ? latteDock.durationTime : plasmoid.configuration.durationTime
|
||||
property int iconMargin: latteDock ? latteDock.iconMargin : 0.12*iconSize
|
||||
property int iconSize: latteDock ? latteDock.iconSize : Math.max(plasmoid.configuration.iconSize, 16)
|
||||
property int statesLineSize: latteDock ? latteDock.statesLineSize : Math.ceil( root.iconSize/13 )
|
||||
property int tasksHeight: mouseHandler.height
|
||||
property int tasksWidth: mouseHandler.width
|
||||
property int userPanelPosition: nowDockPanel ? nowDockPanel.panelAlignment : plasmoid.configuration.plasmoidPosition
|
||||
property int userPanelPosition: latteDock ? latteDock.panelAlignment : plasmoid.configuration.plasmoidPosition
|
||||
|
||||
property real zoomFactor: nowDockPanel ? nowDockPanel.zoomFactor : ( 1 + (plasmoid.configuration.zoomLevel / 20) )
|
||||
property real zoomFactor: latteDock ? latteDock.zoomFactor : ( 1 + (plasmoid.configuration.zoomLevel / 20) )
|
||||
|
||||
property alias tasksCount: tasksModel.count
|
||||
property alias hoveredIndex: icList.hoveredIndex
|
||||
|
||||
property Item nowDockPanel: null
|
||||
property Item latteDock: null
|
||||
//END Now Dock Panel properties
|
||||
|
||||
|
||||
@ -147,11 +147,11 @@ Item {
|
||||
border.color: "red"
|
||||
color: "white"
|
||||
} */
|
||||
onNowDockPanelChanged: {
|
||||
if (nowDockPanel)
|
||||
plasmoid.configuration.isInNowDockPanel = true;
|
||||
onLatteDockChanged: {
|
||||
if (latteDock)
|
||||
plasmoid.configuration.isInLatteDock = true;
|
||||
else
|
||||
plasmoid.configuration.isInNowDockPanel = false;
|
||||
plasmoid.configuration.isInLatteDock = false;
|
||||
}
|
||||
|
||||
|
||||
@ -198,7 +198,6 @@ Item {
|
||||
property int currentItem: -1
|
||||
}
|
||||
|
||||
// FIXME: at some point this must be dropped with NowDock plugin
|
||||
////BEGIN interfaces
|
||||
Latte.WindowSystem{
|
||||
id:windowSystem
|
||||
@ -220,7 +219,7 @@ Item {
|
||||
property Item activeItem: null
|
||||
|
||||
function hide(){
|
||||
if (nowDockPanel) {
|
||||
if (latteDock) {
|
||||
//it is used to unblock dock hiding
|
||||
root.signalDraggingState(false);
|
||||
}
|
||||
@ -241,7 +240,7 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
if (nowDockPanel) {
|
||||
if (latteDock) {
|
||||
//it is used to block dock hiding
|
||||
root.signalDraggingState(true);
|
||||
}
|
||||
@ -928,11 +927,11 @@ Item {
|
||||
if (result)
|
||||
return true;
|
||||
|
||||
if (!result && nowDockPanel && nowDockPanel.outsideContainsMouse())
|
||||
if (!result && latteDock && latteDock.outsideContainsMouse())
|
||||
return true;
|
||||
|
||||
if (nowDockPanel)
|
||||
nowDockPanel.clearZoom();
|
||||
if (latteDock)
|
||||
latteDock.clearZoom();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user