Skip to content

Commit 2da823d

Browse files
sebgodclaude
andcommitted
Size Discover button to widest label to prevent layout shift
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 456d648 commit 2da823d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/TianWen.UI.Gui/VkEquipmentTab.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ private void RenderDeviceList(
517517
// [Discover] button at the bottom of the list area
518518
var discoverBtnY = y + h - buttonH - padding;
519519
var discoverLabel = State.IsDiscovering ? "Discovering..." : "Discover";
520-
var discoverBtnW = _renderer.MeasureText(discoverLabel.AsSpan(), fontPath, fontSize).Width + padding * 4f;
520+
var discoverBtnW = _renderer.MeasureText("Discovering...".AsSpan(), fontPath, fontSize).Width + padding * 4f;
521521
var discoverBtnX = x + padding;
522522

523523
FillRect(discoverBtnX, discoverBtnY, discoverBtnW, buttonH, CreateButton);

0 commit comments

Comments
 (0)