popouts: convert to layout
Also add expand button Change launcher calc item icon
This commit is contained in:
parent
956e706f74
commit
97c0c387f1
2 changed files with 41 additions and 13 deletions
|
|
@ -5,6 +5,7 @@ import "root:/config"
|
|||
import Quickshell.Widgets
|
||||
import Quickshell.Wayland
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
|
@ -18,35 +19,68 @@ Item {
|
|||
anchors.centerIn: parent
|
||||
spacing: Appearance.spacing.normal
|
||||
|
||||
Row {
|
||||
RowLayout {
|
||||
id: detailsRow
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
spacing: Appearance.spacing.normal
|
||||
|
||||
IconImage {
|
||||
id: icon
|
||||
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
implicitSize: details.implicitHeight
|
||||
source: Icons.getAppIcon(Hyprland.activeClient?.wmClass ?? "", "image-missing")
|
||||
}
|
||||
|
||||
Column {
|
||||
ColumnLayout {
|
||||
id: details
|
||||
|
||||
spacing: 0
|
||||
Layout.fillWidth: true
|
||||
|
||||
StyledText {
|
||||
Layout.fillWidth: true
|
||||
text: Hyprland.activeClient?.title ?? ""
|
||||
font.pointSize: Appearance.font.size.normal
|
||||
|
||||
elide: Text.ElideRight
|
||||
width: preview.implicitWidth - icon.implicitWidth - detailsRow.spacing
|
||||
}
|
||||
|
||||
StyledText {
|
||||
Layout.fillWidth: true
|
||||
text: Hyprland.activeClient?.wmClass ?? ""
|
||||
color: Colours.palette.m3onSurfaceVariant
|
||||
|
||||
elide: Text.ElideRight
|
||||
width: preview.implicitWidth - icon.implicitWidth - detailsRow.spacing
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
implicitWidth: expandIcon.implicitHeight + Appearance.padding.small * 2
|
||||
implicitHeight: expandIcon.implicitHeight + Appearance.padding.small * 2
|
||||
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
|
||||
StateLayer {
|
||||
radius: Appearance.rounding.normal
|
||||
|
||||
function onClicked(): void {
|
||||
// TODO
|
||||
}
|
||||
}
|
||||
|
||||
MaterialIcon {
|
||||
id: expandIcon
|
||||
|
||||
anchors.centerIn: parent
|
||||
anchors.horizontalCenterOffset: font.pointSize * 0.05
|
||||
|
||||
text: "chevron_right"
|
||||
|
||||
font.pointSize: Appearance.font.size.large
|
||||
font.variableAxes: ({
|
||||
opsz: Appearance.font.size.large
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -66,10 +100,4 @@ Item {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
component Anim: NumberAnimation {
|
||||
duration: Appearance.anim.durations.normal
|
||||
easing.type: Easing.BezierSpline
|
||||
easing.bezierCurve: Appearance.anim.curves.emphasized
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ Item {
|
|||
anchors.right: parent.right
|
||||
anchors.rightMargin: Appearance.padding.normal
|
||||
|
||||
text: "exit_to_app"
|
||||
text: "open_in_new"
|
||||
color: Colours.palette.m3onTertiary
|
||||
font.pointSize: Appearance.font.size.large
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue