diff --git a/kcms/activities/qml/activitiesTab/ActivitiesView.qml b/kcms/activities/qml/activitiesTab/ActivitiesView.qml index aac13a2ab..88b47bdf6 100644 --- a/kcms/activities/qml/activitiesTab/ActivitiesView.qml +++ b/kcms/activities/qml/activitiesTab/ActivitiesView.qml @@ -1,88 +1,90 @@ /* vim:set foldenable foldmethod=marker: * * Copyright (C) 2015 Ivan Cukic * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2, * or (at your option) any later version, as published by the Free * Software Foundation * * 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 General Public License for more details * * You should have received a copy of the GNU 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.Controls 2.5 as QQC2 import QtQuick.Layouts 1.0 import org.kde.activities 0.1 as Activities import org.kde.activities.settings 0.1 import org.kde.kirigami 2.5 as Kirigami ColumnLayout { id: root QQC2.ScrollView { Layout.fillHeight: true Layout.fillWidth: true Component.onCompleted: background.visible = true; ListView { id: activitiesList + clip: true + model: Activities.ActivityModel { id: kactivities } delegate: Kirigami.SwipeListItem { hoverEnabled: true contentItem: RowLayout { id: row Kirigami.Icon { id: icon height: Kirigami.Units.iconSizes.medium width: height source: model.icon } QQC2.Label { Layout.fillWidth: true text: model.name } } actions: [ Kirigami.Action { icon.name: "configure" tooltip: i18nc("@info:tooltip", "Configure %1 activity", model.name) onTriggered: ActivitySettings.configureActivity(model.id); }, Kirigami.Action { visible: ActivitySettings.newActivityAuthorized enabled: activitiesList.count > 1 icon.name: "edit-delete" tooltip: i18nc("@info:tooltip", "Delete %1 activity", model.name) onTriggered: ActivitySettings.deleteActivity(model.id); } ] } } } QQC2.Button { id: buttonCreateActivity visible: ActivitySettings.newActivityAuthorized text: i18nd("kcm_activities5", "Create New...") icon.name: "list-add" onClicked: ActivitySettings.newActivity(); } } diff --git a/kcms/activities/qml/privacyTab/BlacklistApplicationView.qml b/kcms/activities/qml/privacyTab/BlacklistApplicationView.qml index 981ea694f..78580a13e 100644 --- a/kcms/activities/qml/privacyTab/BlacklistApplicationView.qml +++ b/kcms/activities/qml/privacyTab/BlacklistApplicationView.qml @@ -1,90 +1,91 @@ /* vim:set foldenable foldmethod=marker: * * Copyright (C) 2012 Ivan Cukic * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2, * or (at your option) any later version, as published by the Free * Software Foundation * * 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 General Public License for more details * * You should have received a copy of the GNU 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.Controls 2.5 as QQC2 import org.kde.kirigami 2.5 as Kirigami QQC2.ScrollView { enabled: applicationModel.enabled Component.onCompleted: background.visible = true; GridView { id: gridView + clip: true cellHeight: Kirigami.Units.gridUnit * 5 cellWidth: Kirigami.Units.gridUnit * 9 model: applicationModel delegate: Item { height: gridView.cellHeight width: gridView.cellWidth Rectangle { anchors.fill: parent visible: mouseArea.containsMouse color: Kirigami.Theme.hoverColor } Kirigami.Icon { id: icon anchors.horizontalCenter: parent.horizontalCenter anchors.bottom: parent.verticalCenter height: Kirigami.Units.iconSizes.medium width: height source: model.icon opacity: model.blocked ? 0.6 : 1.0 Behavior on opacity { NumberAnimation { duration: 100 } } } Kirigami.Icon { anchors.bottom: icon.bottom anchors.right: icon.right height: Kirigami.Units.iconSizes.small width: height source: "emblem-unavailable" opacity: model.blocked ? 1.0 : 0.0 Behavior on opacity { NumberAnimation { duration: 100 } } } QQC2.Label { anchors.horizontalCenter: parent.horizontalCenter anchors.top: parent.verticalCenter width: parent.width - 20 text: model.title horizontalAlignment: Text.AlignHCenter elide: Text.ElideRight maximumLineCount: 2 wrapMode: Text.Wrap opacity: model.blocked ? 0.6 : 1.0 Behavior on opacity { NumberAnimation { duration: 100 } } } MouseArea { id: mouseArea anchors.fill: parent hoverEnabled: true onClicked: applicationModel.toggleApplicationBlocked(model.index) } } } }