Style app menus and extract glossary dialog #3

Merged
vokhactri merged 1 commits from ui/app-menu-glossary into main 2026-11-07 15:03:38 +07:00
vokhactri commented 2026-11-07 15:02:20 +07:00 (Migrated from github.com)

Summary

  • Add AppMenu and AppMenuItem components so every app menu uses one consistent item layout. AppMenuItem fills in the Kirigami mnemonic label that the Union style does not set, and reserves an icon column so rows without icons line up.
  • Switch the menus (File, Audio, Subtitles, Video, View, Playback, Help, Settings, hamburger, context, playlist item, recent files, and track lists) to AppMenu and AppMenuItem.
  • Move the translation glossary out of Main.qml into GlossaryDialog.qml. The dialog gets a term count, Add Term and Clear All actions, a column header row, a scrollable list with per-row remove buttons, and an empty-state placeholder.
  • Glossary spacing follows KDE HIG: outer edges and gaps between groups use Kirigami.Units.largeSpacing, and related items use smallSpacing.
  • Tidy the translation settings preset row. The preset description now sits under the combo box in small font.
  • Add translationPresets helpers and make a small change in translationservice.cpp, both for the preset and glossary changes above.

Testing

  • Built the project with cmake --build build. No errors or warnings.
  • Ran ctest on the build: 5 of 5 tests passed.
  • Launched the real qtpotato app with the Union style and opened the glossary dialog with 30 terms. Checked the spacing visually against the HIG values. Screenshots are not attached here.
  • Not run: manual pass over the Settings pages and every menu in the real app. The menu changes were checked by build and tests only.
  • Not run: end-to-end translation with a live glossary save.
## Summary - Add `AppMenu` and `AppMenuItem` components so every app menu uses one consistent item layout. `AppMenuItem` fills in the Kirigami mnemonic label that the Union style does not set, and reserves an icon column so rows without icons line up. - Switch the menus (File, Audio, Subtitles, Video, View, Playback, Help, Settings, hamburger, context, playlist item, recent files, and track lists) to `AppMenu` and `AppMenuItem`. - Move the translation glossary out of `Main.qml` into `GlossaryDialog.qml`. The dialog gets a term count, Add Term and Clear All actions, a column header row, a scrollable list with per-row remove buttons, and an empty-state placeholder. - Glossary spacing follows KDE HIG: outer edges and gaps between groups use `Kirigami.Units.largeSpacing`, and related items use `smallSpacing`. - Tidy the translation settings preset row. The preset description now sits under the combo box in small font. - Add `translationPresets` helpers and make a small change in `translationservice.cpp`, both for the preset and glossary changes above. ## Testing - Built the project with `cmake --build build`. No errors or warnings. - Ran `ctest` on the build: 5 of 5 tests passed. - Launched the real `qtpotato` app with the Union style and opened the glossary dialog with 30 terms. Checked the spacing visually against the HIG values. Screenshots are not attached here. - Not run: manual pass over the Settings pages and every menu in the real app. The menu changes were checked by build and tests only. - Not run: end-to-end translation with a live glossary save.
Sign in to join this conversation.