[X2Go-Commits] [x2goplasmabindings] 01/11: plasmoidhoveredicon.{cpp, h}: revert QFrame change.
git-admin at x2go.org
git-admin at x2go.org
Thu Jun 29 22:45:05 CEST 2023
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository x2goplasmabindings.
commit c122eff1fa02dd4d1a2d084144f245ef53ec2088
Author: Mihai Moldovan <ionic at ionic.de>
Date: Thu Jun 29 21:59:43 2023 +0200
plasmoidhoveredicon.{cpp,h}: revert QFrame change.
We will use a new QML-based plugin for KF5.
---
debian/changelog | 2 ++
plasmoidhovereditem.cpp | 25 +------------------------
plasmoidhovereditem.h | 13 +------------
3 files changed, 4 insertions(+), 36 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 6ef9cb4..61b7d27 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -31,6 +31,8 @@ x2goplasmabindings (3.0.2.3-0x2go1) UNRELEASED; urgency=medium
- plasmoidhoveredicon.{cpp,h}: use QFrame in Plasma 5 mode, where
Plasma::Frame is not available. We try to recreate the previous look by
using a StyledFrame with the default lineWidth of one.
+ - plasmoidhoveredicon.{cpp,h}: revert QFrame change. We will use a new
+ QML-based plugin for KF5.
* debian/control:
+ Adapt description to also mention KDE 5.
+ Build-Depend on libkf5plasma-dev and libkf5i18n-dev, with a fallback to
diff --git a/plasmoidhovereditem.cpp b/plasmoidhovereditem.cpp
index f143a7f..2bc73af 100644
--- a/plasmoidhovereditem.cpp
+++ b/plasmoidhovereditem.cpp
@@ -19,27 +19,16 @@
Boston, MA 02110-1301, USA.
*/
-#include "plasma_compat.h"
#include "plasmoidhovereditem.h"
#include <QDebug>
-#ifdef X2GOPLASMOID_PLASMA5_COMPAT
-#include <QFrame>
-#else
#include <plasma/widgets/frame.h>
-#endif
#include <plasma/widgets/iconwidget.h>
#include <plasma/widgets/label.h>
#include <QGraphicsLinearLayout>
-PlasmoidHoveredItem::PlasmoidHoveredItem(QGraphicsWidget* parent):
-#ifdef X2GOPLASMOID_PLASMA5_COMPAT
- QFrame (parent)
-#else
- Plasma::Frame(parent)
-#endif
- , label(0),icon(0)
+PlasmoidHoveredItem::PlasmoidHoveredItem(QGraphicsWidget* parent): Plasma::Frame(parent),label(0),icon(0)
{
setAcceptHoverEvents(true);
setZValue(0);
@@ -52,10 +41,6 @@ PlasmoidHoveredItem::PlasmoidHoveredItem(QGraphicsWidget* parent):
icon->setAcceptHoverEvents(false);
icon->setAcceptedMouseButtons(0);
icon->setMaximumWidth(18);
-
-#ifdef X2GOPLASMOID_PLASMA5_COMPAT
- this->setFrameStyle (QFrame::StyledPanel | QFrame::Plain);
-#endif
}
PlasmoidHoveredItem::~PlasmoidHoveredItem()
@@ -69,21 +54,13 @@ void PlasmoidHoveredItem::buttonPressed()
void PlasmoidHoveredItem::hoverEnter()
{
-#ifdef X2GOPLASMOID_PLASMA5_COMPAT
- this->setFrameStyle (this->frameShape () | QFrame::Raised);
-#else
setFrameShadow(Plasma::Frame::Raised);
-#endif
update();
}
void PlasmoidHoveredItem::hoverLeave()
{
-#ifdef X2GOPLASMOID_PLASMA5_COMPAT
- this->setFrameStyle (this->frameShape () | QFrame::Plain);
-#else
setFrameShadow(Plasma::Frame::Plain);
-#endif
update();
}
diff --git a/plasmoidhovereditem.h b/plasmoidhovereditem.h
index bc254f1..4ef6f12 100644
--- a/plasmoidhovereditem.h
+++ b/plasmoidhovereditem.h
@@ -22,25 +22,14 @@
#ifndef SHAREITEM_H
#define SHAREITEM_H
-#include "plasma_compat.h"
-
-#ifdef X2GOPLASMOID_PLASMA5_COMPAT
-#include <QFrame>
-#else
#include <plasma/widgets/frame.h>
-#endif
#include <QObject>
#include <plasma/widgets/label.h>
#include <plasma/widgets/iconwidget.h>
class QGraphicsLinearLayout;
-class PlasmoidHoveredItem : public
-#ifdef X2GOPLASMOID_PLASMA5_COMPAT
- QFrame
-#else
- Plasma::Frame
-#endif
+class PlasmoidHoveredItem : public Plasma::Frame
{
Q_OBJECT
public:
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goplasmabindings.git
More information about the x2go-commits
mailing list