mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-18 05:28:40 +00:00
chore(core): change title of Shamir wallet creation
[no changelog]
This commit is contained in:
parent
18a1e798e8
commit
91740ae4aa
@ -121,12 +121,14 @@ where
|
||||
const TITLE_SPACE: i16 = theme::BUTTON_SPACING;
|
||||
|
||||
let bounds = bounds.inset(self.border);
|
||||
// Allowing for little longer titles to fit in
|
||||
const TITLE_EXTRA_SPACE: Insets = Insets::right(2);
|
||||
if let Some(b) = &mut self.button {
|
||||
let button_side = theme::CORNER_BUTTON_SIDE;
|
||||
let (header_area, button_area) = bounds.split_right(button_side);
|
||||
let (button_area, _) = button_area.split_top(button_side);
|
||||
b.place(button_area);
|
||||
let title_area = self.title.place(header_area);
|
||||
let title_area = self.title.place(header_area.outset(TITLE_EXTRA_SPACE));
|
||||
let remaining = header_area.inset(Insets::top(title_area.height()));
|
||||
let subtitle_area = self.subtitle.place(remaining);
|
||||
|
||||
@ -141,7 +143,7 @@ where
|
||||
let content_area = bounds.inset(Insets::top(header_height + TITLE_SPACE));
|
||||
self.content.place(content_area);
|
||||
} else {
|
||||
let title_area = self.title.place(bounds);
|
||||
let title_area = self.title.place(bounds.outset(TITLE_EXTRA_SPACE));
|
||||
let remaining = bounds.inset(Insets::top(title_area.height()));
|
||||
let subtitle_area = self.subtitle.place(remaining);
|
||||
let remaining = remaining.inset(Insets::top(subtitle_area.height()));
|
||||
|
@ -23,7 +23,7 @@ _DEFAULT_BACKUP_TYPE = BAK_T_BIP39
|
||||
|
||||
|
||||
async def reset_device(msg: ResetDevice) -> Success:
|
||||
from trezor import config, utils
|
||||
from trezor import config
|
||||
from apps.common.request_pin import request_pin_confirm
|
||||
from trezor.ui.layouts import (
|
||||
prompt_backup,
|
||||
@ -39,14 +39,9 @@ async def reset_device(msg: ResetDevice) -> Success:
|
||||
# validate parameters and device state
|
||||
_validate_reset_device(msg)
|
||||
|
||||
# TR only has one-line title, TT can show more lines
|
||||
delimiter = "\n" if utils.MODEL == "T" else " "
|
||||
|
||||
# make sure user knows they're setting up a new wallet
|
||||
if backup_type == BAK_T_SLIP39_BASIC:
|
||||
title = f"Create wallet{delimiter}(Shamir)"
|
||||
elif backup_type == BAK_T_SLIP39_ADVANCED:
|
||||
title = f"Create wallet{delimiter}(Super Shamir)"
|
||||
if backup_type in (BAK_T_SLIP39_BASIC, BAK_T_SLIP39_ADVANCED):
|
||||
title = "Create wallet (Shamir)"
|
||||
else:
|
||||
title = "Create wallet"
|
||||
await confirm_reset_device(title)
|
||||
|
Loading…
Reference in New Issue
Block a user