Browser page: scroll + click coexist via register order fix
- Added Page state (BrowserPage/EditorPage) and SortMode - BrowserLayout with 30 static entries, sort toggle, search placeholder - ListView rows clickable via per-row RegisterClick - Scroll gesture registered at START of ListView.Draw (before clicks) so click gestures registered later are checked first during hit test - Unique IDs for interactive elements: editor_text, browser_list, search_bar - ListView.Interactions() filters out Scroll (registered in Draw, not registerInteraction) - RegisterScroll added to Renderer, called from element Draw methods - lastLineYChan frame loop fixed: only re-layout if value changed - Back icon added, editor status bar shows active filename
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 166 B |
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<polyline points="15 18 9 12 15 6"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 228 B |
@@ -28,7 +28,7 @@ var iconTemplate = template.Must(template.New("").Parse(`// Code generated by ge
|
||||
package icons
|
||||
|
||||
import (
|
||||
_ "embed"
|
||||
"embed"
|
||||
)
|
||||
|
||||
//go:embed {{.Embeds}}
|
||||
|
||||
+13
-11
@@ -6,9 +6,15 @@ import (
|
||||
"embed"
|
||||
)
|
||||
|
||||
//go:embed copy.svg cut.svg paste.svg
|
||||
//go:embed back.svg copy.svg cut.svg paste.svg
|
||||
var svgFS embed.FS
|
||||
|
||||
// backSVG contains the back icon SVG source.
|
||||
var backSVG = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<polyline points="15 18 9 12 15 6"/>
|
||||
</svg>
|
||||
`
|
||||
|
||||
// copySVG contains the copy icon SVG source.
|
||||
var copySVG = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
|
||||
<rect x="7" y="7" width="12" height="14" rx="1" fill="none" stroke="currentColor" stroke-width="1.5"/>
|
||||
@@ -17,16 +23,12 @@ var copySVG = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width
|
||||
`
|
||||
|
||||
// cutSVG contains the cut icon SVG source.
|
||||
var cutSVG = `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<!-- Left blade -->
|
||||
<circle cx="7" cy="7" r="4" />
|
||||
<line x1="9.5" y1="9.5" x2="14" y2="14" />
|
||||
<!-- Right blade -->
|
||||
<circle cx="17" cy="7" r="4" />
|
||||
<line x1="14.5" y1="9.5" x2="10" y2="14" />
|
||||
<!-- Handles -->
|
||||
<line x1="7" y1="3" x2="7" y2="11" />
|
||||
<line x1="17" y1="3" x2="17" y2="11" />
|
||||
var cutSVG = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<circle cx="6" cy="6" r="3"/>
|
||||
<circle cx="6" cy="18" r="3"/>
|
||||
<path d="M20 4 8.12 15.12"/>
|
||||
<path d="M14.8 14.8 20 20"/>
|
||||
<path d="M8.12 8.12 12 12"/>
|
||||
</svg>
|
||||
`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user