diff --git a/core/embed/rust/src/ui/model_mercury/flow/set_brightness.rs b/core/embed/rust/src/ui/model_mercury/flow/set_brightness.rs index 8461eaa078..938a96d3a6 100644 --- a/core/embed/rust/src/ui/model_mercury/flow/set_brightness.rs +++ b/core/embed/rust/src/ui/model_mercury/flow/set_brightness.rs @@ -64,7 +64,8 @@ impl FlowController for SetBrightness { static BRIGHTNESS: AtomicU8 = AtomicU8::new(0); -pub fn new_set_brightness(brightness: u8) -> Result { +pub fn new_set_brightness(brightness: Option) -> Result { + let brightness = brightness.unwrap_or(theme::backlight::get_backlight_normal()); let content_slider = Frame::left_aligned( TR::brightness__title.into(), NumberInputSliderDialog::new( @@ -122,6 +123,7 @@ pub fn new_set_brightness(brightness: u8) -> Result { ) .with_footer(TR::instructions__swipe_up.into(), None) .with_swipe(Direction::Up, SwipeSettings::default()) + .with_result_icon(theme::ICON_BULLET_CHECKMARK, theme::GREEN_LIGHT) .map(move |_msg| Some(FlowMsg::Confirmed)); let res = SwipeFlow::new(&SetBrightness::Slider)? diff --git a/core/embed/rust/src/ui/model_mercury/layout.rs b/core/embed/rust/src/ui/model_mercury/layout.rs index 65358ce6c0..b2e39603a6 100644 --- a/core/embed/rust/src/ui/model_mercury/layout.rs +++ b/core/embed/rust/src/ui/model_mercury/layout.rs @@ -676,7 +676,7 @@ extern "C" fn new_confirm_summary(n_args: usize, args: *const Obj, kwargs: *mut extern "C" fn new_set_brightness(n_args: usize, args: *const Obj, kwargs: *mut Map) -> Obj { let block = move |_args: &[Obj], kwargs: &Map| { - let current: u8 = kwargs.get(Qstr::MP_QSTR_current)?.try_into()?; + let current: Option = kwargs.get(Qstr::MP_QSTR_current)?.try_into_option()?; let flow = flow::set_brightness::new_set_brightness(current)?; Ok(LayoutObj::new_root(flow)?.into()) };