Skip to content

Commit

Permalink
Try to fix icon alignment.
Browse files Browse the repository at this point in the history
  • Loading branch information
siy committed Nov 4, 2024
1 parent 5fe86fe commit 3c87fdf
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/ui/single_message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ use ledger_device_sdk::ui::bagls::{Icon, RIGHT_ARROW, RIGHT_S_ARROW};
use ledger_device_sdk::ui::gadgets::{clear_screen, get_event};
use ledger_device_sdk::ui::layout::Draw;
use ledger_device_sdk::ui::screen_util::screen_update;
use ledger_device_sdk::ui::SCREEN_WIDTH;

use crate::io::UxEvent;
use crate::ui::utils::CenteredText;
use crate::ui::utils::{CenteredText, TopCenter};

pub enum MessageFeature<'a> {
Plain,
Expand Down Expand Up @@ -64,11 +63,7 @@ impl<'a> SingleMessage<'a> {
RIGHT_S_ARROW.display();
}
MessageFeature::WithIcon(icon) => {
Icon {
icon: icon.icon,
pos: ((SCREEN_WIDTH / 2) as i16, -1),
}
.display();
icon.draw_top_center();
}
}
screen_update();
Expand Down

0 comments on commit 3c87fdf

Please sign in to comment.