diff --git a/applets/batterymonitor/package/contents/ui/PopupDialog.qml b/applets/batterymonitor/package/contents/ui/PopupDialog.qml
--- a/applets/batterymonitor/package/contents/ui/PopupDialog.qml
+++ b/applets/batterymonitor/package/contents/ui/PopupDialog.qml
@@ -53,8 +53,8 @@
Column {
id: settingsColumn
anchors.horizontalCenter: parent.horizontalCenter
- width: parent.width - units.gridUnit
- spacing: Math.round(units.gridUnit / 2)
+ width: parent.width - units.smallSpacing * 2
+ spacing: units.gridUnit
Components.Label {
// this is just for metrics, TODO use TextMetrics in 5.4 instead
@@ -114,16 +114,17 @@
anchors {
horizontalCenter: parent.horizontalCenter
top: settingsColumn.bottom
- topMargin: units.gridUnit // not divided by 2 for unified looks
+ topMargin: units.gridUnit
+ leftMargin: units.smallSpacing
bottom: dialog.bottom
}
- width: parent.width - units.gridUnit
+ width: parent.width - units.smallSpacing * 2
ListView {
id: batteryList
boundsBehavior: Flickable.StopAtBounds
- spacing: Math.round(units.gridUnit / 2)
+ spacing: Math.round(units.smallSpacing / 2)
KeyNavigation.tab: brightnessSlider
KeyNavigation.backtab: pmSwitch
diff --git a/applets/notifications/package/contents/ui/FullRepresentation.qml b/applets/notifications/package/contents/ui/FullRepresentation.qml
--- a/applets/notifications/package/contents/ui/FullRepresentation.qml
+++ b/applets/notifications/package/contents/ui/FullRepresentation.qml
@@ -18,15 +18,14 @@
* along with this program. If not, see
*/
-import QtQuick 2.10
+import QtQuick 2.8
import QtQuick.Layouts 1.1
import org.kde.plasma.plasmoid 2.0
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 PlasmaComponents3
import org.kde.plasma.extras 2.0 as PlasmaExtras
-import org.kde.kirigami 2.11 as Kirigami
import org.kde.kcoreaddons 1.0 as KCoreAddons
@@ -67,9 +66,8 @@
// header
ColumnLayout {
- id: header
- visible: !Kirigami.Settings.isMobile
Layout.fillWidth: true
+ Layout.leftMargin: units.smallSpacing
spacing: 0
RowLayout {
@@ -173,7 +171,7 @@
if (dndMenu.date.getDay() >= 5) {
d = dndMenu.date;
d.setHours(dndMorningHour);
- // wraps around if necessary
+ // wraps around if neccessary
d.setDate(d.getDate() + (7 - d.getDay() + 1));
d.setMinutes(0);
d.setSeconds(0);
@@ -265,7 +263,6 @@
}
PlasmaCore.SvgItem {
- visible: header.visible
elementId: "horizontal-line"
Layout.fillWidth: true
// why is this needed here but not in the delegate?
@@ -282,6 +279,7 @@
Layout.fillHeight: true
Layout.preferredWidth: units.gridUnit * 18
Layout.preferredHeight: units.gridUnit * 24
+ Layout.leftMargin: units.smallSpacing
ListView {
id: list
@@ -375,14 +373,9 @@
}
remove: Transition {
- id: removeTransition
ParallelAnimation {
NumberAnimation { property: "opacity"; to: 0; duration: units.longDuration }
- NumberAnimation {
- property: "x"
- to: removeTransition.ViewTransition.item.x >= 0 ? list.width : -list.width
- duration: units.longDuration
- }
+ NumberAnimation { property: "x"; to: list.width; duration: units.longDuration }
}
}
removeDisplaced: Transition {
@@ -398,190 +391,177 @@
criteria: ViewSection.FullString
}
- delegate: DraggableDelegate {
+ delegate: Loader {
+ id: delegateLoader
width: list.width
- contentItem: delegateLoader
-
- draggable: !model.isGroup && model.type != NotificationManager.Notifications.JobType
-
- onDismissRequested: historyModel.close(historyModel.index(index, 0));
-
- Loader {
- id: delegateLoader
- width: list.width
- sourceComponent: model.isGroup ? groupDelegate : notificationDelegate
+ sourceComponent: model.isGroup ? groupDelegate : notificationDelegate
- Component {
- id: groupDelegate
- NotificationHeader {
- applicationName: model.applicationName
- applicationIconSource: model.applicationIconName
- originName: model.originName || ""
+ Component {
+ id: groupDelegate
+ NotificationHeader {
+ applicationName: model.applicationName
+ applicationIconSource: model.applicationIconName
+ originName: model.originName || ""
- // don't show timestamp for group
+ // don't show timestamp for group
- configurable: model.configurable
- closable: model.closable
- closeButtonTooltip: i18n("Close Group")
+ configurable: model.configurable
+ closable: model.closable
+ closeButtonTooltip: i18n("Close Group")
- onCloseClicked: {
- historyModel.close(historyModel.index(index, 0))
- if (list.count === 0) {
- plasmoid.expanded = false;
- }
+ onCloseClicked: {
+ historyModel.close(historyModel.index(index, 0))
+ if (list.count === 0) {
+ plasmoid.expanded = false;
}
-
- onConfigureClicked: historyModel.configure(historyModel.index(index, 0))
}
- }
- Component {
- id: notificationDelegate
- ColumnLayout {
- spacing: units.smallSpacing
+ onConfigureClicked: historyModel.configure(historyModel.index(index, 0))
+ }
+ }
- RowLayout {
- Item {
- id: groupLineContainer
- Layout.fillHeight: true
- Layout.topMargin: units.smallSpacing
+ Component {
+ id: notificationDelegate
+ ColumnLayout {
+ spacing: units.smallSpacing
+
+ RowLayout {
+ Item {
+ id: groupLineContainer
+ Layout.fillHeight: true
+ Layout.topMargin: units.smallSpacing
+ width: units.iconSizes.small
+ visible: model.isInGroup
+
+ PlasmaCore.SvgItem {
+ elementId: "vertical-line"
+ svg: lineSvg
+ anchors.horizontalCenter: parent.horizontalCenter
width: units.iconSizes.small
- visible: model.isInGroup
-
- PlasmaCore.SvgItem {
- elementId: "vertical-line"
- svg: lineSvg
- anchors.horizontalCenter: parent.horizontalCenter
- width: units.iconSizes.small
- height: parent.height
- }
+ height: parent.height
}
+ }
- NotificationItem {
- Layout.fillWidth: true
-
- notificationType: model.type
-
- inGroup: model.isInGroup
-
- applicationName: model.applicationName
- applicationIconSource: model.applicationIconName
- originName: model.originName || ""
-
- time: model.updated || model.created
-
- // configure button on every single notifications is bit overwhelming
- configurable: !inGroup && model.configurable
-
- dismissable: model.type === NotificationManager.Notifications.JobType
- && model.jobState !== NotificationManager.Notifications.JobStateStopped
- && model.dismissed
- // TODO would be nice to be able to undismiss jobs even when they autohide
- && notificationSettings.permanentJobPopups
- dismissed: model.dismissed || false
- closable: model.closable
-
- summary: model.summary
- body: model.body || ""
- icon: model.image || model.iconName
-
- urls: model.urls || []
-
- jobState: model.jobState || 0
- percentage: model.percentage || 0
- jobError: model.jobError || 0
- suspendable: !!model.suspendable
- killable: !!model.killable
- jobDetails: model.jobDetails || null
-
- configureActionLabel: model.configureActionLabel || ""
- // In the popup the default action is triggered by clicking on the popup
- // however in the list this is undesirable, so instead show a clickable button
- // in case you have a non-expired notification in history (do not disturb mode)
- // unless it has the same label as an action
- readonly property bool addDefaultAction: (model.hasDefaultAction
- && model.defaultActionLabel
- && (model.actionLabels || []).indexOf(model.defaultActionLabel) === -1) ? true : false
- actionNames: {
- var actions = (model.actionNames || []);
- if (addDefaultAction) {
- actions.unshift("default"); // prepend
- }
- return actions;
+ NotificationItem {
+ Layout.fillWidth: true
+
+ notificationType: model.type
+
+ inGroup: model.isInGroup
+
+ applicationName: model.applicationName
+ applicationIconSource: model.applicationIconName
+ originName: model.originName || ""
+
+ time: model.updated || model.created
+
+ // configure button on every single notifications is bit overwhelming
+ configurable: !inGroup && model.configurable
+
+ dismissable: model.type === NotificationManager.Notifications.JobType
+ && model.jobState !== NotificationManager.Notifications.JobStateStopped
+ && model.dismissed
+ // TODO would be nice to be able to undismiss jobs even when they autohide
+ && notificationSettings.permanentJobPopups
+ dismissed: model.dismissed || false
+ closable: model.closable
+
+ summary: model.summary
+ body: model.body || ""
+ icon: model.image || model.iconName
+
+ urls: model.urls || []
+
+ jobState: model.jobState || 0
+ percentage: model.percentage || 0
+ jobError: model.jobError || 0
+ suspendable: !!model.suspendable
+ killable: !!model.killable
+ jobDetails: model.jobDetails || null
+
+ configureActionLabel: model.configureActionLabel || ""
+ // In the popup the default action is triggered by clicking on the popup
+ // however in the list this is undesirable, so instead show a clickable button
+ // in case you have a non-expired notification in history (do not disturb mode)
+ // unless it has the same label as an action
+ readonly property bool addDefaultAction: (model.hasDefaultAction
+ && model.defaultActionLabel
+ && (model.actionLabels || []).indexOf(model.defaultActionLabel) === -1) ? true : false
+ actionNames: {
+ var actions = (model.actionNames || []);
+ if (addDefaultAction) {
+ actions.unshift("default"); // prepend
}
- actionLabels: {
- var labels = (model.actionLabels || []);
- if (addDefaultAction) {
- labels.unshift(model.defaultActionLabel);
- }
- return labels;
+ return actions;
+ }
+ actionLabels: {
+ var labels = (model.actionLabels || []);
+ if (addDefaultAction) {
+ labels.unshift(model.defaultActionLabel);
}
+ return labels;
+ }
- onCloseClicked: {
- historyModel.close(historyModel.index(index, 0));
- if (list.count === 0) {
- plasmoid.expanded = false;
- }
- }
- onDismissClicked: {
- model.dismissed = false;
+ onCloseClicked: {
+ historyModel.close(historyModel.index(index, 0));
+ if (list.count === 0) {
plasmoid.expanded = false;
}
- onConfigureClicked: historyModel.configure(historyModel.index(index, 0))
-
- onActionInvoked: {
- if (actionName === "default") {
- historyModel.invokeDefaultAction(historyModel.index(index, 0));
- } else {
- historyModel.invokeAction(historyModel.index(index, 0), actionName);
- }
- // Keep it in the history
- historyModel.expire(historyModel.index(index, 0));
- }
- onOpenUrl: {
- Qt.openUrlExternally(url);
- historyModel.expire(historyModel.index(index, 0));
- }
- onFileActionInvoked: historyModel.expire(historyModel.index(index, 0))
+ }
+ onDismissClicked: {
+ model.dismissed = false;
+ plasmoid.expanded = false;
+ }
+ onConfigureClicked: historyModel.configure(historyModel.index(index, 0))
- onSuspendJobClicked: historyModel.suspendJob(historyModel.index(index, 0))
- onResumeJobClicked: historyModel.resumeJob(historyModel.index(index, 0))
- onKillJobClicked: historyModel.killJob(historyModel.index(index, 0))
+ onActionInvoked: {
+ if (actionName === "default") {
+ historyModel.invokeDefaultAction(historyModel.index(index, 0));
+ } else {
+ historyModel.invokeAction(historyModel.index(index, 0), actionName);
+ }
+ // Keep it in the history
+ historyModel.expire(historyModel.index(index, 0));
}
- }
+ onOpenUrl: {
+ Qt.openUrlExternally(url);
+ historyModel.expire(historyModel.index(index, 0));
+ }
+ onFileActionInvoked: historyModel.expire(historyModel.index(index, 0))
- PlasmaComponents.ToolButton {
- Layout.preferredWidth: minimumWidth
- iconName: model.isGroupExpanded ? "arrow-up" : "arrow-down"
- text: model.isGroupExpanded ? i18n("Show Fewer")
- : i18nc("Expand to show n more notifications",
- "Show %1 More", (model.groupChildrenCount - model.expandedGroupChildrenCount))
- visible: (model.groupChildrenCount > model.expandedGroupChildrenCount || model.isGroupExpanded)
- && delegateLoader.ListView.nextSection !== delegateLoader.ListView.section
- onClicked: list.setGroupExpanded(model.index, !model.isGroupExpanded)
+ onSuspendJobClicked: historyModel.suspendJob(historyModel.index(index, 0))
+ onResumeJobClicked: historyModel.resumeJob(historyModel.index(index, 0))
+ onKillJobClicked: historyModel.killJob(historyModel.index(index, 0))
}
+ }
- PlasmaCore.SvgItem {
- Layout.fillWidth: true
- Layout.bottomMargin: units.smallSpacing
- elementId: "horizontal-line"
- svg: lineSvg
+ PlasmaComponents.ToolButton {
+ Layout.preferredWidth: minimumWidth
+ iconName: model.isGroupExpanded ? "arrow-up" : "arrow-down"
+ text: model.isGroupExpanded ? i18n("Show Fewer")
+ : i18nc("Expand to show n more notifications",
+ "Show %1 More", (model.groupChildrenCount - model.expandedGroupChildrenCount))
+ visible: (model.groupChildrenCount > model.expandedGroupChildrenCount || model.isGroupExpanded)
+ && delegateLoader.ListView.nextSection !== delegateLoader.ListView.section
+ onClicked: list.setGroupExpanded(model.index, !model.isGroupExpanded)
+ }
- // property is only atached to the delegate itself (the Loader in our case)
- visible: (!model.isInGroup || delegateLoader.ListView.nextSection !== delegateLoader.ListView.section)
- && delegateLoader.ListView.nextSection !== "" // don't show after last item
- }
+ PlasmaCore.SvgItem {
+ Layout.fillWidth: true
+ Layout.bottomMargin: units.smallSpacing
+ elementId: "horizontal-line"
+ svg: lineSvg
+
+ // property is only atached to the delegate itself (the Loader in our case)
+ visible: (!model.isInGroup || delegateLoader.ListView.nextSection !== delegateLoader.ListView.section)
+ && delegateLoader.ListView.nextSection !== "" // don't show after last item
}
}
}
}
PlasmaExtras.Heading {
width: list.width
- height: list.height
- horizontalAlignment: Kirigami.Settings.isMobile ? Text.AlignHCenter : Text.AlignLeft
- verticalAlignment: Kirigami.Settings.isMobile ? Text.AlignVCenter : Text.AlignTop
- wrapMode: Text.WordWrap
level: 3
opacity: 0.6
text: i18n("No unread notifications.")
diff --git a/applets/systemtray/package/contents/ui/ExpandedRepresentation.qml b/applets/systemtray/package/contents/ui/ExpandedRepresentation.qml
--- a/applets/systemtray/package/contents/ui/ExpandedRepresentation.qml
+++ b/applets/systemtray/package/contents/ui/ExpandedRepresentation.qml
@@ -17,125 +17,128 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import QtQuick 2.12
-import QtQuick.Layouts 1.12
-
+import QtQuick 2.1
+import QtQuick.Layouts 1.1
import org.kde.plasma.core 2.0 as PlasmaCore
-import org.kde.plasma.components 3.0 as PlasmaComponents
+import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.extras 2.0 as PlasmaExtras
-ColumnLayout {
+Item {
id: expandedRepresentation
+
//set width/height to avoid an useless Dialog resize
width: Layout.minimumWidth
height: Layout.minimumHeight
Layout.minimumWidth: units.gridUnit * 24
Layout.minimumHeight: units.gridUnit * 21
Layout.preferredWidth: Layout.minimumWidth
Layout.preferredHeight: Layout.minimumHeight * 1.5
- spacing: 0 // avoid gap between title and content
property alias activeApplet: container.activeApplet
property alias hiddenLayout: hiddenItemsView.layout
- RowLayout {
- Layout.maximumWidth: parent.width //otherwise the pin button disappears in noApplet mode
+ PlasmaComponents.ToolButton {
+ id: pinButton
+ anchors.right: parent.right
+ width: Math.round(units.gridUnit * 1.25)
+ height: width
+ checkable: true
+ checked: plasmoid.configuration.pin
+ onCheckedChanged: plasmoid.configuration.pin = checked
+ iconSource: "window-pin"
+ z: 2
+ tooltip: i18n("Keep Open")
+ }
- PlasmaExtras.Heading {
- id: heading
- level: 1
- Layout.leftMargin: {
- //Menu mode
- if (!activeApplet && hiddenItemsView.visible && !LayoutMirroring.enabled) {
- return units.smallSpacing;
+ PlasmaExtras.Heading {
+ id: heading
+ level: 1
- //applet open, sidebar
- } else if (activeApplet && hiddenItemsView.visible && !LayoutMirroring.enabled) {
- return hiddenItemsView.width + units.largeSpacing;
-
- //applet open, no sidebar
- } else {
- return 0;
- }
- }
- Layout.rightMargin: {
+ anchors {
+ left: parent.left
+ top: parent.top
+ right: parent.right
+ topMargin: hiddenItemsView.visible ? units.smallSpacing : 0
+ leftMargin: {
//Menu mode
- if (!activeApplet && hiddenItemsView.visible && LayoutMirroring.enabled) {
+ if (!activeApplet && hiddenItemsView.visible) {
return units.smallSpacing;
//applet open, sidebar
- } else if (activeApplet && hiddenItemsView.visible && LayoutMirroring.enabled) {
- return hiddenItemsView.width + units.largeSpacing;
+ } else if (activeApplet && hiddenItemsView.visible) {
+ return hiddenItemsView.iconColumnWidth + units.largeSpacing;
//applet open, no sidebar
} else {
- return 0;
+ return units.smallSpacing;
}
}
+ }
- visible: activeApplet
- text: activeApplet ? activeApplet.title : ""
- MouseArea {
- anchors.fill: parent
- onClicked: {
- if (activeApplet) {
- activeApplet.expanded = false;
- dialog.visible = true;
- }
+ visible: activeApplet
+ text: activeApplet ? activeApplet.title : ""
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ if (activeApplet) {
+ activeApplet.expanded = false;
+ dialog.visible = true;
}
}
}
-
- PlasmaExtras.Heading {
- id: noAppletHeading
- level: 1
- text: i18n("Status and Notifications")
- visible: !heading.visible
+ }
+ PlasmaExtras.Heading {
+ id: noAppletHeading
+ level: 1
+ anchors {
+ left: parent.left
+ top: parent.top
+ right: parent.right
+ topMargin: hiddenItemsView.visible ? units.smallSpacing : 0
+ leftMargin: units.smallSpacing
}
+ text: i18n("Status and Notifications")
+ visible: !heading.visible
+ }
- //spacer
- Item {
- Layout.fillWidth: true
+ PlasmaCore.SvgItem {
+ anchors {
+ left: parent.left
+ leftMargin: hiddenLayout.width
+ top: parent.top
+ bottom: parent.bottom
+ margins: -units.gridUnit
}
- PlasmaComponents.ToolButton {
- id: pinButton
- checkable: true
- checked: plasmoid.configuration.pin
- onCheckedChanged: plasmoid.configuration.pin = checked
- icon.name: "window-pin"
- PlasmaComponents.ToolTip {
- text: i18n("Keep Open")
- }
- }
- }
+ visible: hiddenItemsView.visible && activeApplet
+ width: lineSvg.elementSize("vertical-line").width
- RowLayout {
- spacing: 0 // must be 0 so that the separator is as close to the indicator as possible
+ elementId: "vertical-line"
- HiddenItemsView {
- id: hiddenItemsView
- Layout.preferredWidth: visible && activeApplet ? iconColumnWidth : expandedRepresentation.width
- Layout.fillHeight: true
+ svg: PlasmaCore.Svg {
+ id: lineSvg;
+ imagePath: "widgets/line"
}
+ }
- PlasmaCore.SvgItem {
- visible: hiddenItemsView.visible && activeApplet
- Layout.fillHeight: true
- Layout.preferredWidth: lineSvg.elementSize("vertical-line").width
- elementId: "vertical-line"
- svg: PlasmaCore.Svg {
- id: lineSvg;
- imagePath: "widgets/line"
- }
+ HiddenItemsView {
+ id: hiddenItemsView
+ anchors {
+ left: parent.left
+ top: noAppletHeading.bottom
+ topMargin: units.smallSpacing
+ bottom: parent.bottom
}
+ }
- PlasmoidPopupsContainer {
- id: container
- Layout.fillWidth: true
- Layout.fillHeight: true
- Layout.leftMargin: hiddenItemsView.visible && activeApplet && !LayoutMirroring.enabled ? units.largeSpacing : 0
- Layout.rightMargin: hiddenItemsView.visible && activeApplet && LayoutMirroring.enabled ? units.largeSpacing : 0
+ PlasmoidPopupsContainer {
+ id: container
+ anchors {
+ left: parent.left
+ right: parent.right
+ top: heading.bottom
+ bottom: parent.bottom
+ leftMargin: hiddenItemsView.visible ? hiddenItemsView.iconColumnWidth + units.largeSpacing : 0
}
}
}
diff --git a/wallpapers/image/imagepackage/contents/config/main.xml b/wallpapers/image/imagepackage/contents/config/main.xml
--- a/wallpapers/image/imagepackage/contents/config/main.xml
+++ b/wallpapers/image/imagepackage/contents/config/main.xml
@@ -8,7 +8,7 @@
- false
+ false
@@ -34,6 +34,17 @@
1000
+
+ false
+
+
+
+ 40
+
+
+
+ 400
+
diff --git a/wallpapers/image/imagepackage/contents/ui/WindowModel.qml b/wallpapers/image/imagepackage/contents/ui/WindowModel.qml
new file mode 100644
--- /dev/null
+++ b/wallpapers/image/imagepackage/contents/ui/WindowModel.qml
@@ -0,0 +1,68 @@
+import QtQuick 2.1
+import QtQuick.Controls 1.0
+import QtQuick.Layouts 1.3
+import QtQuick.Window 2.1
+import org.kde.plasma.core 2.0 as PlasmaCore
+
+import org.kde.taskmanager 0.1 as TaskManager
+
+Item {
+ property alias screenGeometry: tasksModel.screenGeometry
+ property bool noWindowActive: true
+ property bool currentWindowMaximized: false
+ property bool isActiveWindowPinned: false
+
+ TaskManager.VirtualDesktopInfo { id: virtualDesktopInfo }
+ TaskManager.ActivityInfo { id: activityInfo }
+ TaskManager.TasksModel {
+ id: tasksModel
+ sortMode: TaskManager.TasksModel.SortVirtualDesktop
+ groupMode: TaskManager.TasksModel.GroupDisabled
+
+ activity: activityInfo.currentActivity
+ virtualDesktop: virtualDesktopInfo.currentDesktop
+ screenGeometry: wallpaper.screenGeometry // Warns "Unable to assign [undefined] to QRect" during init, but works thereafter.
+
+ filterByActivity: true
+ filterByVirtualDesktop: true
+ filterByScreen: true
+
+ onActiveTaskChanged: {
+ // console.log('tasksModel.onActiveTaskChanged')
+ updateActiveWindowInfo()
+ }
+ onDataChanged: {
+ // console.log('tasksModel.onDataChanged')
+ updateActiveWindowInfo()
+ }
+ Component.onCompleted: {
+ // console.log('tasksModel.Component.onCompleted')
+ activeWindowModel.sourceModel = tasksModel
+ }
+ }
+ PlasmaCore.SortFilterModel {
+ id: activeWindowModel
+ filterRole: 'IsActive'
+ filterRegExp: 'true'
+ onDataChanged: {
+ // console.log('activeWindowModel.onDataChanged')
+ updateActiveWindowInfo()
+ }
+ onCountChanged: {
+ // console.log('activeWindowModel.onCountChanged')
+ updateActiveWindowInfo()
+ }
+ }
+
+
+ function activeTask() {
+ return activeWindowModel.get(0) || {}
+ }
+
+ function updateActiveWindowInfo() {
+ var actTask = activeTask()
+ noWindowActive = activeWindowModel.count === 0 || actTask.IsActive !== true
+ currentWindowMaximized = !noWindowActive && actTask.IsMaximized === true
+ isActiveWindowPinned = actTask.VirtualDesktop === -1
+ }
+}
diff --git a/wallpapers/image/imagepackage/contents/ui/config.qml b/wallpapers/image/imagepackage/contents/ui/config.qml
--- a/wallpapers/image/imagepackage/contents/ui/config.qml
+++ b/wallpapers/image/imagepackage/contents/ui/config.qml
@@ -40,6 +40,9 @@
property var cfg_SlidePaths: ""
property int cfg_SlideInterval: 0
property var cfg_UncheckedSlides: []
+ property int cfg_AnimationDuration: 400
+ property int cfg_BlurRadius: 40
+ property alias cfg_BlurWallpaper: wallpaperBlurCheckBox.checked
function saveConfig() {
imageWallpaper.commitDeletion();
@@ -82,6 +85,7 @@
Kirigami.FormLayout {
twinFormLayouts: parentLayout
+
QtControls2.ComboBox {
id: resizeComboBox
Kirigami.FormData.label: i18nd("plasma_wallpaper_org.kde.image", "Positioning:")
@@ -187,6 +191,7 @@
dialogTitle: i18nd("plasma_wallpaper_org.kde.image", "Select Background Color")
}
}
+
}
Component {
@@ -355,6 +360,57 @@
}
}
+ Kirigami.FormLayout {
+ twinFormLayouts: parentLayout
+ Row {
+ id: inactiveBlurRow
+ spacing: units.largeSpacing / 2
+ Kirigami.FormData.label: i18n("Blur on active window:")
+ QtControls2.CheckBox {
+ id: wallpaperBlurCheckBox
+ anchors.verticalCenter: blurRadiusSpinBox.verticalCenter
+ }
+ QtControls2.Label {
+ anchors.verticalCenter: blurRadiusSpinBox.verticalCenter
+ text: i18n(" by ")
+ }
+ QtControls2.SpinBox {
+ id: blurRadiusSpinBox
+ value: cfg_BlurRadius
+ onValueChanged: cfg_BlurRadius = value
+ stepSize: 1
+ from: 1
+ to: 400
+ editable: true
+ }
+ QtControls2.Label {
+ anchors.verticalCenter: blurRadiusSpinBox.verticalCenter
+ text: i18n(" over ")
+ }
+ QtControls2.SpinBox {
+ id: animationDurationSpinBox
+ value: cfg_AnimationDuration
+ onValueChanged: cfg_AnimationDuration = value
+ from: 0
+ to: 2000000000
+ stepSize: 100
+ editable: true
+
+ textFromValue: function(value, locale) {
+ return i18n("%1ms", value)
+ }
+ valueFromText: function(text, locale) {
+ // Number.fromLocaleString() doesn't strip suffix and raises an error.
+ // return Number.fromLocaleString(locale, text)
+
+ // parseInt does seem to stip non-digit characters, but it probably
+ // only works with ASCII digits?
+ return parseInt(text, 10)
+ }
+ }
+ }
+ }
+
RowLayout {
id: buttonsRow
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
diff --git a/wallpapers/image/imagepackage/contents/ui/main.qml b/wallpapers/image/imagepackage/contents/ui/main.qml
--- a/wallpapers/image/imagepackage/contents/ui/main.qml
+++ b/wallpapers/image/imagepackage/contents/ui/main.qml
@@ -27,7 +27,7 @@
QQC2.StackView {
id: root
-
+ anchors.fill: parent
readonly property string modelImage: imageWallpaper.wallpaperPath
readonly property string configuredImage: wallpaper.configuration.Image
readonly property int fillMode: wallpaper.configuration.FillMode
@@ -48,6 +48,10 @@
function action_open() {
Qt.openUrlExternally(modelImage)
}
+
+ WindowModel {
+ id: windowModel
+ }
//private
@@ -94,6 +98,9 @@
"color": root.configColor,
"blur": root.blur,
"opacity": isFirst ? 1: 0});
+ var pendingBlur = baseBlur.createObject(root, {"source": pendingImage,
+ "anchors.fill": pendingImage
+ })
function replaceWhenLoaded() {
if (pendingImage.status !== Image.Loading) {
@@ -107,6 +114,16 @@
pendingImage.statusChanged.connect(replaceWhenLoaded);
replaceWhenLoaded();
}
+
+ Component {
+ id: baseBlur
+ FastBlur {
+ radius: ((!wallpaper.configuration.BlurWallpaper) || windowModel.noWindowActive) ? 0 : wallpaper.configuration.BlurRadius
+ Behavior on radius {
+ NumberAnimation { duration: wallpaper.configuration.BlurAnimationDuration }
+ }
+ }
+ }
Component {
id: baseImage