1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-01-13 05:17:48 +03:00

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
This commit is contained in:
Michail Vourlakos 2019-03-27 00:57:46 +02:00
parent 9d33619415
commit 614ec3ea48
4 changed files with 34 additions and 8 deletions

View File

@ -546,8 +546,28 @@ Item {
}
//! Applet Shortcut Visual Badge
ShortcutBadge{
anchors.fill: wrapper
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{
// anchors.fill: wrapper
}
}
}

View File

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

View File

@ -284,7 +284,7 @@ Item{
property bool showProgress: root.showProgressBadge && taskIcon.smartLauncherItem && !taskItem.isSeparator
&& 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 {
NumberAnimation { duration: root.durationTime*2*units.longDuration }
@ -530,7 +530,9 @@ Item{
}
//! Effects
ShortcutBadge{}
ShortcutBadge{
id: shortcutBadge
}
}
VisualAddItem{

View File

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