diff --git a/kcms/activities/PrivacyTab.cpp b/kcms/activities/PrivacyTab.cpp --- a/kcms/activities/PrivacyTab.cpp +++ b/kcms/activities/PrivacyTab.cpp @@ -30,6 +30,7 @@ #include #include +#include #include "ui_PrivacyTabBase.h" #include "BlacklistedApplicationsModel.h" @@ -71,7 +72,7 @@ // Keep history initialization d->spinKeepHistory->setRange(0, INT_MAX); - d->spinKeepHistory->setSpecialValueText(i18nc("unlimited number of months", "forever")); + d->spinKeepHistory->setSpecialValueText(i18nc("unlimited number of months", "Forever")); connect(d->spinKeepHistory, SIGNAL(valueChanged(int)), this, SLOT(spinKeepHistoryValueChanged(int))); @@ -126,6 +127,8 @@ d->checkBlacklistAllNotOnList->setEnabled(false); d->blacklistedApplicationsModel->setEnabled(false); d->viewBlacklistedApplicationsContainer->setEnabled(false); + + d->messageWidget->setVisible(false); } PrivacyTab::~PrivacyTab() @@ -190,6 +193,8 @@ ResourcesScoring); rankingsservice.asyncCall(QStringLiteral("DeleteRecentStats"), QString(), count, what); + + d->messageWidget->animatedShow(); } void PrivacyTab::forgetLastHour() @@ -219,7 +224,7 @@ if (value) { d->spinKeepHistory->setPrefix( - i18nc("for in 'keep history for 5 months'", "for ")); + i18nc("for in 'keep history for 5 months'", "For ")); d->spinKeepHistory->setSuffix(months.subs(value).toString()); } } diff --git a/kcms/activities/imports/dialog.cpp b/kcms/activities/imports/dialog.cpp --- a/kcms/activities/imports/dialog.cpp +++ b/kcms/activities/imports/dialog.cpp @@ -68,7 +68,6 @@ QTabWidget *tabs; QQuickWidget *tabGeneral; - QQuickWidget *tabOther; KMessageWidget *message; QDialogButtonBox *buttons; QString defaultOKText; @@ -85,11 +84,6 @@ if (setViewSource(view, QStringLiteral("/qml/activityDialog/") + file)) { tabs->addTab(view, title); - - auto root = view->rootObject(); - Q_ASSERT(root); - QMetaObject::invokeMethod(root, "load", Qt::DirectConnection); - } else { message->setText(i18n("Error loading the QML files. Check your installation.\nMissing %1", QStringLiteral(KAMD_KCM_DATADIR) + QStringLiteral("/qml/activityDialog/") + file)); @@ -142,7 +136,7 @@ : QDialog() , d(this) { - resize(600, 500); + resize(550, 400); d->layout = new QVBoxLayout(this); @@ -156,7 +150,6 @@ d->tabs = new QTabWidget(this); d->layout->addWidget(d->tabs); d->tabGeneral = d->createTab(i18n("General"), QStringLiteral("GeneralTab.qml")); - d->tabOther = d->createTab(i18n("Other"), QStringLiteral("OtherTab.qml")); // Buttons d->buttons = new QDialogButtonBox( @@ -185,7 +178,7 @@ setActivityId(activityId); setActivityName(QString()); setActivityDescription(QString()); - setActivityIcon(QString()); + setActivityIcon(QStringLiteral("preferences-activities")); setActivityIsPrivate(false); setActivityShortcut(QKeySequence()); @@ -257,8 +250,8 @@ IMPLEMENT_PROPERTY(General, QString, const QString &, Description) IMPLEMENT_PROPERTY(General, QString, const QString &, Icon) IMPLEMENT_PROPERTY(General, QString, const QString &, Wallpaper) -IMPLEMENT_PROPERTY(Other, QKeySequence, const QKeySequence &, Shortcut) -IMPLEMENT_PROPERTY(Other, bool, bool, IsPrivate) +IMPLEMENT_PROPERTY(General, QKeySequence, const QKeySequence &, Shortcut) +IMPLEMENT_PROPERTY(General, bool, bool, IsPrivate) #undef IMPLEMENT_PROPERTY void Dialog::save() diff --git a/kcms/activities/imports/qml/activityDialog/GeneralTab.qml b/kcms/activities/imports/qml/activityDialog/GeneralTab.qml --- a/kcms/activities/imports/qml/activityDialog/GeneralTab.qml +++ b/kcms/activities/imports/qml/activityDialog/GeneralTab.qml @@ -18,147 +18,73 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import QtQuick 2.2 -import QtQuick.Controls 1.0 as QtControls +import QtQuick 2.5 +import QtQuick.Controls 2.5 as QQC2 -import org.kde.plasma.core 2.0 as PlasmaCore +import org.kde.kirigami 2.5 as Kirigami +import org.kde.kquickcontrols 2.0 as KQuickControls +import org.kde.kquickcontrolsaddons 2.0 as KQuickControlsAddons -import "./components" as Local - -Item { +Kirigami.FormLayout { id: root function setFocus() { activityName.forceActiveFocus(); - console.log("GeneralTab: Set focus called"); } property string activityId: "" property alias activityName : activityName.text property alias activityDescription : activityDescription.text - property alias activityIcon : buttonIcon.iconName - property alias activityWallpaper : imageWallpaper.source - - height : content.childrenRect.height + 4 * units.smallSpacing - width : content.childrenRect.width + 4 * units.smallSpacing - - Column { - id: content - - anchors { - fill: parent - margins: 2 * units.smallSpacing - } - - spacing: units.smallSpacing - - QtControls.Label { - font.bold: true - text: i18nd("kcm_activities5", "Activity information") - } - - property int labelWidth : 2 * units.largeSpacing + - Math.max(activityName.desiredLabelWidth, activityDescription.desiredLabelWidth) + property alias activityIcon : activityIcon.icon.name + property alias activityIsPrivate : activityIsPrivate.checked + property alias activityShortcut : activityShortcut.keySequence - Local.LabeledTextField { - id: activityName - label: i18nd("kcm_activities5", "Name:") - - labelWidth: content.labelWidth - } - - Local.LabeledTextField { - id: activityDescription - label: i18nd("kcm_activities5", "Description:") + Item { + height: Kirigami.Units.smallSpacing + } - labelWidth: content.labelWidth + QQC2.Button { + id: activityIcon + implicitHeight: Kirigami.Units.iconSizes.medium + Kirigami.Units.largeSpacing * 2 + implicitWidth: height + icon.height: Kirigami.Units.iconSizes.medium + icon.width: Kirigami.Units.iconSizes.medium + icon.name: "preferences-activities" + Kirigami.FormData.label: i18nd("kcm_activities5", "Icon:") + + KQuickControlsAddons.IconDialog { + id: iconDialog + onIconNameChanged: activityIcon.icon.name = iconName } - Item { - width: parent.width - height: units.smallSpacing + onClicked: { + iconDialog.open(); } + } - Row { - height : units.iconSizes.large * 3 - width : childrenRect.width - spacing : units.largeSpacing - - Item { - id: panelWallpaper - - visible: false - - height: parent.height - width: buttonChangeWallpaper.width + imageWallpaper.width + units.smallSpacing - - QtControls.Label { - id: labelWallpaper - font.bold: true - text: i18nd("kcm_activities5", "Wallpaper") - } - - QtControls.Button { - id: buttonChangeWallpaper - width: content.labelWidth - text: i18ndc("kcm_activities5", "@action:button", "Change...") - - anchors { - verticalCenter: imageWallpaper.verticalCenter - } - } - - Image { - id: imageWallpaper - source: "" - - width: height / 3 * 4 - - anchors { - top: labelWallpaper.bottom - bottom: parent.bottom - left: buttonChangeWallpaper.right - - leftMargin: units.smallSpacing - } - - } - } - - Item { - id: panelIcon - - height : parent.height - width : parent.height - - QtControls.Label { - id: labelIcon - font.bold: true - text: i18nd("kcm_activities5", "Icon") - } + QQC2.TextField { + id: activityName + Kirigami.FormData.label: i18nd("kcm_activities5", "Name:") + } - Item { - anchors { - top: labelIcon.bottom - bottom: parent.bottom - left: parent.left - right: parent.right - } + QQC2.TextField { + id: activityDescription + Kirigami.FormData.label: i18nd("kcm_activities5", "Description:") + } - Local.IconChooser { - id: buttonIcon + Kirigami.Separator { + Kirigami.FormData.isSection: true + } - width: height - height: 2 * units.iconSizes.large + QQC2.CheckBox { + id: activityIsPrivate + Kirigami.FormData.label: i18nd("kcm_activities5", "Privacy:") + text: i18nd("kcm_activities5", "Do not track usage for this activity") + } - anchors { - centerIn: parent - } - } - } - } - } + KQuickControls.KeySequenceItem { + id: activityShortcut + Kirigami.FormData.label: i18nd("kcm_activities5", "Shortcut for switching:") } } - diff --git a/kcms/activities/imports/qml/activityDialog/OtherTab.qml b/kcms/activities/imports/qml/activityDialog/OtherTab.qml deleted file mode 100644 --- a/kcms/activities/imports/qml/activityDialog/OtherTab.qml +++ /dev/null @@ -1,55 +0,0 @@ -/* vim:set 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.2 -import QtQuick.Controls 1.0 as QtControls - -import "./components" as Local - -Item { - id: root - - property alias activityIsPrivate : checkPrivate.checked - property alias activityShortcut : panelShortcut.keySequence - - height : content.childrenRect.height + 4 * units.smallSpacing - width : content.childrenRect.width + 4 * units.smallSpacing - - Column { - anchors { - fill: parent - margins: 2 * units.smallSpacing - } - - QtControls.CheckBox { - id: checkPrivate - - text: i18nd("kcm_activities5", "Private - do not track usage for this activity") - - width: parent.width - } - - Local.ShortcutChooser { - id: panelShortcut - - width: parent.width - } - } -} diff --git a/kcms/activities/imports/qml/activityDialog/components/DialogButtons.qml b/kcms/activities/imports/qml/activityDialog/components/DialogButtons.qml deleted file mode 100644 --- a/kcms/activities/imports/qml/activityDialog/components/DialogButtons.qml +++ /dev/null @@ -1,58 +0,0 @@ -/* vim:set 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.0 -import QtQuick.Controls 1.0 as QtControls - -Row { - id: root - - property alias acceptText: buttonAccept.text - property alias acceptIcon: buttonAccept.iconName - - property alias cancelText: buttonCancel.text - property alias cancelIcon: buttonCancel.iconName - - signal accepted() - signal canceled() - - spacing: units.smallSpacing - - height : buttonAccept.height //childrenRect.height - width : buttonAccept.width + spacing + buttonCancel.width - - QtControls.Button { - id: buttonAccept - - text: i18ndc("kcm_activities5", "@action:button", "Apply") - iconName: "list-add" - - onClicked: root.accepted() - } - - QtControls.Button { - id: buttonCancel - - text: i18ndc("kcm_activities5", "@action:button", "Cancel") - iconName: "dialog-cancel" - - onClicked: root.canceled() - } -} diff --git a/kcms/activities/imports/qml/activityDialog/components/IconChooser.qml b/kcms/activities/imports/qml/activityDialog/components/IconChooser.qml deleted file mode 100644 --- a/kcms/activities/imports/qml/activityDialog/components/IconChooser.qml +++ /dev/null @@ -1,42 +0,0 @@ -/* vim:set 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.0 -import QtQuick.Controls 1.0 as QtControls -import org.kde.kquickcontrols 2.0 as KQuickControls -import org.kde.kquickcontrolsaddons 2.0 as KQuickControls - -QtControls.Button { - id: root - - width: height - height: units.iconSizes.medium - - iconName: "preferences-activities" - - KQuickControls.IconDialog { - id: iconDialog - onIconNameChanged: root.iconName = iconName - } - - onClicked: { - iconDialog.open(); - } -} diff --git a/kcms/activities/imports/qml/activityDialog/components/LabeledTextField.qml b/kcms/activities/imports/qml/activityDialog/components/LabeledTextField.qml deleted file mode 100644 --- a/kcms/activities/imports/qml/activityDialog/components/LabeledTextField.qml +++ /dev/null @@ -1,57 +0,0 @@ -/* vim:set 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.2 -import QtQuick.Controls 1.0 as QtControls - -import org.kde.plasma.core 2.0 as PlasmaCore - -Item { - property alias text : textField.text - property alias label : label.text - - property alias labelWidth : label.width - property alias desiredLabelWidth : label.contentWidth - - height : textField.height - width : parent.width - - QtControls.Label { - id: label - - horizontalAlignment: Text.AlignRight - - anchors { - left: parent.left - verticalCenter: textField.verticalCenter - } - } - - QtControls.TextField { - id: textField - - anchors { - left : label.right - right : parent.right - - leftMargin : units.smallSpacing - } - } -} diff --git a/kcms/activities/imports/qml/activityDialog/components/ShortcutChooser.qml b/kcms/activities/imports/qml/activityDialog/components/ShortcutChooser.qml deleted file mode 100644 --- a/kcms/activities/imports/qml/activityDialog/components/ShortcutChooser.qml +++ /dev/null @@ -1,42 +0,0 @@ -/* vim:set 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.2 -import QtQuick.Controls 1.0 as QtControls - -import org.kde.plasma.core 2.0 as PlasmaCore - -import org.kde.kquickcontrols 2.0 as KQuickControls -import org.kde.kquickcontrolsaddons 2.0 as KQuickControls - -Row { - spacing: units.smallSpacing - - property alias keySequence: buttonKeyShorcut.keySequence - - QtControls.Label { - anchors.verticalCenter: parent.verticalCenter - text: i18nd("kcm_activities5", "Shortcut for switching to this activity:") - } - - KQuickControls.KeySequenceItem { - id: buttonKeyShorcut - } -} diff --git a/kcms/activities/kcm_activities.desktop b/kcms/activities/kcm_activities.desktop --- a/kcms/activities/kcm_activities.desktop +++ b/kcms/activities/kcm_activities.desktop @@ -1,4 +1,5 @@ [Desktop Entry] +Exec=kcmshell5 activities Icon=preferences-desktop-activities Type=Service X-KDE-ServiceTypes=KCModule diff --git a/kcms/activities/qml/activitiesTab/ActivitiesView.qml b/kcms/activities/qml/activitiesTab/ActivitiesView.qml --- a/kcms/activities/qml/activitiesTab/ActivitiesView.qml +++ b/kcms/activities/qml/activitiesTab/ActivitiesView.qml @@ -18,176 +18,71 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import QtQuick 2.0 -import org.kde.kquickcontrolsaddons 2.0 -import QtQuick.Controls 1.0 as QtControls +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.plasma.core 2.0 as PlasmaCore +import org.kde.kirigami 2.5 as Kirigami -Item { +ColumnLayout { id: root - anchors.fill: parent - - QtControls.Button { - id: buttonCreateActivity - - text: i18nd("kcm_activities5", "Create activity...") - iconName: "list-add" - - anchors { - top: parent.top - left: parent.left - } - - onClicked: ActivitySettings.newActivity(); - - enabled: !dialogCreateActivityLoader.itemVisible - visible: ActivitySettings.newActivityAuthorized - } - - Loader { - id: dialogCreateActivityLoader - - property bool itemVisible: status == Loader.Ready && item.visible - - z: 1 - - anchors { - top: buttonCreateActivity.bottom - left: buttonCreateActivity.left - } - } - - QtControls.ScrollView { - anchors { - top: buttonCreateActivity.bottom - topMargin: units.smallSpacing - left: parent.left - right: parent.right - bottom: parent.bottom - } - - enabled: !dialogCreateActivityLoader.itemVisible + QQC2.ScrollView { + Layout.fillHeight: true + Layout.fillWidth: true + Component.onCompleted: background.visible = true; ListView { id: activitiesList - width: parent.width - // anchors.fill: parent model: Activities.ActivityModel { id: kactivities } - SystemPalette { - id: palette - colorGroup: SystemPalette.Active - } - - /////////////////////////////////////////////////////////////////// - delegate: Rectangle { - width: parent.width + delegate: Kirigami.SwipeListItem { + hoverEnabled: true - height: units.iconSizes.medium + units.smallSpacing * 2 + contentItem: RowLayout { + id: row - color: (model.index % 2 == 0) ? palette.base : palette.alternateBase - - Item { - id: header - - anchors { - fill: parent - margins: units.smallSpacing - } - - QIconItem { + Kirigami.Icon { id: icon - icon: model.icon - - width: height - height: parent.height - - anchors { - left: parent.left - top: parent.top - } + height: Kirigami.Units.iconSizes.medium + width: height + source: model.icon } - QtControls.Label { + QQC2.Label { + Layout.fillWidth: true text: model.name - - anchors { - left: icon.right - right: buttons.left - leftMargin: units.largeSpacing - verticalCenter: icon.verticalCenter - } } - - Row { - id: buttons - - spacing: units.smallSpacing - height: parent.height - - anchors { - right: parent.right - - verticalCenter: parent.verticalCenter - } - - QtControls.Button { - id: buttonConfigure - - iconName: "configure" - - onClicked: ActivitySettings.configureActivity(model.id); - } - - QtControls.Button { - id: buttonDelete - - iconName: "edit-delete" - - onClicked: ActivitySettings.deleteActivity(model.id); - - visible: ActivitySettings.newActivityAuthorized - - // Disable the button when there's only one activity - enabled: activitiesList.count > 1 - } - - visible: !dialogDeleteLoader.itemVisible - } - - visible: !dialogConfigureLoader.itemVisible } - Loader { - id: dialogConfigureLoader - - property bool itemVisible: status == Loader.Ready && item.visible - - anchors { - left: parent.left - top: parent.top - } - } - - Loader { - id: dialogDeleteLoader - - property bool itemVisible: status == Loader.Ready && item.visible - - anchors { - left: parent.left - top: header.bottom + actions: [ + Kirigami.Action { + icon.name: "configure" + tooltip: i18nc("@info:tooltip", "Configure " + model.name + " activity...") + onTriggered: ActivitySettings.configureActivity(model.id); + }, + Kirigami.Action { + visible: ActivitySettings.newActivityAuthorized + enabled: activitiesList.count > 1 + icon.name: "edit-delete" + tooltip: i18nc("@info:tooltip", "Delete " + model.name + " activity") + 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 --- a/kcms/activities/qml/privacyTab/BlacklistApplicationView.qml +++ b/kcms/activities/qml/privacyTab/BlacklistApplicationView.qml @@ -18,90 +18,71 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import QtQuick 2.0 -import org.kde.kquickcontrolsaddons 2.0 -import QtQuick.Controls 1.0 as QtControls - -QtControls.ScrollView { - anchors.fill: parent - - Flow { - id: main - - SystemPalette { - id: colors - } - - width: parent.parent.width - - property int minimumHeight: 100 - - spacing: 16 - - height: Math.max(childrenRect.height, minimumHeight) - - opacity: applicationModel.enabled ? 1 : .3 - Behavior on opacity { NumberAnimation { duration: 150 } } - - Repeater { - model: applicationModel - Column { - id: item - - property bool blocked: model.blocked - - Item { - id: mainIcon - - width : 64 + 20 - height : 64 + 20 - - QIconItem { - id: icon - icon: model.icon - - anchors.fill : parent - anchors.margins : 10 - - opacity: item.blocked ? 0.5 : 1.0 - Behavior on opacity { NumberAnimation { duration: 150 } } - } - - QIconItem { - id: iconNo - icon: "dialog-cancel" - - anchors { - right : parent.right - bottom : parent.bottom - } +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 + 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 + } - width : 48 - height : 48 - opacity : (1 - icon.opacity) * 2 - } + 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 - MouseArea { - onClicked: applicationModel.toggleApplicationBlocked(model.index) - anchors.fill: parent - } - } + Behavior on opacity { NumberAnimation { duration: 100 } } + } - Text { - elide : Text.ElideRight - width : mainIcon.width + Kirigami.Icon { + anchors.bottom: parent.bottom + anchors.right: parent.right + height: Kirigami.Units.iconSizes.smallMedium + width: parent.width + source: "emblem-unavailable" + opacity: (1 - icon.opacity) * 2 + } - text : model.title - opacity : icon.opacity - color : colors.windowText + 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 } } + } - anchors.margins : 10 - anchors.horizontalCenter : parent.horizontalCenter - horizontalAlignment : Text.AlignHCenter - } + MouseArea { + id: mouseArea + anchors.fill: parent + hoverEnabled: true + onClicked: applicationModel.toggleApplicationBlocked(model.index) } } } - } - diff --git a/kcms/activities/ui/MainConfigurationWidgetBase.ui b/kcms/activities/ui/MainConfigurationWidgetBase.ui --- a/kcms/activities/ui/MainConfigurationWidgetBase.ui +++ b/kcms/activities/ui/MainConfigurationWidgetBase.ui @@ -6,8 +6,8 @@ 0 0 - 760 - 613 + 500 + 500 diff --git a/kcms/activities/ui/PrivacyTabBase.ui b/kcms/activities/ui/PrivacyTabBase.ui --- a/kcms/activities/ui/PrivacyTabBase.ui +++ b/kcms/activities/ui/PrivacyTabBase.ui @@ -6,91 +6,83 @@ 0 0 - 631 - 479 + 500 + 500 - + - + - Remember opened documents: + Cleared the activity history. + + + KMessageWidget::Positive + + + + .. - - - + + + Qt::AlignHCenter|Qt::AlignTop + + + + + Remember opened documents: + + + + + + + For a&ll applications + + + true + + + + + + + &Do not remember + + + + + + + O&nly for specific applications: + + + + + - - - For a&ll applications - - - true - - + - + - &Do not remember + Clear History - - - - - - O&nly for specific applications + + + .. - - - - Qt::Horizontal - - - - 40 - 20 - - - - - + - Keep history - - - - - - - - - - Qt::Horizontal - - - QSizePolicy::Minimum - - - - 40 - 20 - - - - - - - - Clear recent history + Keep history: @@ -107,14 +99,28 @@ - - - Blacklist all applications not on this list + + + 6 - + + + + Blacklist applications not on the list + + + + + + + KMessageWidget + QFrame +
kmessagewidget.h
+
+
diff --git a/kcms/activities/ui/SwitchingTabBase.ui b/kcms/activities/ui/SwitchingTabBase.ui --- a/kcms/activities/ui/SwitchingTabBase.ui +++ b/kcms/activities/ui/SwitchingTabBase.ui @@ -6,39 +6,42 @@ 0 0 - 666 - 558 + 500 + 500 - - - General + + + Qt::AlignHCenter|Qt::AlignTop - - - - - Remember the current virtual desktop for each activity (needs restart) - - - - - + + + + Remember for each activity (needs restart) + + + + + + + Current virtual desktop: + + + +
- - - Shortcuts + + + Shortcuts: - - - - - + + +