design: 設定 › 模型 的供應商清單只在可用的那幾個前面放綠點,沒設定的不再畫空圈(看起來像單選鈕)

This commit is contained in:
王性驊 2026-11-16 23:07:05 +08:00
parent fe222507f4
commit 139a3eaf2a
1 changed files with 2 additions and 2 deletions

View File

@ -5410,10 +5410,10 @@ impl App {
ui.painter().rect_filled(rect, R_M, if on { p.active } else { p.hover }); ui.painter().rect_filled(rect, R_M, if on { p.active } else { p.hover });
} }
let dot = rect.left_center() + vec2(14.0, 0.0); let dot = rect.left_center() + vec2(14.0, 0.0);
// Only the ready ones get a mark (a green dot); an empty ring before
// every other one read as a radio button to pick.
if ready { if ready {
ui.painter().circle_filled(dot, 4.0, p.up); ui.painter().circle_filled(dot, 4.0, p.up);
} else {
ui.painter().circle_stroke(dot, 3.5, Stroke::new(1.2, p.text3));
} }
ui.painter().text(rect.left_center() + vec2(28.0, 0.0), egui::Align2::LEFT_CENTER, k.label(), egui::FontId::proportional(FONT_BASE), if on { p.text } else { p.text2 }); ui.painter().text(rect.left_center() + vec2(28.0, 0.0), egui::Align2::LEFT_CENTER, k.label(), egui::FontId::proportional(FONT_BASE), if on { p.text } else { p.text2 });
let tip = if ready { "已可使用" } else { "還沒設定金鑰" }; let tip = if ready { "已可使用" } else { "還沒設定金鑰" };