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.Widgets
|
||||||
import Quickshell.Wayland
|
import Quickshell.Wayland
|
||||||
import QtQuick
|
import QtQuick
|
||||||
|
import QtQuick.Layouts
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
|
|
@ -18,35 +19,68 @@ Item {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
spacing: Appearance.spacing.normal
|
spacing: Appearance.spacing.normal
|
||||||
|
|
||||||
Row {
|
RowLayout {
|
||||||
id: detailsRow
|
id: detailsRow
|
||||||
|
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
spacing: Appearance.spacing.normal
|
spacing: Appearance.spacing.normal
|
||||||
|
|
||||||
IconImage {
|
IconImage {
|
||||||
id: icon
|
id: icon
|
||||||
|
|
||||||
|
Layout.alignment: Qt.AlignVCenter
|
||||||
implicitSize: details.implicitHeight
|
implicitSize: details.implicitHeight
|
||||||
source: Icons.getAppIcon(Hyprland.activeClient?.wmClass ?? "", "image-missing")
|
source: Icons.getAppIcon(Hyprland.activeClient?.wmClass ?? "", "image-missing")
|
||||||
}
|
}
|
||||||
|
|
||||||
Column {
|
ColumnLayout {
|
||||||
id: details
|
id: details
|
||||||
|
|
||||||
|
spacing: 0
|
||||||
|
Layout.fillWidth: true
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
|
Layout.fillWidth: true
|
||||||
text: Hyprland.activeClient?.title ?? ""
|
text: Hyprland.activeClient?.title ?? ""
|
||||||
font.pointSize: Appearance.font.size.normal
|
font.pointSize: Appearance.font.size.normal
|
||||||
|
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
width: preview.implicitWidth - icon.implicitWidth - detailsRow.spacing
|
|
||||||
}
|
}
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
|
Layout.fillWidth: true
|
||||||
text: Hyprland.activeClient?.wmClass ?? ""
|
text: Hyprland.activeClient?.wmClass ?? ""
|
||||||
color: Colours.palette.m3onSurfaceVariant
|
color: Colours.palette.m3onSurfaceVariant
|
||||||
|
|
||||||
elide: Text.ElideRight
|
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.right: parent.right
|
||||||
anchors.rightMargin: Appearance.padding.normal
|
anchors.rightMargin: Appearance.padding.normal
|
||||||
|
|
||||||
text: "exit_to_app"
|
text: "open_in_new"
|
||||||
color: Colours.palette.m3onTertiary
|
color: Colours.palette.m3onTertiary
|
||||||
font.pointSize: Appearance.font.size.large
|
font.pointSize: Appearance.font.size.large
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue