Fix several SE5 RC issues from OmrSi's report (#10766)#11557
Conversation
The shortcut capture path prefixed every numpad key with "NumPad", turning the
four arithmetic operators into "NumPadAdd"/"NumPadMultiply"/etc. Those keys are
NumLock-independent and have no main-keyboard Key equivalent, so the prefix only
broke matching against the bare Avalonia Key names used by the shortcut-picker
dropdown, SE 4 import, and the default bindings (Shift+Add/Shift+Subtract
waveform zoom were silently broken).
Stop prefixing the four operators so a numpad * reports as "Multiply" again, and
migrate any "NumPad{Add,Subtract,Multiply,Divide}" tokens stored during RC builds
back to the bare names on load. Digits, Decimal and Enter keep the prefix (NumLock
states / numpad-vs-main Enter).
Reported by OmrSi (#10766).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
"Go to next/previous bookmark" only moved the grid selection; SE 4 also moved the video to the line. Add a SeekVideoToSubtitleStart helper (no-op when no video is loaded) and call it from both bookmark navigation commands. Reported by OmrSi (#10766). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Opening a file from the Reopen menu restored the last-selected line but left the video at 0:00. Mirror the startup file-restore path: wait for the players to be ready, then seek the video to the restored line and re-center the waveform. Reported by OmrSi (#10766). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The shortcut was registered as SubtitleGrid, so it only fired when the grid was focused. Move it to SubtitleGridAndTextBox and route that category for the original/translation text box too (previously only the normal box was routed), so it works from whichever text box has focus, like SE 4. The command already syncs both Text and OriginalText. Reported by OmrSi (#10766). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The OS-drawn title bar stayed light in dark mode because SE never set the Win32 immersive dark-mode flag. Add a WindowsDarkMode.Apply DwmSetWindowAttribute helper (attribute 20, falling back to 19 for older Windows 10) and call it from ApplyScaleToWindow, the universal per-window hook — so every window gets it on open and on theme switches (ApplyLayoutScaleToAllWindows re-runs it). No-op off Windows. Reported by OmrSi (#10766). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add Waveform.WaveformAutoGenerate (Settings.json only, no UI yet, default true). When set to false, opening a video no longer kicks off ffmpeg waveform/spectrogram extraction; cached peaks still load so existing waveforms keep showing, and new ones are generated on demand. Requested by OmrSi (#10766). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
@niksedk Are you already looking into the not addressed items? I was gonna look into some of these but would like to avoid ending up both of us fixing the same issue. I was gonna start looking at the scrolling issue (has been high on my list), I can look at the Find dialog and grid separator, and the unfocused-selection color has also been high on my list. Let me know if I should continue or you're already on top of these. |
|
Regarding 6353c0e: This can be quite slow when moving quickly between bookmarks and the video is a large one on rotational hard drive. I suggest that we gate it behind a toggle, similar to Go to line number. It would be consistent that way, and I'd argue that in this case the option is even more important. You can't jump to line numbers in quick succession but you can do it with bookmarks.
|
|
Grid focus tweak is here: #11561 |
|
Find/Replace layout tweak is here: #11565 |
|
Unfocused selection items for Listboxes: #11566 With this, data grids and list boxes are aligned, and at this point no other component requires such a tweak. |
|
Grid separation and some related visual tweaks: #11568 |
|
@niksedk FWIW, I gave another try to the scrolling issue, to no avail. And then there's the unbearable oscillation I'm getting on scroll, too (on macOS at least.) The root cause is Virtualization. Avalonia's DataGrid only renders rows currently visible in the viewport. Off-screen rows have no DataGridRow element in the visual tree. To scroll to a row that isn't rendered yet, the DataGrid needs to know its Y offset in the content, which requires knowing the cumulative height of all rows above it. With variable heights, those unmeasured rows have unknown heights, so Avalonia can't calculate the correct offset. The two reliable solutions:
|
Fullscreen opens a fresh player and seeks back to the saved position, but the seek was applied immediately after the player reported ready, so it didn't reliably stick — leaving fullscreen at 0:00, most visibly when paused on an empty stretch of the timeline (where nothing else re-seeks afterwards). Settle briefly and re-apply the position, the same pattern used by the startup file-restore and Reopen paths. Reported by OmrSi (#10766). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
@mjuhasz: I am away from home atm, so I will be somewhat slow at replying. |
|
@mjuhasz: |
|
@niksedk @mjuhasz Thank you for all the fixes! The only thing remaining is number 4, which is basically two parts:
|
It can happen when the subtitle grid rows have different height, and we programmatically (e.g. via search) select a row. As you noticed, when the option "Show subtitle text as single line in grid" is disabled, we have variable row heights and then this issue occurs. This affects all grids with variable heights where we select a row and try to scroll it into view, such as the Find common errors or the OCR windows. If the grid contains rows of equal height, depending on the direction of search, the first or last visible row will be selected (I may tweak this later - there is something to be said for centering the selection like in typewriter mode to see some context: previous and next rows). Just to prove my point that variable row height is the culprit, here's how the main window works with equal row heights: Untitled.movThere are several ways to go about this, but it will require thorough assessment of those options: memory usage, maintenance burden (does the fix survive upgrades, will it be consistent across all grids etc.), usability etc. Both the author and myself are on the same opinion that this scrolling glitch should be eliminated but we'll need some more time to come up with a viable solution.
|
|
@mjuhasz Got it. The second issue happens only when this is disabled: Also, two more things to add:
|
|


Addresses several items from OmrSi's RC test report in discussion #10766. Each is a focused commit.
Fixes
+ - * /shortcut keys — the capture path prefixed every numpad key withNumPad, so the four arithmetic operators becameNumPadAdd/NumPadMultiply/etc. and stopped matching the bare AvaloniaKeynames used by the shortcut dropdown, SE4 import, and the default bindings (theShift+Add/Shift+Subtractwaveform-zoom defaults were silently broken too). Stop prefixing those four; migrate any tokens stored during RC builds back to the bare names. Digits,DecimalandEnterkeep the prefix. (report (Suggestion) CPS and separation in subtitle list #2)SubtitleGrid(grid-focus only). Moved toSubtitleGridAndTextBoxand routed that category for the original/translation box too (previously only the normal box was routed), so it works from whichever text box has focus, like SE4. (report multiselect subtitles in wave #5)DwmSetWindowAttributehelper (attribute 20, falling back to 19 for older Windows 10) applied via the universal per-window hook, so every window gets it on open and on theme switches. No-op off Windows. (report Move/add "Delete" menu to the Window UI in Custom Format window #9)Waveform.WaveformAutoGenerate(Settings.json only, no UI yet, defaulttrue). Whenfalse, opening a video no longer kicks off ffmpeg extraction; cached peaks still load. (report Alignment tags lose "{\" in JSON formats #10)Testing
dotnet build src/ui/UI.csproj— clean (0 warnings / 0 errors).Shift+numpad +/-zooms the waveform.Task.Delay(200)settle value is empirical and may need tuning.Remaining items from the report not addressed here: #4 (find scroll/highlight), #6/#7 (Find layout / grid separator), #8 (unfocused-selection color), #12 (missing SE4 shortcuts).
🤖 Generated with Claude Code