Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions panels/dock/taskmanager/package/AppItem.qml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Item {
property int iconSize: Panel.rootObject.dockItemMaxSize * 9 / 14
property bool enableTitle: false
property bool titleActive: enableTitle && titleLoader.active

property int appTitleSpacing: 0
property var iconGlobalPoint: {
var a = icon
var x = 0, y = 0
Expand Down Expand Up @@ -79,7 +79,7 @@ Item {
Control {
anchors.fill: parent
id: appItem
implicitWidth: root.titleActive ? (iconContainer.width + 4 + titleLoader.width) : iconContainer.width
implicitWidth: root.titleActive ? (iconContainer.width + titleLoader.width + root.appTitleSpacing) : iconContainer.width
visible: !root.Drag.active // When in dragging, hide app item

Item {
Expand Down Expand Up @@ -273,6 +273,7 @@ Item {
}

HoverHandler {
id: hoverHandler
onHoveredChanged: function () {
if (hovered) {
root.onEntered()
Expand Down
7 changes: 6 additions & 1 deletion panels/dock/taskmanager/package/TaskManager.qml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ ContainmentItem {
property int dockOrder: 16
property real remainingSpacesForTaskManager: Panel.itemAlignment === Dock.LeftAlignment ? Panel.rootObject.dockLeftSpaceForCenter : Panel.rootObject.dockRemainingSpaceForCenter

readonly property int appItemIconSize: Math.round(Panel.rootObject.dockItemMaxSize * 9 / 14)
readonly property int appItemCellWidth: Math.round(Panel.rootObject.dockItemMaxSize * 0.8)
readonly property int appItemSpacing: Math.max(0, Math.max(10, Math.round(appItemIconSize / 3)) - Math.max(0, appItemCellWidth - appItemIconSize))
readonly property int appTitleSpacing: Math.max(10, appItemIconSize / 3)
property real remainingSpacesForSplitWindow: Panel.rootObject.dockLeftSpaceForCenter - (
(Panel.rootObject.dockCenterPartCount - 1) * (visualModel.cellWidth + appContainer.spacing) + (Panel.rootObject.dockCenterPartCount) * Panel.rootObject.dockPartSpacing)
// 用于居中计算的实际应用区域尺寸
Expand Down Expand Up @@ -73,7 +77,7 @@ ContainmentItem {
id: appContainer
anchors.fill: parent
useColumnLayout: taskmanager.useColumnLayout
spacing: Panel.rootObject.itemSpacing + visualModel.count % 2
spacing: taskmanager.appItemSpacing
remove: Transition {
NumberAnimation {
properties: "scale,opacity"
Expand Down Expand Up @@ -173,6 +177,7 @@ ContainmentItem {
blendOpacity: taskmanager.blendOpacity
title: delegateRoot.title
enableTitle: textCalculator.enabled
appTitleSpacing: taskmanager.appTitleSpacing
ListView.delayRemove: Drag.active
Component.onCompleted: {
dropFilesOnItem.connect(taskmanager.Applet.dropFilesOnItem)
Expand Down