mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-31 09:50:58 +00:00
fix(core): fix button alignment in T3T1 bootloader
[no changelog]
This commit is contained in:
parent
4ac28e60f6
commit
384615c047
@ -8,7 +8,7 @@ CMAKELISTS = int(ARGUMENTS.get('CMAKELISTS', 0))
|
|||||||
BOOTLOADER_QA = ARGUMENTS.get('BOOTLOADER_QA', '0') == '1'
|
BOOTLOADER_QA = ARGUMENTS.get('BOOTLOADER_QA', '0') == '1'
|
||||||
PRODUCTION = 0 if BOOTLOADER_QA else ARGUMENTS.get('PRODUCTION', '0') == '1'
|
PRODUCTION = 0 if BOOTLOADER_QA else ARGUMENTS.get('PRODUCTION', '0') == '1'
|
||||||
HW_REVISION = ARGUMENTS.get('HW_REVISION', None)
|
HW_REVISION = ARGUMENTS.get('HW_REVISION', None)
|
||||||
NEW_RENDERING = ARGUMENTS.get('NEW_RENDERING', '1') == '1'
|
NEW_RENDERING = ARGUMENTS.get('NEW_RENDERING', '1') == '1' or TREZOR_MODEL in ('T3T1',)
|
||||||
|
|
||||||
if TREZOR_MODEL in ('1', ):
|
if TREZOR_MODEL in ('1', ):
|
||||||
# skip bootloader build
|
# skip bootloader build
|
||||||
|
@ -6,7 +6,7 @@ import tools, models
|
|||||||
TREZOR_MODEL = ARGUMENTS.get('TREZOR_MODEL', 'T')
|
TREZOR_MODEL = ARGUMENTS.get('TREZOR_MODEL', 'T')
|
||||||
CMAKELISTS = int(ARGUMENTS.get('CMAKELISTS', 0))
|
CMAKELISTS = int(ARGUMENTS.get('CMAKELISTS', 0))
|
||||||
HW_REVISION = ARGUMENTS.get('HW_REVISION', None)
|
HW_REVISION = ARGUMENTS.get('HW_REVISION', None)
|
||||||
NEW_RENDERING = ARGUMENTS.get('NEW_RENDERING', '1') == '1'
|
NEW_RENDERING = ARGUMENTS.get('NEW_RENDERING', '1') == '1' or TREZOR_MODEL in ('T3T1',)
|
||||||
|
|
||||||
if TREZOR_MODEL in ('1', 'DISC1', 'DISC2'):
|
if TREZOR_MODEL in ('1', 'DISC1', 'DISC2'):
|
||||||
# skip bootloader_ci build
|
# skip bootloader_ci build
|
||||||
|
@ -6,7 +6,7 @@ import tools, models
|
|||||||
TREZOR_MODEL = ARGUMENTS.get('TREZOR_MODEL', 'T')
|
TREZOR_MODEL = ARGUMENTS.get('TREZOR_MODEL', 'T')
|
||||||
CMAKELISTS = int(ARGUMENTS.get('CMAKELISTS', 0))
|
CMAKELISTS = int(ARGUMENTS.get('CMAKELISTS', 0))
|
||||||
HW_REVISION = 'emulator'
|
HW_REVISION = 'emulator'
|
||||||
NEW_RENDERING = ARGUMENTS.get('NEW_RENDERING', '1') == '1'
|
NEW_RENDERING = ARGUMENTS.get('NEW_RENDERING', '1') == '1' or TREZOR_MODEL in ('T3T1',)
|
||||||
|
|
||||||
if TREZOR_MODEL in ('1', 'DISC1', 'DISC2'):
|
if TREZOR_MODEL in ('1', 'DISC1', 'DISC2'):
|
||||||
# skip bootloader build
|
# skip bootloader build
|
||||||
|
@ -44,7 +44,11 @@ impl<'a> Intro<'a> {
|
|||||||
.styled(button_bld_menu())
|
.styled(button_bld_menu())
|
||||||
.with_expanded_touch_area(Insets::uniform(13)),
|
.with_expanded_touch_area(Insets::uniform(13)),
|
||||||
),
|
),
|
||||||
host: Child::new(Button::with_text("INSTALL FIRMWARE".into()).styled(button_bld())),
|
host: Child::new(
|
||||||
|
Button::with_text("INSTALL FIRMWARE".into())
|
||||||
|
.styled(button_bld())
|
||||||
|
.with_text_align(Alignment::Center),
|
||||||
|
),
|
||||||
text: Child::new(Label::left_aligned(content, TEXT_NORMAL).vertically_centered()),
|
text: Child::new(Label::left_aligned(content, TEXT_NORMAL).vertically_centered()),
|
||||||
warn: (!fw_ok).then_some(Child::new(
|
warn: (!fw_ok).then_some(Child::new(
|
||||||
Label::new("FIRMWARE CORRUPTED".into(), Alignment::Start, TEXT_WARNING)
|
Label::new("FIRMWARE CORRUPTED".into(), Alignment::Start, TEXT_WARNING)
|
||||||
|
@ -5,7 +5,7 @@ use crate::{
|
|||||||
ui::{
|
ui::{
|
||||||
component::{connect::Connect, Label},
|
component::{connect::Connect, Label},
|
||||||
display::{self, Color, Font, Icon},
|
display::{self, Color, Font, Icon},
|
||||||
geometry::{Offset, Point, Rect},
|
geometry::{Alignment, Offset, Point, Rect},
|
||||||
layout::simplified::{run, show},
|
layout::simplified::{run, show},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@ -37,7 +37,7 @@ use super::theme::BLACK;
|
|||||||
#[cfg(feature = "new_rendering")]
|
#[cfg(feature = "new_rendering")]
|
||||||
use crate::ui::{
|
use crate::ui::{
|
||||||
display::{toif::Toif, LOADER_MAX},
|
display::{toif::Toif, LOADER_MAX},
|
||||||
geometry::{Alignment, Alignment2D},
|
geometry::Alignment2D,
|
||||||
model_mercury::cshape::{render_loader, LoaderRange},
|
model_mercury::cshape::{render_loader, LoaderRange},
|
||||||
shape,
|
shape,
|
||||||
shape::render_on_display,
|
shape::render_on_display,
|
||||||
@ -258,12 +258,20 @@ impl UIFeaturesBootloader for ModelMercuryFeatures {
|
|||||||
));
|
));
|
||||||
|
|
||||||
let (left, right) = if should_keep_seed {
|
let (left, right) = if should_keep_seed {
|
||||||
let l = Button::with_text("CANCEL".into()).styled(button_bld());
|
let l = Button::with_text("CANCEL".into())
|
||||||
let r = Button::with_text("INSTALL".into()).styled(button_confirm());
|
.styled(button_bld())
|
||||||
|
.with_text_align(Alignment::Center);
|
||||||
|
let r = Button::with_text("INSTALL".into())
|
||||||
|
.styled(button_confirm())
|
||||||
|
.with_text_align(Alignment::Center);
|
||||||
(l, r)
|
(l, r)
|
||||||
} else {
|
} else {
|
||||||
let l = Button::with_icon(Icon::new(X24)).styled(button_bld());
|
let l = Button::with_icon(Icon::new(X24))
|
||||||
let r = Button::with_icon(Icon::new(CHECK24)).styled(button_confirm());
|
.styled(button_bld())
|
||||||
|
.with_text_align(Alignment::Center);
|
||||||
|
let r = Button::with_icon(Icon::new(CHECK24))
|
||||||
|
.styled(button_confirm())
|
||||||
|
.with_text_align(Alignment::Center);
|
||||||
(l, r)
|
(l, r)
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -290,8 +298,12 @@ impl UIFeaturesBootloader for ModelMercuryFeatures {
|
|||||||
);
|
);
|
||||||
let alert = Label::centered("SEED AND FIRMWARE\nWILL BE ERASED!".into(), TEXT_WIPE_BOLD);
|
let alert = Label::centered("SEED AND FIRMWARE\nWILL BE ERASED!".into(), TEXT_WIPE_BOLD);
|
||||||
|
|
||||||
let right = Button::with_text("RESET".into()).styled(button_wipe_confirm());
|
let right = Button::with_text("RESET".into())
|
||||||
let left = Button::with_text("CANCEL".into()).styled(button_wipe_cancel());
|
.styled(button_wipe_confirm())
|
||||||
|
.with_text_align(Alignment::Center);
|
||||||
|
let left = Button::with_text("CANCEL".into())
|
||||||
|
.styled(button_wipe_cancel())
|
||||||
|
.with_text_align(Alignment::Center);
|
||||||
|
|
||||||
let mut frame = Confirm::new(BLD_WIPE_COLOR, left, right, ConfirmTitle::Icon(icon), msg)
|
let mut frame = Confirm::new(BLD_WIPE_COLOR, left, right, ConfirmTitle::Icon(icon), msg)
|
||||||
.with_alert(alert);
|
.with_alert(alert);
|
||||||
|
Loading…
Reference in New Issue
Block a user