fix: block clicks on nexus header
This commit is contained in:
parent
3bc2bd2a5c
commit
21a67d3671
1 changed files with 29 additions and 18 deletions
|
|
@ -21,27 +21,38 @@ ColumnLayout {
|
||||||
|
|
||||||
spacing: Tokens.spacing.extraLargeIncreased
|
spacing: Tokens.spacing.extraLargeIncreased
|
||||||
|
|
||||||
RowLayout {
|
MouseArea { // Prevent clicks from reaching flickable
|
||||||
spacing: Tokens.spacing.largeIncreased
|
z: 1
|
||||||
|
implicitWidth: header.implicitWidth
|
||||||
|
implicitHeight: header.implicitHeight - Layout.bottomMargin
|
||||||
|
Layout.bottomMargin: -flickable.topMargin // Extra height to block clicks on flickable top margin
|
||||||
|
|
||||||
Loader {
|
RowLayout {
|
||||||
visible: active
|
id: header
|
||||||
active: root.isSubPage
|
|
||||||
asynchronous: true
|
spacing: Tokens.spacing.largeIncreased
|
||||||
sourceComponent: IconButton {
|
|
||||||
icon: "arrow_back"
|
Loader {
|
||||||
font: Tokens.font.icon.medium
|
visible: active
|
||||||
type: IconButton.Tonal
|
active: root.isSubPage
|
||||||
isRound: true
|
asynchronous: true
|
||||||
inactiveColour: Colours.tPalette.m3surfaceContainerHigh
|
sourceComponent: IconButton {
|
||||||
inactiveOnColour: Colours.palette.m3onSurfaceVariant
|
icon: "arrow_back"
|
||||||
onClicked: root.nState.closeSubPage()
|
font: Tokens.font.icon.medium
|
||||||
|
type: IconButton.Tonal
|
||||||
|
isRound: true
|
||||||
|
inactiveColour: Colours.tPalette.m3surfaceContainerHigh
|
||||||
|
inactiveOnColour: Colours.palette.m3onSurfaceVariant
|
||||||
|
onClicked: root.nState.closeSubPage()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
text: root.title
|
Layout.fillWidth: true
|
||||||
font: Tokens.font.title.large
|
text: root.title
|
||||||
|
font: Tokens.font.title.large
|
||||||
|
elide: Text.ElideRight
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue