fix(genre-filter): let the expand chevron receive clicks in the advanced tree
The full-row selection TouchArea was declared after the row layout, so it sat on top of the chevron's TouchArea and swallowed every click — sub-genres could never be expanded. Declare the row TouchArea first (bottom of the z-order) so the arrow's TouchArea wins inside the chevron region, matching the stopPropagation isolation the Svelte version had. Fixes #545 cc
This commit is contained in:
1 file changed
+14
-12
@@ -1,8 +1,7 @@
|
||||
// Filter-by-genre popup — ported from Tauri's GenreFilterPopup.
|
||||
// Simple grid view (parent genres as selectable chips). The selection
|
||||
// is shared across the three Discover tabs and re-fetches the discover
|
||||
// index. The Advanced view (search + 3-level tree + counts) is a
|
||||
// later increment; its toggle is present but its body is a stub.
|
||||
// Simple grid view (parent genres as selectable chips) plus the Advanced
|
||||
// view (search + 3-level tree + counts). The selection is shared across
|
||||
// the three Discover tabs and re-fetches the discover index.
|
||||
|
||||
import { Theme } from "../foundation/semantic-colors.slint";
|
||||
import { Typography } from "../foundation/typography.slint";
|
||||
@@ -22,6 +21,17 @@ component GenreTreeRowItem inherits Rectangle {
|
||||
border-radius: 6px;
|
||||
background: ta.has-hover ? Theme.surface-hover : transparent;
|
||||
|
||||
// Row click (outside the arrow) toggles selection. Declared FIRST so it
|
||||
// sits BELOW the arrow's TouchArea in z-order (later siblings are on top
|
||||
// in Slint) — otherwise it swallows the chevron click and sub-genres
|
||||
// never expand (#545).
|
||||
ta := TouchArea {
|
||||
mouse-cursor: pointer;
|
||||
clicked => {
|
||||
root.toggle(root.node.id);
|
||||
}
|
||||
}
|
||||
|
||||
HorizontalLayout {
|
||||
padding-left: 6px + root.node.level * 18px;
|
||||
padding-right: 10px;
|
||||
@@ -90,14 +100,6 @@ component GenreTreeRowItem inherits Rectangle {
|
||||
}
|
||||
}
|
||||
|
||||
// Row click (outside the arrow) toggles selection.
|
||||
ta := TouchArea {
|
||||
mouse-cursor: pointer;
|
||||
// Sits below the arrow's TouchArea, so arrow clicks win.
|
||||
clicked => {
|
||||
root.toggle(root.node.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
component GenreCard inherits Rectangle {
|
||||
|
||||
Reference in new issue
Block a user