diff --git a/containment/package/contents/config/main.xml b/containment/package/contents/config/main.xml index b672ec83f..a482f1d83 100644 --- a/containment/package/contents/config/main.xml +++ b/containment/package/contents/config/main.xml @@ -275,10 +275,7 @@ 0 - - - true - + false @@ -302,7 +299,13 @@ true - + + true + + + true + + true diff --git a/containment/package/contents/ui/main.qml b/containment/package/contents/ui/main.qml index 244462140..487fbe593 100644 --- a/containment/package/contents/ui/main.qml +++ b/containment/package/contents/ui/main.qml @@ -135,7 +135,6 @@ DragDrop.DropArea { property bool dockIsShownCompletely: !(dockIsHidden || inSlidingIn || inSlidingOut) && !root.editMode property bool immutable: plasmoid.immutable - property bool indicateAudioStreams: plasmoid.configuration.indicateAudioStreams property bool inFullJustify: (plasmoid.configuration.panelPosition === Latte.Types.Justify) && (plasmoid.configuration.maxLength===100) property bool inSlidingIn: visibilityManager ? visibilityManager.inSlidingIn : false property bool inSlidingOut: visibilityManager ? visibilityManager.inSlidingOut : false @@ -393,13 +392,17 @@ DragDrop.DropArea { !plasmoid.configuration.reverseLinesPosition : plasmoid.configuration.reverseLinesPosition property bool showGlow: plasmoid.configuration.showGlow || plasmoid.configuration.glowOption!==Latte.Types.GlowNone property bool glow3D: plasmoid.configuration.glow3D + + property bool showInfoBadge: plasmoid.configuration.showInfoBadge + property bool showProgressBadge: plasmoid.configuration.showProgressBadge + property bool showAudioBadge: plasmoid.configuration.showAudioBadge + property bool showWindowActions: plasmoid.configuration.showWindowActions property bool showWindowsOnlyFromLaunchers: plasmoid.configuration.showWindowsOnlyFromLaunchers property bool showOnlyCurrentScreen: plasmoid.configuration.showOnlyCurrentScreen property bool showOnlyCurrentDesktop: plasmoid.configuration.showOnlyCurrentDesktop property bool showOnlyCurrentActivity: plasmoid.configuration.showOnlyCurrentActivity - property bool smartLaunchersEnabled: plasmoid.configuration.smartLaunchersEnabled property bool threeColorsWindows: plasmoid.configuration.threeColorsWindows property bool titleTooltips: plasmoid.configuration.titleTooltips property bool unifiedGlobalShortcuts: plasmoid.configuration.unifiedGlobalShortcuts diff --git a/plasmoid/package/contents/config/main.xml b/plasmoid/package/contents/config/main.xml index d234bd5bb..b097937e0 100644 --- a/plasmoid/package/contents/config/main.xml +++ b/plasmoid/package/contents/config/main.xml @@ -53,9 +53,6 @@ 0 - - true - true @@ -107,7 +104,13 @@ false - + + true + + + true + + true diff --git a/plasmoid/package/contents/ui/config/ConfigInteraction.qml b/plasmoid/package/contents/ui/config/ConfigInteraction.qml index 9b30d9e42..1f22c246e 100644 --- a/plasmoid/package/contents/ui/config/ConfigInteraction.qml +++ b/plasmoid/package/contents/ui/config/ConfigInteraction.qml @@ -39,7 +39,7 @@ Item { property alias cfg_showOnlyCurrentActivity: showOnlyCurrentActivity.checked property alias cfg_highlightWindows: highlightWindowsChk.checked - property alias cfg_smartLaunchersEnabled: smartLaunchersChk.checked + property alias cfg_showInfoBadge: showInfoBadgeChk.checked property alias cfg_showToolTips: showPreviewsChk.checked property alias cfg_showWindowActions: windowActionsChk.checked @@ -79,7 +79,7 @@ Item { } CheckBox { - id: smartLaunchersChk + id: showInfoBadgeChk Layout.fillWidth: true text: i18n("Show progress information for tasks") } diff --git a/plasmoid/package/contents/ui/main.qml b/plasmoid/package/contents/ui/main.qml index 22ccd216a..4fa10b050 100644 --- a/plasmoid/package/contents/ui/main.qml +++ b/plasmoid/package/contents/ui/main.qml @@ -153,12 +153,15 @@ Item { property bool groupTasksByDefault: latteView ? latteView.groupTasksByDefault: true property bool highlightWindows: latteView ? latteView.hoverAction === Latte.Types.HighlightWindows || latteView.hoverAction === Latte.Types.PreviewAndHighlightWindows : plasmoid.configuration.highlightWindows - property bool indicateAudioStreams: latteView ? latteView.indicateAudioStreams : plasmoid.configuration.indicateAudioStreams property bool mouseWheelActions: latteView ? latteView.mouseWheelActions : true property bool reverseLinesPosition: latteView ? latteView.reverseLinesPosition : plasmoid.configuration.reverseLinesPosition property bool dotsOnActive: latteView ? latteView.dotsOnActive : plasmoid.configuration.dotsOnActive property bool showGlow: latteView ? latteView.showGlow : plasmoid.configuration.showGlow property bool glow3D: latteView ? latteView.glow3D : false + + property bool showInfoBadge: latteView ? latteView.showInfoBadge : plasmoid.configuration.showInfoBadge + property bool showProgressBadge: latteView ? latteView.showProgressBadge : plasmoid.configuration.showInfoBadge + property bool showAudioBadge: latteView ? latteView.showAudioBadge : plasmoid.configuration.showAudioBadge property bool showOnlyCurrentScreen: latteView ? latteView.showOnlyCurrentScreen : plasmoid.configuration.showOnlyCurrentScreen property bool showOnlyCurrentDesktop: latteView ? latteView.showOnlyCurrentDesktop : plasmoid.configuration.showOnlyCurrentDesktop property bool showOnlyCurrentActivity: latteView ? latteView.showOnlyCurrentActivity : plasmoid.configuration.showOnlyCurrentActivity @@ -166,7 +169,7 @@ Item { plasmoid.configuration.showToolTips property bool showWindowActions: latteView ? latteView.showWindowActions : plasmoid.configuration.showWindowActions property bool showWindowsOnlyFromLaunchers: latteView ? latteView.showWindowsOnlyFromLaunchers : false - property bool smartLaunchersEnabled: latteView ? latteView.smartLaunchersEnabled : plasmoid.configuration.smartLaunchersEnabled + property bool threeColorsWindows: latteView ? latteView.threeColorsWindows : plasmoid.configuration.threeColorsWindows property bool titleTooltips: latteView ? latteView.titleTooltips : false property alias windowPreviewIsShown: windowsPreviewDlg.visible @@ -923,7 +926,7 @@ Item { Loader { id: pulseAudio source: "PulseAudio.qml" - active: root.indicateAudioStreams + active: root.showAudioBadge } ParabolicManager{ diff --git a/plasmoid/package/contents/ui/task/IconItem.qml b/plasmoid/package/contents/ui/task/IconItem.qml index 228de5c31..81e7b5d58 100644 --- a/plasmoid/package/contents/ui/task/IconItem.qml +++ b/plasmoid/package/contents/ui/task/IconItem.qml @@ -61,7 +61,7 @@ Item{ property int shadowSize : root.appShadowSize - readonly property bool smartLauncherEnabled: ((taskItem.isStartup === false) && (root.smartLaunchersEnabled)) + readonly property bool smartLauncherEnabled: ((taskItem.isStartup === false) && (root.showInfoBadge || root.showProgressBadge)) readonly property variant iconDecoration: decoration property QtObject buffers: null property QtObject smartLauncherItem: null @@ -287,14 +287,15 @@ Item{ active: opacityN > 0 asynchronous: true - property real opacityN: showProgress || showAudio ? 1 : 0 + property real opacityN: showInfo || showProgress || showAudio ? 1 : 0 - property bool showProgress: (taskIcon.smartLauncherEnabled && taskIcon.smartLauncherItem && !taskItem.isSeparator - && (taskIcon.smartLauncherItem.countVisible || taskIcon.smartLauncherItem.progressVisible - || taskItem.badgeIndicator > 0)) + property bool showInfo: (root.showInfoBadge && taskIcon.smartLauncherItem && !taskItem.isSeparator + && (taskIcon.smartLauncherItem.countVisible || taskItem.badgeIndicator > 0)) - property bool showAudio: taskItem.hasAudioStream && taskItem.playingAudio && - !taskItem.isSeparator + property bool showProgress: root.showProgressBadge && taskIcon.smartLauncherItem && !taskItem.isSeparator + && taskIcon.smartLauncherItem.progressVisible + + property bool showAudio: root.showAudioBadge && taskItem.hasAudioStream && taskItem.playingAudio && !taskItem.isSeparator Behavior on opacityN { NumberAnimation { duration: root.durationTime*2*units.longDuration } @@ -325,7 +326,7 @@ Item{ width: Math.max(infoBadge.contentWidth, parent.width / 2) height: parent.height / 2 radius: parent.height - visible: badgesLoader.showProgress + visible: badgesLoader.showInfo || badgesLoader.showProgress //! Removes any remainings from the icon around the roundness at the corner Rectangle{ @@ -428,7 +429,7 @@ Item{ id: infoBadge anchors.fill:parent opacity: badgesLoader.opacityN - visible: badgesLoader.showProgress + visible: badgesLoader.showInfo || badgesLoader.showProgress } AudioStream{ diff --git a/plasmoid/package/contents/ui/task/ProgressOverlay.qml b/plasmoid/package/contents/ui/task/ProgressOverlay.qml index 1d43f8dbf..4fb97dfd5 100644 --- a/plasmoid/package/contents/ui/task/ProgressOverlay.qml +++ b/plasmoid/package/contents/ui/task/ProgressOverlay.qml @@ -61,17 +61,26 @@ Item { border.color: root.minimizedDotColor minimumWidth: 0.8 * parent.height height: 0.8 * parent.height - numberValue: taskItem.badgeIndicator > 0 ? taskItem.badgeIndicator : taskIcon.smartLauncherItem.count + numberValue: { + if (taskItem.badgeIndicator > 0) { + return taskItem.badgeIndicator; + } else if (taskIcon.smartLauncherItem) { + return taskIcon.smartLauncherItem.count; + } + + return 0; + } fullCircle: true showNumber: true - textWithBackgroundColor: ( (taskItem.badgeIndicator > 0) - || (taskIcon.smartLauncherItem.countVisible && !taskIcon.smartLauncherItem.progressVisible) ) - && proportion>0 + /*textWithBackgroundColor: ( (taskItem.badgeIndicator > 0) + || (taskIcon.smartLauncherItem && taskIcon.smartLauncherItem.countVisible && !taskIcon.smartLauncherItem.progressVisible) ) + && proportion>0*/ + textWithBackgroundColor: false proportion: { if (taskItem.badgeIndicator > 0 || - (taskIcon.smartLauncherItem.countVisible && !taskIcon.smartLauncherItem.progressVisible)) { + (taskIcon.smartLauncherItem && taskIcon.smartLauncherItem.countVisible && !taskIcon.smartLauncherItem.progressVisible)) { return 100; } diff --git a/plasmoid/package/contents/ui/task/TaskItem.qml b/plasmoid/package/contents/ui/task/TaskItem.qml index a8f1dc1aa..6ea308ea9 100644 --- a/plasmoid/package/contents/ui/task/TaskItem.qml +++ b/plasmoid/package/contents/ui/task/TaskItem.qml @@ -188,7 +188,7 @@ MouseArea{ ////// Audio streams ////// property Item audioStreamOverlay property var audioStreams: [] - readonly property bool hasAudioStream: root.indicateAudioStreams && audioStreams.length > 0 && !isLauncher + readonly property bool hasAudioStream: root.showAudioBadge && audioStreams.length > 0 && !isLauncher readonly property bool playingAudio: hasAudioStream && audioStreams.some(function (item) { return !item.corked }) @@ -1387,7 +1387,7 @@ MouseArea{ //trying to fix #440, showing the audio icon indicator to irrelevant tasks //after dragging an existent task with audio onDragSourceChanged: taskItem.updateAudioStreams() - onIndicateAudioStreamsChanged: taskItem.updateAudioStreams() + onShowAudioBadgeChanged: taskItem.updateAudioStreams() } Connections { diff --git a/shell/package/contents/configuration/pages/TasksConfig.qml b/shell/package/contents/configuration/pages/TasksConfig.qml index cc03b1ead..30cdc2d6c 100644 --- a/shell/package/contents/configuration/pages/TasksConfig.qml +++ b/shell/package/contents/configuration/pages/TasksConfig.qml @@ -70,46 +70,67 @@ PlasmaComponents.Page { } PlasmaComponents.CheckBox { - id: audioIndicatorChk + id: dotsOnActive Layout.leftMargin: units.smallSpacing * 2 - text: i18n("Indicator for audio streams") - checked: plasmoid.configuration.indicateAudioStreams - tooltip: i18n("Audio indicator from which the user can mute/unmute an app") + text: i18n("Show an extra dot for grouped windows when active") + checked: plasmoid.configuration.dotsOnActive + tooltip: i18n("Grouped windows show both a line and a dot when \none of them is active and the Line Active Indicator \nis enabled") visible: dialog.highLevel + enabled: plasmoid.configuration.activeIndicatorType === Latte.Types.LineIndicator onClicked: { - plasmoid.configuration.indicateAudioStreams = checked + plasmoid.configuration.dotsOnActive = checked } } + } + //! END: Tasks Appearance + + //! BEGIN: Badges + ColumnLayout { + spacing: units.smallSpacing + Layout.topMargin: units.smallSpacing + Layout.rightMargin: units.smallSpacing * 2 + visible: dialog.highLevel + + LatteExtraControls.Header { + text: i18n("Badges") + } + PlasmaComponents.CheckBox { - id: smartLaunchersChk Layout.leftMargin: units.smallSpacing * 2 - text: i18n("Progress information for tasks") - checked: plasmoid.configuration.smartLaunchersEnabled - tooltip: i18n("Show a beautiful progress animation e.g. when copying \nfiles with Dolphin") + text: i18n("Unread messages from tasks") + checked: plasmoid.configuration.showInfoBadge + tooltip: i18n("Show unread messages or information from tasks") onClicked: { - plasmoid.configuration.smartLaunchersEnabled = checked + plasmoid.configuration.showInfoBadge = checked } } PlasmaComponents.CheckBox { - id: dotsOnActive Layout.leftMargin: units.smallSpacing * 2 - text: i18n("Show an extra dot for grouped windows when active") - checked: plasmoid.configuration.dotsOnActive - tooltip: i18n("Grouped windows show both a line and a dot when \none of them is active and the Line Active Indicator \nis enabled") - visible: dialog.highLevel - enabled: plasmoid.configuration.activeIndicatorType === Latte.Types.LineIndicator + text: i18n("Progress information for tasks") + checked: plasmoid.configuration.showProgressBadge + tooltip: i18n("Show a progress animation for tasks e.g. when copying files with Dolphin") onClicked: { - plasmoid.configuration.dotsOnActive = checked + plasmoid.configuration.showProgressBadge = checked } } + PlasmaComponents.CheckBox { + Layout.leftMargin: units.smallSpacing * 2 + text: i18n("Audio playing from tasks") + checked: plasmoid.configuration.showAudioBadge + tooltip: i18n("Show audio playing from tasks, the user is able to mute/unmute or change the volume") + + onClicked: { + plasmoid.configuration.showAudioBadge = checked + } + } } - //! END: Tasks Appearance + //! END: Badges //! BEGIN: Tasks Interaction ColumnLayout {