Repository navigation
Conversation
- 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.
This was referenced Nov 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
common::caption: the window draws its own caption (flat min / max / close, Windows 11 hover shades, red close) while the hit test returns the real HT* codes: drag, double-click, Snap, Shake, the window menu, resizing, Windows 11 snap layouts. Used by the installer (the header is the title bar), rust-settings, rust-explorer (the tab row, like a browser), wiztree, photoview and rtaskmgr (the top band).Screenshot (rust-settings on Windows 10 21H2, Spanish UI)
Test
Each window on Windows 10 and 11: hover / press / click each button, maximize and restore (content stays on screen), drag, double-click, snap, right click the caption, Alt+Space, resize from every edge, two monitors with different DPI.