forked from Shinonome/dots-hyprland
overview: fewer Layouts
This commit is contained in:
@@ -63,7 +63,7 @@ Item {
|
|||||||
border.width: 1
|
border.width: 1
|
||||||
border.color: Appearance.colors.colLayer0Border
|
border.color: Appearance.colors.colLayer0Border
|
||||||
|
|
||||||
ColumnLayout { // Workspaces
|
Column { // Workspaces
|
||||||
id: workspaceColumnLayout
|
id: workspaceColumnLayout
|
||||||
|
|
||||||
z: root.workspaceZ
|
z: root.workspaceZ
|
||||||
@@ -71,7 +71,7 @@ Item {
|
|||||||
spacing: workspaceSpacing
|
spacing: workspaceSpacing
|
||||||
Repeater {
|
Repeater {
|
||||||
model: Config.options.overview.rows
|
model: Config.options.overview.rows
|
||||||
delegate: RowLayout {
|
delegate: Row {
|
||||||
id: row
|
id: row
|
||||||
property int rowIndex: index
|
property int rowIndex: index
|
||||||
spacing: workspaceSpacing
|
spacing: workspaceSpacing
|
||||||
|
|||||||
@@ -81,35 +81,29 @@ Item { // Window
|
|||||||
border.width : 1
|
border.width : 1
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
Image {
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
id: windowIcon
|
||||||
anchors.left: parent.left
|
anchors.centerIn: parent
|
||||||
anchors.right: parent.right
|
property var iconSize: {
|
||||||
spacing: Appearance.font.pixelSize.smaller * 0.5
|
// console.log("-=-=-", root.toplevel.title, "-=-=-")
|
||||||
|
// console.log("Target window size:", targetWindowWidth, targetWindowHeight)
|
||||||
|
// console.log("Icon ratio:", root.compactMode ? root.iconToWindowRatioCompact : root.iconToWindowRatio)
|
||||||
|
// console.log("Scale:", root.monitorData.scale)
|
||||||
|
// console.log("Final:", Math.min(targetWindowWidth, targetWindowHeight) * (root.compactMode ? root.iconToWindowRatioCompact : root.iconToWindowRatio) / root.monitorData.scale)
|
||||||
|
return Math.min(targetWindowWidth, targetWindowHeight) * (root.compactMode ? root.iconToWindowRatioCompact : root.iconToWindowRatio) / root.monitorData.scale;
|
||||||
|
}
|
||||||
|
// mipmap: true
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
source: root.iconPath
|
||||||
|
width: iconSize
|
||||||
|
height: iconSize
|
||||||
|
sourceSize: Qt.size(iconSize, iconSize)
|
||||||
|
|
||||||
Image {
|
Behavior on width {
|
||||||
id: windowIcon
|
animation: Appearance.animation.elementMoveEnter.numberAnimation.createObject(this)
|
||||||
property var iconSize: {
|
}
|
||||||
// console.log("-=-=-", root.toplevel.title, "-=-=-")
|
Behavior on height {
|
||||||
// console.log("Target window size:", targetWindowWidth, targetWindowHeight)
|
animation: Appearance.animation.elementMoveEnter.numberAnimation.createObject(this)
|
||||||
// console.log("Icon ratio:", root.compactMode ? root.iconToWindowRatioCompact : root.iconToWindowRatio)
|
|
||||||
// console.log("Scale:", root.monitorData.scale)
|
|
||||||
// console.log("Final:", Math.min(targetWindowWidth, targetWindowHeight) * (root.compactMode ? root.iconToWindowRatioCompact : root.iconToWindowRatio) / root.monitorData.scale)
|
|
||||||
return Math.min(targetWindowWidth, targetWindowHeight) * (root.compactMode ? root.iconToWindowRatioCompact : root.iconToWindowRatio) / root.monitorData.scale;
|
|
||||||
}
|
|
||||||
// mipmap: true
|
|
||||||
Layout.alignment: Qt.AlignHCenter
|
|
||||||
source: root.iconPath
|
|
||||||
width: iconSize
|
|
||||||
height: iconSize
|
|
||||||
sourceSize: Qt.size(iconSize, iconSize)
|
|
||||||
|
|
||||||
Behavior on width {
|
|
||||||
animation: Appearance.animation.elementMoveEnter.numberAnimation.createObject(this)
|
|
||||||
}
|
|
||||||
Behavior on height {
|
|
||||||
animation: Appearance.animation.elementMoveEnter.numberAnimation.createObject(this)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user