Skip to content

installer: header grid, whole label on hover - #154

Open
Tkyoxx wants to merge 9 commits into
Lemxy:mainfrom
Tkyoxx:pr/9-installer-polish
Open

Tkyoxx wants to merge 9 commits into
Lemxy:mainfrom
Tkyoxx:pr/9-installer-polish

Conversation

@Tkyoxx

@Tkyoxx Tkyoxx commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Stacked on #144, #149. Until those are merged this branch also carries their commits, so the diff below is bigger than this PR. Its own change is 3 commits; I will rebase it as soon as #149 is in.

What

  • The W mark and the name share the step list's grid.
  • common::tip: a window notes each text it had to shorten while painting; resting the pointer on one shows the whole text in a small popup. The installer uses it for descriptions, notes and errors.
  • common asks windows-sys for the LibraryLoader feature tip.rs needs: whole-workspace builds got it through another member, cargo test -p winrust-common alone did not build.

Screenshot (the installer on Windows 10 21H2, Spanish UI)

The installer header lined up with the step list

Test

cargo test -p winrust-common (alone); in the installer, a narrow window: hover a cut description.

- winrust-common: Lang::Es and Lang::ALL; t!/tf! take an optional es: arm
  after zh: (or after pt: in calls without zh:), and any language left out
  shows the English text, so nothing is ever blank or a raw key.
- No lang.txt: the Windows UI language when WinRust has it, else English.
- lang() re-reads lang.txt at most once a second and set_lang broadcasts
  style::msg(), so open windows switch without a restart: topbar now listens
  for the broadcast, rust-settings rebuilds its pages and rust-explorer its
  column headers and navigation pane when the language moved. The "restart
  the programs" notes say the switch is immediate now.
- The installer list, rust-settings and the bar's language page take their
  languages from Lang::ALL (Spanish included); --lang accepts es.
- Spanish for every t!/tf! call (1,246), the installer table, the Run box
  commands and the Start button menu, plus the few strings still English-only
  in rust-explorer.
- rs-launcher's counts gave "2 registry entrys" and Portuguese had no plural
  at all: every language now spells out its singular and plural.
The WinRust windows paint everything themselves except the caption, so on
Windows 10 each one wore the old system title bar on top of a modern page.

caption.rs takes the standard caption away (WM_NCCALCSIZE: the whole window
is client area) and lets the window paint flat minimize / maximize / close
buttons in its own colours, with Windows 11's hover shades and the red close.
The hit test answers with the real HT* codes, so dragging, double-click to
maximize, Aero Snap and Shake, the window menu (right click, Alt+Space),
resizing from every edge and Windows 11's snap layouts keep working. Clicks
on the buttons are handled here, not by DefWindowProc, which would paint the
classic buttons over ours while tracking them. A maximized window keeps its
frame off-screen out of the client area; one pixel of DWM frame keeps the
shadow on Windows 10. A child window lying over the caption can paint the
buttons and pass the free parts through with HTTRANSPARENT.

The installer's dark header is the title bar now: it drags the window, the
language list moved left to clear the buttons.
The buttons sit at the top right and the page title's band drags the window, as in Windows 11 Settings; the sidebar's page list stays clickable where it reaches into that band. The caption colour attributes are gone with the caption.
Like a browser: the tabs sit in the caption, its free space drags the window and the buttons sit at its right end. The chrome child answers HTTRANSPARENT there, so the top-level window does the caption's work, and it paints the buttons itself. Tabs leave room for them. The desktop window (--desktop) is left alone.
WinRust Disk's path line is the caption. The photo viewer gets a thin strip with the file's name, position and size over the picture area; zoom and panning count from under it.
The band drags the window except over the menu button and the page buttons, which move left to clear the caption buttons. The search box is a window of its own and keeps working as before.
The W mark sat to the right of the step circles' column and the name started
past the step names; both share the side list's grid now.
tip.rs: a window notes each text it had to shorten while painting, and the
pointer resting on one for a moment opens a small popup with the whole text,
in the language the label is in, wrapped and kept on screen. The installer
notes every DT_END_ELLIPSIS text it draws (descriptions, notes, errors).
tip.rs uses GetModuleHandleW but the crate never asked windows-sys for
LibraryLoader; whole-workspace builds hid it through another member's
features, so cargo test -p winrust-common did not build.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant