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

オープン 初心者向け
#7,276 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 5 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
css
領域
desktop

調査の方向性

app/host/src/styles/app.cssから始め、報告で挙げられている.navitemの行の高さと.navitem__textのクリッピング規則を確認してください。Windowsで表示スケールを125%にし、中国語UIで再現して、サイドバーのフッターラベルを提供されたスクリーンショットと比較してください。更の上部の横画が完全に表示され、ほかのサイドバーラベルも読みやすい状態になれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
C++
スター
11.6k
フォーク
1k
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Niko1221/Strata のほかの issue

Niko1221/Strata の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。