1
0
forked from GRIN/grim

goblin: back-hint polish — switcher wording, quiet-toast look (Build 148)

The first-back pill now reads "Press back again to switch wallets"
(re-translated in all six locales) and is styled as a native quiet toast: a
solid soft pill with no border, small regular dim text — no accent colors,
nothing loud. No haptic on the back press (owner's call). Behavior unchanged.
This commit is contained in:
2ro
2026-07-06 00:45:54 -04:00
parent e9f3bd453b
commit c0cdeb6d6b
7 changed files with 16 additions and 11 deletions
+1 -1
View File
@@ -376,7 +376,7 @@ goblin:
nav_activity: "Aktivität"
nav_receive: "Empfangen"
nav_settings: "Einstellungen"
back_again: "Erneut Zurück drücken, um diese Wallet zu verlassen"
back_again: "Erneut Zurück drücken, um die Wallet zu wechseln"
activity: "Aktivität"
news: "Neuigkeiten"
empty_title: "Noch keine Aktivität"
+1 -1
View File
@@ -376,7 +376,7 @@ goblin:
nav_activity: "Activity"
nav_receive: "Receive"
nav_settings: "Settings"
back_again: "Press back again to leave this wallet"
back_again: "Press back again to switch wallets"
activity: "Activity"
news: "News"
empty_title: "No activity yet"
+1 -1
View File
@@ -376,7 +376,7 @@ goblin:
nav_activity: "Activité"
nav_receive: "Recevoir"
nav_settings: "Réglages"
back_again: "Appuyez à nouveau sur retour pour quitter ce portefeuille"
back_again: "Appuyez à nouveau sur retour pour changer de portefeuille"
activity: "Activité"
news: "Actualités"
empty_title: "Aucune activité"
+1 -1
View File
@@ -376,7 +376,7 @@ goblin:
nav_activity: "Действия"
nav_receive: "Получить"
nav_settings: "Настройки"
back_again: "Нажмите «назад» ещё раз, чтобы выйти из этого кошелька"
back_again: "Нажмите «назад» ещё раз, чтобы сменить кошелёк"
activity: "Действия"
news: "Новости"
empty_title: "Пока нет действий"
+1 -1
View File
@@ -376,7 +376,7 @@ goblin:
nav_activity: "Etkinlik"
nav_receive: "Al"
nav_settings: "Ayarlar"
back_again: "Bu cüzdandan ayrılmak için tekrar geri bas"
back_again: "Cüzdan değiştirmek için tekrar geri bas"
activity: "Etkinlik"
news: "Haberler"
empty_title: "Henüz etkinlik yok"
+1 -1
View File
@@ -376,7 +376,7 @@ goblin:
nav_activity: "动态"
nav_receive: "收款"
nav_settings: "设置"
back_again: "再按一次返回即可离开此钱包"
back_again: "再按一次返回以切换钱包"
activity: "动态"
news: "新闻"
empty_title: "暂无动态"
+10 -5
View File
@@ -498,7 +498,9 @@ impl GoblinWalletView {
// Fade over the final 0.5s.
let alpha = ((SHOW_SECS - elapsed) / 0.5).clamp(0.0, 1.0);
let text = t!("goblin.home.back_again");
let font = FontId::new(14.0, fonts::medium());
// Native quiet-toast look: a solid soft pill, no border, small regular
// dim text — no accent, nothing loud.
let font = FontId::new(13.0, fonts::regular());
egui::Area::new(egui::Id::new("goblin_back_hint"))
.order(egui::Order::Foreground)
.anchor(
@@ -509,7 +511,7 @@ impl GoblinWalletView {
.show(ctx, |ui| {
let galley =
ui.painter()
.layout_no_wrap(text.to_string(), font.clone(), t.surface_text);
.layout_no_wrap(text.to_string(), font.clone(), t.surface_text_dim);
let pad = Vec2::new(16.0, 10.0);
let size = galley.size() + pad * 2.0;
let (rect, _) = ui.allocate_exact_size(size, Sense::hover());
@@ -517,11 +519,14 @@ impl GoblinWalletView {
rect,
CornerRadius::same((size.y / 2.0) as u8),
t.surface2.gamma_multiply(alpha),
Stroke::new(1.0, t.line.gamma_multiply(alpha)),
Stroke::NONE,
egui::StrokeKind::Inside,
);
ui.painter()
.galley(rect.min + pad, galley, t.surface_text.gamma_multiply(alpha));
ui.painter().galley(
rect.min + pad,
galley,
t.surface_text_dim.gamma_multiply(alpha),
);
});
ctx.request_repaint_after(std::time::Duration::from_millis(50));
}