mirror of
https://github.com/KDE/latte-dock.git
synced 2025-03-20 18:50:15 +03:00
support nomad systray in Latte
This commit is contained in:
parent
69d5c1afa2
commit
e0a3bd9f80
@ -1559,7 +1559,8 @@ void DockView::mousePressEvent(QMouseEvent *event)
|
||||
KPluginMetaData meta = applet->kPackage().metadata();
|
||||
|
||||
//Try to find applets inside a systray
|
||||
if (meta.pluginId() == "org.kde.plasma.systemtray") {
|
||||
if (meta.pluginId() == "org.kde.plasma.systemtray" ||
|
||||
meta.pluginId() == "org.nomad.systemtray") {
|
||||
auto systrayId = applet->config().readEntry("SystrayContainmentId");
|
||||
applet = 0;
|
||||
inSystray = true;
|
||||
|
@ -59,7 +59,7 @@ Item{
|
||||
return 1;
|
||||
}
|
||||
|
||||
property bool isActive: (container.isExpanded && applet.pluginName!==root.plasmoidName && applet.pluginName!=="org.kde.plasma.systemtray")
|
||||
property bool isActive: (container.isExpanded && applet.pluginName!==root.plasmoidName && !container.isSystray)
|
||||
|
||||
property bool vertical: root.isVertical
|
||||
|
||||
|
@ -62,6 +62,7 @@ Item {
|
||||
property bool isInternalViewSplitter: (internalSplitterId > 0)
|
||||
property bool isZoomed: false
|
||||
property bool isSeparator: applet && applet.pluginName === "audoban.applet.separator"
|
||||
property bool isSystray: applet && (applet.pluginName === "org.kde.plasma.systemtray" || applet.pluginName === "org.nomad.systemtray" )
|
||||
|
||||
property bool firstChildOfStartLayout: (index === layoutsContainer.startLayout.beginIndex)
|
||||
property bool lastChildOfEndLayout: ((index === layoutsContainer.endLayout.beginIndex+layoutsContainer.endLayout.count-1)&&(layoutsContainer.endLayout.count>1))
|
||||
@ -85,7 +86,7 @@ Item {
|
||||
|| root.reverseLinesPosition ? 0 : root.statesLineSize
|
||||
property int maxWidth: root.isHorizontal ? root.height : root.width
|
||||
property int maxHeight: root.isHorizontal ? root.height : root.width
|
||||
property int shownAppletMargin: applet && (applet.pluginName === "org.kde.plasma.systemtray") ? 0 : appletMargin
|
||||
property int shownAppletMargin: isSystray ? 0 : appletMargin
|
||||
property int internalSplitterId: 0
|
||||
|
||||
property int previousIndex: -1
|
||||
@ -110,7 +111,7 @@ Item {
|
||||
|
||||
property Item appletWrapper: applet &&
|
||||
((applet.pluginName === root.plasmoidName) ||
|
||||
(applet.pluginName === "org.kde.plasma.systemtray")) ? wrapper : wrapper.wrapperContainer
|
||||
isSystray) ? wrapper : wrapper.wrapperContainer
|
||||
property Item appletIconItem; //first applet's IconItem, to be activated onExit signal
|
||||
property Item appletImageItem;
|
||||
|
||||
@ -223,7 +224,7 @@ Item {
|
||||
(applet && (applet.Layout.minimumHeight > root.iconSize) && root.isVertical))
|
||||
&& (applet && applet.pluginName !== "org.kde.plasma.panelspacer")
|
||||
&& !container.fakeIconItem)
|
||||
|| (applet && applet.pluginName === "org.kde.plasma.systemtray")
|
||||
|| (isSystray)
|
||||
|| (container.needsFillSpace) ) {
|
||||
canBeHovered = false;
|
||||
}
|
||||
|
@ -116,10 +116,10 @@ Item{
|
||||
property int iconSize: root.iconSize
|
||||
|
||||
property int marginWidth: root.isVertical ?
|
||||
(applet && (applet.pluginName === "org.kde.plasma.systemtray") ? root.thickMarginBase : root.thickMargin ) :
|
||||
(container.isSystray ? root.thickMarginBase : root.thickMargin ) :
|
||||
(root.inFullJustify && (container.firstChildOfStartLayout || container.lastChildOfEndLayout ) ? 0 : root.iconMargin) //Fitt's Law
|
||||
property int marginHeight: root.isHorizontal ?
|
||||
(applet && (applet.pluginName === "org.kde.plasma.systemtray") ? root.thickMarginBase : root.thickMargin ) :
|
||||
(container.isSystray ? root.thickMarginBase : root.thickMargin ) :
|
||||
(root.inFullJustify && (container.firstChildOfStartLayout || container.lastChildOfEndLayout ) ? 0 : root.iconMargin) //Fitt's Law
|
||||
|
||||
property real scaledWidth: zoomScaleWidth * (layoutWidth + marginWidth)
|
||||
@ -135,9 +135,9 @@ Item{
|
||||
// property int localMoreSpace: root.reverseLinesPosition ? root.statesLineSize + 2 : appletMargin
|
||||
property int localMoreSpace: appletMargin
|
||||
|
||||
property int moreHeight: ((applet && (applet.pluginName === "org.kde.plasma.systemtray")) || root.reverseLinesPosition)
|
||||
property int moreHeight: (container.isSystray || root.reverseLinesPosition)
|
||||
&& root.isHorizontal ? localMoreSpace : 0
|
||||
property int moreWidth: ((applet && (applet.pluginName === "org.kde.plasma.systemtray")) || root.reverseLinesPosition)
|
||||
property int moreWidth: (container.isSystray || root.reverseLinesPosition)
|
||||
&& root.isVertical ? localMoreSpace : 0
|
||||
|
||||
property real center:(width + hiddenSpacerLeft.separatorSpace + hiddenSpacerRight.separatorSpace) / 2
|
||||
@ -259,7 +259,7 @@ Item{
|
||||
else if(applet && applet.pluginName === "org.kde.plasma.panelspacer"){
|
||||
layoutHeight = root.iconSize + moreHeight;
|
||||
}
|
||||
else if(applet && applet.pluginName === "org.kde.plasma.systemtray" && root.isHorizontal){
|
||||
else if(container.isSystray && root.isHorizontal){
|
||||
layoutHeight = root.statesLineSize + root.iconSize;
|
||||
}
|
||||
else{
|
||||
@ -305,7 +305,7 @@ Item{
|
||||
else if(applet && applet.pluginName === "org.kde.plasma.panelspacer"){
|
||||
layoutWidth = root.iconSize + moreWidth;
|
||||
}
|
||||
else if(applet && applet.pluginName === "org.kde.plasma.systemtray" && root.isVertical){
|
||||
else if(container.isSystray && root.isVertical){
|
||||
layoutWidth = root.statesLineSize + root.iconSize;
|
||||
}
|
||||
else{
|
||||
|
Loading…
x
Reference in New Issue
Block a user