move shortcut badges at top left corner

--this way the elements are observed better and
the user is able to both watch out the items and
the shortcut that activates them
pull/5/head
Michail Vourlakos 6 years ago
parent 9d33619415
commit 614ec3ea48

@ -546,8 +546,28 @@ Item {
} }
//! Applet Shortcut Visual Badge //! Applet Shortcut Visual Badge
Item {
anchors.centerIn: parent
width: {
if (root.isHorizontal) {
return rectangled ? root.iconSize * wrapper.zoomScale : wrapper.width
} else {
return root.iconSize * wrapper.zoomScale
}
}
height: {
if (root.isHorizontal) {
return root.iconSize * wrapper.zoomScale
} else {
return rectangled ? root.iconSize * wrapper.zoomScale : wrapper.height
}
}
property bool rectangled: canBeHovered && !lockZoom
ShortcutBadge{ ShortcutBadge{
anchors.fill: wrapper // anchors.fill: wrapper
}
} }
} }

@ -97,14 +97,16 @@ Loader{
LatteComponents.BadgeText { LatteComponents.BadgeText {
id: appletNumber id: appletNumber
anchors.centerIn: parent anchors.top: parent.top
anchors.left: parent.left
//anchors.centerIn: parent
minimumWidth: 0.4 * (wrapper.zoomScale * root.iconSize) minimumWidth: 0.4 * (wrapper.zoomScale * root.iconSize)
height: Math.max(24, 0.4 * (wrapper.zoomScale * root.iconSize)) height: Math.max(24, 0.4 * (wrapper.zoomScale * root.iconSize))
border.color: root.minimizedDotColor border.color: root.minimizedDotColor
proportion: 0 proportion: 0
radiusPerCentage: 50 radiusPerCentage: 100
showNumber: false showNumber: false
showText: true showText: true
textValue: appletNumberLoader.badgeString textValue: appletNumberLoader.badgeString

@ -284,7 +284,7 @@ Item{
property bool showProgress: root.showProgressBadge && taskIcon.smartLauncherItem && !taskItem.isSeparator property bool showProgress: root.showProgressBadge && taskIcon.smartLauncherItem && !taskItem.isSeparator
&& taskIcon.smartLauncherItem.progressVisible && taskIcon.smartLauncherItem.progressVisible
property bool showAudio: root.showAudioBadge && taskItem.hasAudioStream && taskItem.playingAudio && !taskItem.isSeparator property bool showAudio: (root.showAudioBadge && taskItem.hasAudioStream && taskItem.playingAudio && !taskItem.isSeparator) && !shortcutBadge.active
Behavior on activateProgress { Behavior on activateProgress {
NumberAnimation { duration: root.durationTime*2*units.longDuration } NumberAnimation { duration: root.durationTime*2*units.longDuration }
@ -530,7 +530,9 @@ Item{
} }
//! Effects //! Effects
ShortcutBadge{} ShortcutBadge{
id: shortcutBadge
}
} }
VisualAddItem{ VisualAddItem{

@ -58,7 +58,9 @@ Loader{
LatteComponents.BadgeText { LatteComponents.BadgeText {
id: taskNumber id: taskNumber
anchors.centerIn: parent anchors.left: parent.left
anchors.top: parent.top
//anchors.centerIn: parent
minimumWidth: 0.4 * (wrapper.mScale * root.iconSize) minimumWidth: 0.4 * (wrapper.mScale * root.iconSize)
height: Math.max(24, 0.4 * (wrapper.mScale * root.iconSize)) height: Math.max(24, 0.4 * (wrapper.mScale * root.iconSize))
@ -69,7 +71,7 @@ Loader{
showText: true showText: true
proportion: 0 proportion: 0
radiusPerCentage: 50 radiusPerCentage: 100
} }
} }
} }

Loading…
Cancel
Save