Skip to content

Commit 4fd5c56

Browse files
Ethanclaude
andcommitted
<misc> UpgradeWindow: 调整 UpdateAvailable 布局
- 按钮移到右下角:Later 在左侧,Download 在最右侧 - 按钮间距 8px - 版本信息格式改为 current: vX / → latest: vY Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 97f69bd commit 4fd5c56

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

mgit-gui/src/ui/windows/upgrade.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,15 +113,17 @@ impl super::View for UpgradeWindow {
113113
} => {
114114
ui.label("");
115115
ui.heading("New version available!");
116-
ui.label(format!("v{latest} → current: v{current}"));
116+
ui.label(format!("current: v{current}"));
117+
ui.label(format!(" → latest: v{latest}"));
117118
ui.label("");
118-
ui.horizontal(|ui| {
119-
if ui.button(" Download ").clicked() {
120-
self.action = Some(UpgradeAction::Download);
121-
}
122-
if ui.button(" Later ").clicked() {
119+
ui.with_layout(egui::Layout::right_to_left(egui::Align::BOTTOM), |ui| {
120+
ui.spacing_mut().item_spacing = egui::vec2(8.0, 0.0);
121+
if ui.button("Later").clicked() {
123122
self.action = Some(UpgradeAction::Close);
124123
}
124+
if ui.button("Download").clicked() {
125+
self.action = Some(UpgradeAction::Download);
126+
}
125127
});
126128
}
127129

0 commit comments

Comments
 (0)