support nomad systray in Latte

v0.7
Michail Vourlakos 7 years ago
parent f129471e6a
commit ed5f87cfd3

@ -1547,7 +1547,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;

@ -57,7 +57,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;
@ -217,7 +218,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;
}

@ -110,10 +110,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)
@ -129,9 +129,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
@ -253,7 +253,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{
@ -299,7 +299,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…
Cancel
Save