DockMenu: use RowLayout and ColumnLayout

This commit is contained in:
ItsLemmy
2025-09-28 20:35:25 -04:00
parent 0ed8ed7fe5
commit 68b2c83be1
+13 -13
View File
@@ -168,7 +168,7 @@ PopupWindow {
}
}
Column {
ColumnLayout {
id: contextMenuColumn
anchors.fill: parent
anchors.margins: Style.marginM * scaling
@@ -176,12 +176,12 @@ PopupWindow {
// Focus item
Rectangle {
width: parent.width
Layout.fillWidth: true
height: 32 * scaling
color: root.hoveredItem === 0 ? Color.mTertiary : Color.transparent
radius: Style.radiusXS * scaling
Row {
RowLayout {
anchors.left: parent.left
anchors.leftMargin: Style.marginS * scaling
anchors.verticalCenter: parent.verticalCenter
@@ -191,26 +191,26 @@ PopupWindow {
icon: "eye"
font.pointSize: Style.fontSizeL * scaling
color: root.hoveredItem === 0 ? Color.mOnTertiary : Color.mOnSurfaceVariant
anchors.verticalCenter: parent.verticalCenter
Layout.alignment: Qt.AlignVCenter
}
NText {
text: I18n.tr("dock.menu.focus")
font.pointSize: Style.fontSizeS * scaling
color: root.hoveredItem === 0 ? Color.mOnTertiary : Color.mOnSurfaceVariant
anchors.verticalCenter: parent.verticalCenter
Layout.alignment: Qt.AlignVCenter
}
}
}
// Pin/Unpin item
Rectangle {
width: parent.width
Layout.fillWidth: true
height: 32 * scaling
color: root.hoveredItem === 1 ? Color.mTertiary : Color.transparent
radius: Style.radiusXS * scaling
Row {
RowLayout {
anchors.left: parent.left
anchors.leftMargin: Style.marginS * scaling
anchors.verticalCenter: parent.verticalCenter
@@ -224,7 +224,7 @@ PopupWindow {
}
font.pointSize: Style.fontSizeL * scaling
color: root.hoveredItem === 1 ? Color.mOnTertiary : Color.mOnSurfaceVariant
anchors.verticalCenter: parent.verticalCenter
Layout.alignment: Qt.AlignVCenter
}
NText {
@@ -235,19 +235,19 @@ PopupWindow {
}
font.pointSize: Style.fontSizeS * scaling
color: root.hoveredItem === 1 ? Color.mOnTertiary : Color.mOnSurfaceVariant
anchors.verticalCenter: parent.verticalCenter
Layout.alignment: Qt.AlignVCenter
}
}
}
// Close item
Rectangle {
width: parent.width
Layout.fillWidth: true
height: 32 * scaling
color: root.hoveredItem === 2 ? Color.mTertiary : Color.transparent
radius: Style.radiusXS * scaling
Row {
RowLayout {
anchors.left: parent.left
anchors.leftMargin: Style.marginS * scaling
anchors.verticalCenter: parent.verticalCenter
@@ -257,14 +257,14 @@ PopupWindow {
icon: "close"
font.pointSize: Style.fontSizeL * scaling
color: root.hoveredItem === 2 ? Color.mOnTertiary : Color.mOnSurfaceVariant
anchors.verticalCenter: parent.verticalCenter
Layout.alignment: Qt.AlignVCenter
}
NText {
text: I18n.tr("dock.menu.close")
font.pointSize: Style.fontSizeS * scaling
color: root.hoveredItem === 2 ? Color.mOnTertiary : Color.mOnSurfaceVariant
anchors.verticalCenter: parent.verticalCenter
Layout.alignment: Qt.AlignVCenter
}
}
}