diff --git a/applets/grouping/package/contents/ui/items/AbstractItem.qml b/applets/grouping/package/contents/ui/items/AbstractItem.qml index 1fec5e717..1f5674817 100644 --- a/applets/grouping/package/contents/ui/items/AbstractItem.qml +++ b/applets/grouping/package/contents/ui/items/AbstractItem.qml @@ -1,45 +1,36 @@ /* * Copyright 2016 Marco Martin * Copyright 2016 David Edmundson * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2, or * (at your option) any later version. * * This program 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 Library General Public License for more details * * You should have received a copy of the GNU Library General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import QtQuick 2.1 import org.kde.plasma.core 2.0 as PlasmaCore -import QtQuick.Controls 1.3 - -Tab { //Note this makes this a loader not an Item. +MouseArea { id: abstractItem - property alias text: abstractItem.title + property string text property string itemId property int status //PlasmaCore.Types.ItemStatus + property bool active - MouseArea { - id: mouseArea - anchors.fill: item - hoverEnabled: true - drag.filterChildren: true - acceptedButtons: Qt.RightButton - onClicked: { - abstractItem.clicked(mouse) - } - } - - signal clicked(var mouse) + anchors.fill: abstractItem + hoverEnabled: true + drag.filterChildren: true + acceptedButtons: Qt.RightButton } diff --git a/applets/grouping/package/contents/ui/main.qml b/applets/grouping/package/contents/ui/main.qml index 8540eb78d..315e7a05b 100644 --- a/applets/grouping/package/contents/ui/main.qml +++ b/applets/grouping/package/contents/ui/main.qml @@ -1,124 +1,146 @@ /* * Copyright 2011 Marco Martin * Copyright 2016 David Edmundson * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2, or * (at your option) any later version. * * This program 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 Library General Public License for more details * * You should have received a copy of the GNU Library General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import QtQuick 2.5 -import QtQuick.Layouts 1.1 +import QtQuick.Layouts 1.3 import org.kde.plasma.core 2.0 as PlasmaCore -import org.kde.plasma.components 2.0 as PlasmaComponents +import org.kde.plasma.components 3.0 as PlasmaComponents import org.kde.plasma.plasmoid 2.0 import org.kde.draganddrop 2.0 as DnD -import QtQuick.Controls 1.1 -import QtQuick.Controls.Styles.Plasma 2.0 as Styles - import "items" Item { id: root //be at least the same size as the system tray popup Layout.minimumWidth: units.gridUnit * 24 Layout.minimumHeight: units.gridUnit * 21 Layout.preferredWidth: Layout.minimumWidth Layout.preferredHeight: Layout.minimumHeight * 1.5 property Component plasmoidItemComponent - Containment.onAppletAdded: addApplet(applet); + Containment.onAppletAdded: { + addApplet(applet); + //when we add an applet, select it straight away + //we know it will always be at the end of the stack + tabbar.currentIndex = mainStack.count -1 + } Containment.onAppletRemoved: { - for (var i=0; i