fix: window info anim + clipping
This commit is contained in:
parent
397ae4cd6e
commit
25a9d28a51
2 changed files with 42 additions and 31 deletions
|
|
@ -54,46 +54,56 @@ ColumnLayout {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
WrapperItem {
|
GridLayout {
|
||||||
Layout.fillWidth: true
|
id: wsGrid
|
||||||
Layout.leftMargin: Tokens.padding.extraLargeIncreased
|
|
||||||
Layout.rightMargin: Tokens.padding.extraLargeIncreased
|
|
||||||
|
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.leftMargin: Tokens.padding.large
|
||||||
|
Layout.rightMargin: Tokens.padding.large
|
||||||
|
Layout.bottomMargin: root.moveToWsExpanded ? Tokens.spacing.medium : 0
|
||||||
Layout.preferredHeight: root.moveToWsExpanded ? implicitHeight : 0
|
Layout.preferredHeight: root.moveToWsExpanded ? implicitHeight : 0
|
||||||
|
opacity: root.moveToWsExpanded ? 1 : 0
|
||||||
clip: true
|
clip: true
|
||||||
|
|
||||||
topMargin: Tokens.spacing.medium
|
rowSpacing: Tokens.spacing.small
|
||||||
bottomMargin: Tokens.spacing.medium
|
columnSpacing: Tokens.spacing.small
|
||||||
|
columns: 5
|
||||||
|
|
||||||
GridLayout {
|
Behavior on Layout.bottomMargin {
|
||||||
id: wsGrid
|
Anim {
|
||||||
|
type: Anim.DefaultEffects
|
||||||
rowSpacing: Tokens.spacing.medium
|
|
||||||
columnSpacing: Tokens.spacing.medium
|
|
||||||
columns: 5
|
|
||||||
|
|
||||||
Repeater {
|
|
||||||
model: 10
|
|
||||||
|
|
||||||
Button {
|
|
||||||
required property int index
|
|
||||||
readonly property int wsId: Math.floor((Hypr.activeWsId - 1) / 10) * 10 + index + 1
|
|
||||||
readonly property bool isCurrent: root.client?.workspace.id === wsId
|
|
||||||
|
|
||||||
onClicked: {
|
|
||||||
Hypr.dispatch(`movetoworkspace ${wsId},address:0x${root.client?.address}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
color: isCurrent ? Colours.tPalette.m3surfaceContainerHighest : Colours.palette.m3tertiaryContainer
|
|
||||||
onColor: isCurrent ? Colours.palette.m3onSurface : Colours.palette.m3onTertiaryContainer
|
|
||||||
text: wsId
|
|
||||||
disabled: isCurrent
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Behavior on Layout.preferredHeight {
|
Behavior on Layout.preferredHeight {
|
||||||
Anim {}
|
Anim {
|
||||||
|
type: Anim.DefaultEffects
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Behavior on opacity {
|
||||||
|
Anim {
|
||||||
|
type: Anim.DefaultEffects
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Repeater {
|
||||||
|
model: 10
|
||||||
|
|
||||||
|
Button {
|
||||||
|
required property int index
|
||||||
|
readonly property int wsId: Math.floor((Hypr.activeWsId - 1) / 10) * 10 + index + 1
|
||||||
|
readonly property bool isCurrent: root.client?.workspace.id === wsId
|
||||||
|
|
||||||
|
onClicked: {
|
||||||
|
Hypr.dispatch(`movetoworkspace ${wsId},address:0x${root.client?.address}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
color: isCurrent ? Colours.tPalette.m3surfaceContainerHighest : Colours.palette.m3tertiaryContainer
|
||||||
|
onColor: isCurrent ? Colours.palette.m3onSurface : Colours.palette.m3onTertiaryContainer
|
||||||
|
text: wsId
|
||||||
|
disabled: isCurrent
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ Item {
|
||||||
|
|
||||||
color: Colours.tPalette.m3surfaceContainer
|
color: Colours.tPalette.m3surfaceContainer
|
||||||
radius: Tokens.rounding.large
|
radius: Tokens.rounding.large
|
||||||
|
clip: true
|
||||||
|
|
||||||
Details {
|
Details {
|
||||||
client: root.client
|
client: root.client
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue