mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-10-24 12:07:47 -04:00
1 parent
5f31b2e3d5
commit
f4e3697803
6 files changed
+6
-26
No files matched your search
@@ -28,10 +28,9 @@ Item {
|
||||
property bool showTooltip: mouseArea.containsMouse && !dragging
|
||||
property var cachedDesktopEntry: dockApps?.desktopEntries[appData?.appId] ?? null
|
||||
property real actualIconSize: 40
|
||||
property real indicatorLane: 0
|
||||
readonly property bool indicatorAtFarEdge: root.options.position === SettingsData.Position.Bottom || root.options.position === SettingsData.Position.Right
|
||||
readonly property bool indicatorInPadding: !(root.dockApps?.barHosted ?? false)
|
||||
readonly property real indicatorThickness: indicatorInPadding ? root.options.spacing : indicatorLane
|
||||
readonly property real indicatorThickness: indicatorInPadding ? root.options.spacing : Math.max(0, ((isVertical ? width : height) - actualIconSize) / 2)
|
||||
property bool shouldShowIndicator: {
|
||||
if (root.options.hideIndicators)
|
||||
return false;
|
||||
@@ -447,10 +446,7 @@ Item {
|
||||
Item {
|
||||
id: iconSlot
|
||||
|
||||
x: root.isVertical && !root.indicatorAtFarEdge ? root.indicatorLane : 0
|
||||
y: !root.isVertical && !root.indicatorAtFarEdge ? root.indicatorLane : 0
|
||||
width: parent.width - (root.isVertical ? root.indicatorLane : 0)
|
||||
height: parent.height - (root.isVertical ? 0 : root.indicatorLane)
|
||||
anchors.fill: parent
|
||||
scale: !root.options?.magnification && root.options?.enlargeOnHover && root.isHovered ? (root.options?.enlargePercentage ?? 125) / 100 : 1
|
||||
|
||||
AppIconRenderer {
|
||||
|
||||
@@ -40,8 +40,6 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
property real indicatorLane: 0
|
||||
readonly property real laneOffset: (root.options.position === SettingsData.Position.Bottom || root.options.position === SettingsData.Position.Right ? -1 : 1) * root.indicatorLane / 2
|
||||
readonly property real hoverAnimOffset: hoverBounce.offset
|
||||
|
||||
DockHoverBounce {
|
||||
@@ -64,8 +62,6 @@ Item {
|
||||
|
||||
Item {
|
||||
anchors.centerIn: parent
|
||||
anchors.horizontalCenterOffset: root.isVertical ? root.laneOffset : 0
|
||||
anchors.verticalCenterOffset: root.isVertical ? 0 : root.laneOffset
|
||||
width: actualIconSize
|
||||
height: actualIconSize
|
||||
scale: !root.options?.magnification && root.options?.enlargeOnHover && root.isHovered ? (root.options?.enlargePercentage ?? 125) / 100 : 1
|
||||
|
||||
@@ -6,8 +6,6 @@ Item {
|
||||
id: root
|
||||
required property var options
|
||||
|
||||
property real indicatorLane: 0
|
||||
readonly property real laneOffset: (root.options.position === SettingsData.Position.Bottom || root.options.position === SettingsData.Position.Right ? -1 : 1) * root.indicatorLane / 2
|
||||
property color iconColor: Theme.surfaceText
|
||||
property real actualIconSize: 40
|
||||
property int overflowCount: 0
|
||||
@@ -22,8 +20,6 @@ Item {
|
||||
Rectangle {
|
||||
id: buttonBackground
|
||||
anchors.centerIn: parent
|
||||
anchors.horizontalCenterOffset: root.isVertical ? root.laneOffset : 0
|
||||
anchors.verticalCenterOffset: root.isVertical ? 0 : root.laneOffset
|
||||
width: actualIconSize
|
||||
height: actualIconSize
|
||||
radius: Theme.cornerRadius
|
||||
|
||||
@@ -13,8 +13,6 @@ Item {
|
||||
property var dockApps: null
|
||||
property var contextMenu: null
|
||||
property var parentDockScreen: null
|
||||
property real indicatorLane: 0
|
||||
readonly property real laneOffset: (root.options.position === SettingsData.Position.Bottom || root.options.position === SettingsData.Position.Right ? -1 : 1) * root.indicatorLane / 2
|
||||
property real actualIconSize: 40
|
||||
readonly property real hoverAnimOffset: hoverBounce.offset
|
||||
|
||||
@@ -67,8 +65,6 @@ Item {
|
||||
|
||||
Item {
|
||||
anchors.centerIn: parent
|
||||
anchors.horizontalCenterOffset: root.isVertical ? root.laneOffset : 0
|
||||
anchors.verticalCenterOffset: root.isVertical ? 0 : root.laneOffset
|
||||
width: actualIconSize - 4
|
||||
height: actualIconSize - 4
|
||||
scale: !root.options?.magnification && root.options?.enlargeOnHover && root.isHovered ? (root.options?.enlargePercentage ?? 125) / 100 : 1
|
||||
|
||||
@@ -84,10 +84,9 @@ Item {
|
||||
return strip.targetSize + Theme.listItemHeight * 2;
|
||||
return strip.targetSize;
|
||||
}
|
||||
readonly property real crossSize: itemData.type === "separator" ? strip.iconSize : strip.crossSize
|
||||
|
||||
width: collapsed ? 0 : (strip.isVertical ? crossSize : primarySize)
|
||||
height: collapsed ? 0 : (strip.isVertical ? primarySize : crossSize)
|
||||
width: collapsed ? 0 : (strip.isVertical ? strip.crossSize : primarySize)
|
||||
height: collapsed ? 0 : (strip.isVertical ? primarySize : strip.crossSize)
|
||||
|
||||
Behavior on opacity {
|
||||
NumberAnimation {
|
||||
@@ -159,7 +158,6 @@ Item {
|
||||
anchors.centerIn: parent
|
||||
width: delegateItem.width
|
||||
height: delegateItem.height
|
||||
indicatorLane: strip.indicatorLane
|
||||
actualIconSize: strip.iconSize * (strip.options.iconSizePercentage ?? 100) / 100
|
||||
overflowCount: itemData.overflowCount || 0
|
||||
overflowExpanded: strip.overflowExpanded
|
||||
@@ -174,7 +172,6 @@ Item {
|
||||
anchors.centerIn: parent
|
||||
width: delegateItem.width
|
||||
height: delegateItem.height
|
||||
indicatorLane: strip.indicatorLane
|
||||
actualIconSize: strip.iconSize * (strip.options.iconSizePercentage ?? 100) / 100
|
||||
dockApps: strip
|
||||
}
|
||||
@@ -186,7 +183,6 @@ Item {
|
||||
anchors.centerIn: parent
|
||||
width: delegateItem.width
|
||||
height: delegateItem.height
|
||||
indicatorLane: strip.indicatorLane
|
||||
actualIconSize: strip.iconSize * (strip.options.iconSizePercentage ?? 100) / 100
|
||||
dockApps: strip
|
||||
contextMenu: strip.trashContextMenu
|
||||
@@ -200,7 +196,6 @@ Item {
|
||||
anchors.centerIn: parent
|
||||
width: delegateItem.width
|
||||
height: delegateItem.height
|
||||
indicatorLane: strip.indicatorLane
|
||||
actualIconSize: strip.iconSize * (strip.options.iconSizePercentage ?? 100) / 100
|
||||
appData: itemData
|
||||
contextMenu: strip.contextMenu
|
||||
|
||||
@@ -105,7 +105,8 @@ Item {
|
||||
readonly property real targetSize: barHosted ? iconSize * (options.iconSizePercentage ?? 100) / 100 : iconSize
|
||||
readonly property real indicatorLane: root.barHosted && !root.options.hideIndicators ? DockConfig.indicatorLane(root.options) : 0
|
||||
readonly property real crossSize: {
|
||||
const needed = root.targetSize + root.indicatorLane;
|
||||
// The lane is mirrored so icons stay centered on the bar.
|
||||
const needed = root.targetSize + root.indicatorLane * 2;
|
||||
if (!root.barHosted)
|
||||
return needed;
|
||||
// A bar pill cannot grow past its widget thickness, so the lane yields there.
|
||||
|
||||
Reference in new issue
Block a user