New Widgets: Use new Buttons in more places

This commit is contained in:
Bu5hm4nn 2024-04-25 11:42:23 -06:00
parent b6e535424f
commit 31eb195b61
2 changed files with 13 additions and 3 deletions

View File

@ -98,7 +98,11 @@ pub(super) fn update(app: &mut GossipUi, ctx: &Context, ui: &mut Ui) {
ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| {
ui.add_space(16.0);
if ui.button("Edit List").clicked() {
if widgets::Button::bordered(&app.theme, "Edit List")
.small(true)
.show(ui)
.clicked()
{
app.set_page(ctx, Page::PeopleList(list));
}

View File

@ -2204,13 +2204,19 @@ fn force_login(app: &mut GossipUi, ctx: &Context) {
ui.label("In case you cannot login, here is your escape hatch:");
if app.delete_confirm {
ui.label("Please confirm that you really mean to do this: ");
if ui.button("Delete Identity (Yes I'm Sure)").clicked() {
if widgets::Button::primary(&app.theme, "Delete Identity (Yes I'm Sure)")
.with_danger_hover()
.show(ui)
.clicked() {
let _ = GLOBALS.to_overlord.send(ToOverlordMessage::DeletePriv);
app.delete_confirm = false;
cancel_login();
}
} else {
if ui.button("Delete Identity (Cannot be undone!)").clicked() {
if widgets::Button::primary(&app.theme, "Delete Identity (Cannot be undone!)")
.with_danger_hover()
.show(ui)
.clicked() {
app.delete_confirm = true;
}
}