mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-15 10:12:07 -04:00
slightly thinner workspace pills + more forgiving mousearea
This commit is contained in:
@@ -338,32 +338,28 @@ Rectangle {
|
|||||||
|
|
||||||
width: {
|
width: {
|
||||||
if (root.isVertical) {
|
if (root.isVertical) {
|
||||||
// Vertical mode: width is like horizontal height (small and fixed)
|
return SettingsData.showWorkspaceApps ? widgetHeight * 0.7 : widgetHeight * 0.5;
|
||||||
return SettingsData.showWorkspaceApps ? widgetHeight * 0.8 : widgetHeight * 0.6;
|
|
||||||
} else {
|
} else {
|
||||||
// Horizontal mode - original logic
|
|
||||||
if (SettingsData.showWorkspaceApps && loadedIcons.length > 0) {
|
if (SettingsData.showWorkspaceApps && loadedIcons.length > 0) {
|
||||||
const numIcons = Math.min(loadedIcons.length, SettingsData.maxWorkspaceIcons);
|
const numIcons = Math.min(loadedIcons.length, SettingsData.maxWorkspaceIcons);
|
||||||
const iconsWidth = numIcons * 18 + (numIcons > 0 ? (numIcons - 1) * Theme.spacingXS : 0);
|
const iconsWidth = numIcons * 18 + (numIcons > 0 ? (numIcons - 1) * Theme.spacingXS : 0);
|
||||||
const baseWidth = isActive ? root.widgetHeight * 1.0 + Theme.spacingXS : root.widgetHeight * 0.8;
|
const baseWidth = isActive ? root.widgetHeight * 0.9 + Theme.spacingXS : root.widgetHeight * 0.7;
|
||||||
return baseWidth + iconsWidth;
|
return baseWidth + iconsWidth;
|
||||||
}
|
}
|
||||||
return isActive ? root.widgetHeight * 1.2 : root.widgetHeight * 0.8;
|
return isActive ? root.widgetHeight * 1.05 : root.widgetHeight * 0.7;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
height: {
|
height: {
|
||||||
if (root.isVertical) {
|
if (root.isVertical) {
|
||||||
// Vertical mode: height is like horizontal width (dynamic)
|
|
||||||
if (SettingsData.showWorkspaceApps && loadedIcons.length > 0) {
|
if (SettingsData.showWorkspaceApps && loadedIcons.length > 0) {
|
||||||
const numIcons = Math.min(loadedIcons.length, SettingsData.maxWorkspaceIcons);
|
const numIcons = Math.min(loadedIcons.length, SettingsData.maxWorkspaceIcons);
|
||||||
const iconsHeight = numIcons * 18 + (numIcons > 0 ? (numIcons - 1) * Theme.spacingXS : 0);
|
const iconsHeight = numIcons * 18 + (numIcons > 0 ? (numIcons - 1) * Theme.spacingXS : 0);
|
||||||
const baseHeight = isActive ? root.widgetHeight * 1.0 + Theme.spacingXS : root.widgetHeight * 0.8;
|
const baseHeight = isActive ? root.widgetHeight * 0.9 + Theme.spacingXS : root.widgetHeight * 0.7;
|
||||||
return baseHeight + iconsHeight;
|
return baseHeight + iconsHeight;
|
||||||
}
|
}
|
||||||
return isActive ? root.widgetHeight * 1.2 : root.widgetHeight * 0.8;
|
return isActive ? root.widgetHeight * 1.05 : root.widgetHeight * 0.7;
|
||||||
} else {
|
} else {
|
||||||
// Horizontal mode - original logic
|
return SettingsData.showWorkspaceApps ? widgetHeight * 0.7 : widgetHeight * 0.5;
|
||||||
return SettingsData.showWorkspaceApps ? widgetHeight * 0.8 : widgetHeight * 0.6;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
radius: Math.min(width, height) / 2
|
radius: Math.min(width, height) / 2
|
||||||
@@ -388,7 +384,9 @@ Rectangle {
|
|||||||
MouseArea {
|
MouseArea {
|
||||||
id: mouseArea
|
id: mouseArea
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.centerIn: parent
|
||||||
|
width: root.isVertical ? parent.width + Theme.spacingXL : parent.width
|
||||||
|
height: root.isVerical ? parent.height : parent.height + Theme.spacingXL
|
||||||
hoverEnabled: !isPlaceholder
|
hoverEnabled: !isPlaceholder
|
||||||
cursorShape: isPlaceholder ? Qt.ArrowCursor : Qt.PointingHandCursor
|
cursorShape: isPlaceholder ? Qt.ArrowCursor : Qt.PointingHandCursor
|
||||||
enabled: !isPlaceholder
|
enabled: !isPlaceholder
|
||||||
|
|||||||
Reference in New Issue
Block a user