[GUI] The top horizontal stroke of 更 in the sidebar footer is never drawn (Windows, 125% scaling)

Aperta Adatta ai principianti
#7,276 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 5 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
72/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
css
Ambito
desktop

Direzione di ricerca

Inizia da app/host/src/styles/app.css e controlla l’interlinea di .navitem e le regole di ritaglio di .navitem__text indicate nel report. Riproduci il problema su Windows con ridimensionamento al 125% e interfaccia in cinese, quindi confronta l’etichetta del piè di pagina della barra laterale con gli screenshot forniti. Il lavoro è completo quando il tratto orizzontale superiore di 更 viene visualizzato per intero e le altre etichette della barra laterale restano leggibili.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Area

[GUI] (the desktop app)

Desktop app, Terminal or source?

Desktop app (Windows)

What happened

Correction to what I filed first: the label is not cut at the bottom. One whole stroke is missing from 更 in the sidebar footer's 更多 label — its top horizontal stroke (第一横) is not drawn, so the character reads as damaged, as if something white covered that stroke. It is like this all the time, at the normal window size and the normal sidebar width.

Side by side, same size, 14x, nothing retouched: https://files.catbox.moe/jsjfh3.png

  • left: this build — inside the red band (the top 1.5 rows of the glyph) there is no horizontal stroke at all;
  • right: the same character at the same 14 px size, rendered normally (Microsoft YaHei, grid-fit) — the top stroke is there, and it is the widest of the four.

Photos from the reporter's own screen: 1:1, as the app draws it · same crop at 10x.

Measured in the photo, in the crop's own device pixels (the display runs at 125% scaling, so 14 CSS px = 17.5 device px):

how many horizontal strokes 更 gets their lengths the row where the top stroke should be
this build 3 (y 311 / 314 / 317 in the corner photo; y 6 / 9 / 12 in the 106x27 crop) 13, 13, 13 y 310 (crop y 5): 3 dark px in total, longest unbroken run 2 px
the same glyph at 14 px, rendered normally 4 (y 5 / 7 / 9 / 12) 14, 11, 11, 11 it is the top bar itself, 14 px long

更 has four horizontal strokes. This build draws three of them, and in the row where the widest one should be, only 3 pixels out of a 16 px span are darker than luminance 200 — the rest is white.

The same thing touches the top row of the other sidebar labels: 技能 top row has 9 dark px with a longest run of 2, 监控 9 px with a longest run of 2, while 模型 keeps a full 11 px run — so it depends on where a given glyph's ink starts, which is why 更 is the one that visibly loses a stroke.

The two rules in the shipped 0.2.22 CSS that fit these numbers (app/host/src/styles/app.css):

  • .navitem { … font: 500 var(--st-fs-md)/1 var(--st-font); … }, and --st-fs-md: 14px → line-height 1 on a 14 px font;
  • .navitem__text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }.

With line-height: 1 the ink of a CJK glyph starts right at the top edge of the line box, and .navitem__text clips whatever sticks out of it, so the first ~1 px of the glyph is shaved off; for 更 that first row is exactly its top horizontal stroke. How to fix it is your call — a real line-height on the nav label, or letting the ink out of the clip box, or something else you prefer.

Smallest steps or command that reproduce it
  1. Windows 11 with the display at 125% scaling, Strata desktop 0.2.22, UI language Chinese, light theme, default density, sidebar at its normal width (not the icon rail).
  2. Look at the sidebar footer row ⋯ 更多, with v0.2.22 and the theme button on the same row — or zoom into that corner.
  3. Compare the 更 there with the same character at 14 px in any other Windows program: Strata's copy has no top horizontal stroke.
Reproduction status

Reproduced locally

Strata version

Strata 0.2.22 · engine 0.1.69 (commit b28ca95e3e6847f2d5e317994f253b66716deeaa)

Graphics card, memory and system

NVIDIA GeForce RTX 3060 Laptop GPU · 64 GB RAM · Windows 11, 2560x1440 at 125% display scaling

Model, size and settings

Not a model screen, it is the sidebar chrome. The parts that matter: UI language Chinese, the 14 px nav label, 125% display scaling.

Logs

None: this is pure rendering. No error text appears and no engine or server side is involved.

Lingua principale
C++
Stelle
11.6k
Fork
1k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Niko1221/Strata

Tutte le issue di Niko1221/Strata

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.