mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-02-02 02:41:28 +00:00
perf(core/rust): drop NamedToif
Makes structs larger despite only being used in panic. [no changelog]
This commit is contained in:
parent
1fa9a58fa5
commit
194868438a
@ -3,10 +3,7 @@ use crate::{
|
|||||||
ui::{
|
ui::{
|
||||||
component::{Component, Event, EventCtx, Never},
|
component::{Component, Event, EventCtx, Never},
|
||||||
display,
|
display,
|
||||||
display::{
|
display::{toif::Toif, Color, Icon},
|
||||||
toif::{NamedToif, Toif},
|
|
||||||
Color, Icon,
|
|
||||||
},
|
|
||||||
geometry::{Alignment2D, Offset, Point, Rect, CENTER},
|
geometry::{Alignment2D, Offset, Point, Rect, CENTER},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@ -18,9 +15,9 @@ pub struct Image {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Image {
|
impl Image {
|
||||||
pub fn new(named_toif: NamedToif) -> Self {
|
pub fn new(data: &'static [u8]) -> Self {
|
||||||
let toif = Toif::new(named_toif);
|
let toif = Toif::new(data);
|
||||||
ensure!(toif.format == ToifFormat::FullColorLE, toif.name);
|
assert!(toif.format == ToifFormat::FullColorLE);
|
||||||
Self {
|
Self {
|
||||||
toif,
|
toif,
|
||||||
area: Rect::zero(),
|
area: Rect::zero(),
|
||||||
|
@ -13,7 +13,7 @@ use crate::trezorhal::{
|
|||||||
|
|
||||||
use crate::ui::{
|
use crate::ui::{
|
||||||
constant::{screen, LOADER_OUTER},
|
constant::{screen, LOADER_OUTER},
|
||||||
display::toif::{Icon, NamedToif},
|
display::toif::Icon,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const LOADER_MIN: u16 = 0;
|
pub const LOADER_MIN: u16 = 0;
|
||||||
@ -73,7 +73,7 @@ pub extern "C" fn loader_uncompress_r(
|
|||||||
|
|
||||||
let i = if icon_data != 0 {
|
let i = if icon_data != 0 {
|
||||||
let data_slice = unsafe { from_raw_parts(icon_data as _, icon_data_size as _) };
|
let data_slice = unsafe { from_raw_parts(icon_data as _, icon_data_size as _) };
|
||||||
Some((Icon::new(NamedToif(data_slice, "loader icon")), ic_color))
|
Some((Icon::new(data_slice), ic_color))
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
};
|
};
|
||||||
|
@ -15,11 +15,6 @@ use super::Color;
|
|||||||
|
|
||||||
const TOIF_HEADER_LENGTH: usize = 12;
|
const TOIF_HEADER_LENGTH: usize = 12;
|
||||||
|
|
||||||
/// Storing the icon together with its name
|
|
||||||
/// Needs to be a tuple-struct, so it can be made `const`
|
|
||||||
#[derive(Debug, Clone, Copy)]
|
|
||||||
pub struct NamedToif(pub &'static [u8], pub &'static str);
|
|
||||||
|
|
||||||
pub fn toif_info(data: &[u8]) -> Option<(Offset, ToifFormat)> {
|
pub fn toif_info(data: &[u8]) -> Option<(Offset, ToifFormat)> {
|
||||||
if let Ok(info) = trezorhal::display::toif_info(data) {
|
if let Ok(info) = trezorhal::display::toif_info(data) {
|
||||||
Some((
|
Some((
|
||||||
@ -73,17 +68,15 @@ pub fn icon(icon: &Icon, center: Point, fg_color: Color, bg_color: Color) {
|
|||||||
#[derive(PartialEq, Eq, Clone, Copy)]
|
#[derive(PartialEq, Eq, Clone, Copy)]
|
||||||
pub struct Toif {
|
pub struct Toif {
|
||||||
pub data: &'static [u8],
|
pub data: &'static [u8],
|
||||||
pub name: &'static str, // useful for debugging purposes.
|
|
||||||
pub size: Offset,
|
pub size: Offset,
|
||||||
pub format: ToifFormat,
|
pub format: ToifFormat,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Toif {
|
impl Toif {
|
||||||
pub fn new(named_toif: NamedToif) -> Self {
|
pub fn new(data: &'static [u8]) -> Self {
|
||||||
let info = unwrap!(toif_info(named_toif.0));
|
let info = unwrap!(toif_info(data));
|
||||||
Self {
|
Self {
|
||||||
data: named_toif.0[TOIF_HEADER_LENGTH..].as_ref(),
|
data: data[TOIF_HEADER_LENGTH..].as_ref(),
|
||||||
name: named_toif.1,
|
|
||||||
size: info.0,
|
size: info.0,
|
||||||
format: info.1,
|
format: info.1,
|
||||||
}
|
}
|
||||||
@ -99,7 +92,7 @@ impl Toif {
|
|||||||
|
|
||||||
pub fn uncompress(&self, dest: &mut [u8]) {
|
pub fn uncompress(&self, dest: &mut [u8]) {
|
||||||
let mut ctx = self.decompression_context(None);
|
let mut ctx = self.decompression_context(None);
|
||||||
unwrap!(ctx.uncompress(dest), self.name);
|
unwrap!(ctx.uncompress(dest));
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn decompression_context<'a>(
|
pub fn decompression_context<'a>(
|
||||||
@ -116,9 +109,9 @@ pub struct Icon {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Icon {
|
impl Icon {
|
||||||
pub fn new(named_toif: NamedToif) -> Self {
|
pub fn new(data: &'static [u8]) -> Self {
|
||||||
let toif = Toif::new(named_toif);
|
let toif = Toif::new(data);
|
||||||
ensure!(toif.format == ToifFormat::GrayScaleEH, toif.name);
|
assert!(toif.format == ToifFormat::GrayScaleEH);
|
||||||
Self { toif }
|
Self { toif }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,45 +2,43 @@
|
|||||||
//! (by running `make templates` in `core`)
|
//! (by running `make templates` in `core`)
|
||||||
//! do not edit manually!
|
//! do not edit manually!
|
||||||
|
|
||||||
use crate::ui::display::toif::NamedToif;
|
|
||||||
|
|
||||||
|
const ICON_AWS: &[u8] = include_res!("model_tt/res/fido/icon_aws.toif");
|
||||||
const ICON_AWS: NamedToif = NamedToif(include_res!("model_tt/res/fido/icon_aws.toif"), "AWS");
|
const ICON_BINANCE: &[u8] = include_res!("model_tt/res/fido/icon_binance.toif");
|
||||||
const ICON_BINANCE: NamedToif = NamedToif(include_res!("model_tt/res/fido/icon_binance.toif"), "BINANCE");
|
const ICON_BITBUCKET: &[u8] = include_res!("model_tt/res/fido/icon_bitbucket.toif");
|
||||||
const ICON_BITBUCKET: NamedToif = NamedToif(include_res!("model_tt/res/fido/icon_bitbucket.toif"), "BITBUCKET");
|
const ICON_BITFINEX: &[u8] = include_res!("model_tt/res/fido/icon_bitfinex.toif");
|
||||||
const ICON_BITFINEX: NamedToif = NamedToif(include_res!("model_tt/res/fido/icon_bitfinex.toif"), "BITFINEX");
|
const ICON_BITWARDEN: &[u8] = include_res!("model_tt/res/fido/icon_bitwarden.toif");
|
||||||
const ICON_BITWARDEN: NamedToif = NamedToif(include_res!("model_tt/res/fido/icon_bitwarden.toif"), "BITWARDEN");
|
const ICON_CLOUDFLARE: &[u8] = include_res!("model_tt/res/fido/icon_cloudflare.toif");
|
||||||
const ICON_CLOUDFLARE: NamedToif = NamedToif(include_res!("model_tt/res/fido/icon_cloudflare.toif"), "CLOUDFLARE");
|
const ICON_COINBASE: &[u8] = include_res!("model_tt/res/fido/icon_coinbase.toif");
|
||||||
const ICON_COINBASE: NamedToif = NamedToif(include_res!("model_tt/res/fido/icon_coinbase.toif"), "COINBASE");
|
const ICON_DASHLANE: &[u8] = include_res!("model_tt/res/fido/icon_dashlane.toif");
|
||||||
const ICON_DASHLANE: NamedToif = NamedToif(include_res!("model_tt/res/fido/icon_dashlane.toif"), "DASHLANE");
|
const ICON_DROPBOX: &[u8] = include_res!("model_tt/res/fido/icon_dropbox.toif");
|
||||||
const ICON_DROPBOX: NamedToif = NamedToif(include_res!("model_tt/res/fido/icon_dropbox.toif"), "DROPBOX");
|
const ICON_DUO: &[u8] = include_res!("model_tt/res/fido/icon_duo.toif");
|
||||||
const ICON_DUO: NamedToif = NamedToif(include_res!("model_tt/res/fido/icon_duo.toif"), "DUO");
|
const ICON_FACEBOOK: &[u8] = include_res!("model_tt/res/fido/icon_facebook.toif");
|
||||||
const ICON_FACEBOOK: NamedToif = NamedToif(include_res!("model_tt/res/fido/icon_facebook.toif"), "FACEBOOK");
|
const ICON_FASTMAIL: &[u8] = include_res!("model_tt/res/fido/icon_fastmail.toif");
|
||||||
const ICON_FASTMAIL: NamedToif = NamedToif(include_res!("model_tt/res/fido/icon_fastmail.toif"), "FASTMAIL");
|
const ICON_FEDORA: &[u8] = include_res!("model_tt/res/fido/icon_fedora.toif");
|
||||||
const ICON_FEDORA: NamedToif = NamedToif(include_res!("model_tt/res/fido/icon_fedora.toif"), "FEDORA");
|
const ICON_GANDI: &[u8] = include_res!("model_tt/res/fido/icon_gandi.toif");
|
||||||
const ICON_GANDI: NamedToif = NamedToif(include_res!("model_tt/res/fido/icon_gandi.toif"), "GANDI");
|
const ICON_GEMINI: &[u8] = include_res!("model_tt/res/fido/icon_gemini.toif");
|
||||||
const ICON_GEMINI: NamedToif = NamedToif(include_res!("model_tt/res/fido/icon_gemini.toif"), "GEMINI");
|
const ICON_GITHUB: &[u8] = include_res!("model_tt/res/fido/icon_github.toif");
|
||||||
const ICON_GITHUB: NamedToif = NamedToif(include_res!("model_tt/res/fido/icon_github.toif"), "GITHUB");
|
const ICON_GITLAB: &[u8] = include_res!("model_tt/res/fido/icon_gitlab.toif");
|
||||||
const ICON_GITLAB: NamedToif = NamedToif(include_res!("model_tt/res/fido/icon_gitlab.toif"), "GITLAB");
|
const ICON_GOOGLE: &[u8] = include_res!("model_tt/res/fido/icon_google.toif");
|
||||||
const ICON_GOOGLE: NamedToif = NamedToif(include_res!("model_tt/res/fido/icon_google.toif"), "GOOGLE");
|
const ICON_INVITY: &[u8] = include_res!("model_tt/res/fido/icon_invity.toif");
|
||||||
const ICON_INVITY: NamedToif = NamedToif(include_res!("model_tt/res/fido/icon_invity.toif"), "INVITY");
|
const ICON_KEEPER: &[u8] = include_res!("model_tt/res/fido/icon_keeper.toif");
|
||||||
const ICON_KEEPER: NamedToif = NamedToif(include_res!("model_tt/res/fido/icon_keeper.toif"), "KEEPER");
|
const ICON_KRAKEN: &[u8] = include_res!("model_tt/res/fido/icon_kraken.toif");
|
||||||
const ICON_KRAKEN: NamedToif = NamedToif(include_res!("model_tt/res/fido/icon_kraken.toif"), "KRAKEN");
|
const ICON_LOGIN_GOV: &[u8] = include_res!("model_tt/res/fido/icon_login.gov.toif");
|
||||||
const ICON_LOGIN_GOV: NamedToif = NamedToif(include_res!("model_tt/res/fido/icon_login.gov.toif"), "LOGIN_GOV");
|
const ICON_MICROSOFT: &[u8] = include_res!("model_tt/res/fido/icon_microsoft.toif");
|
||||||
const ICON_MICROSOFT: NamedToif = NamedToif(include_res!("model_tt/res/fido/icon_microsoft.toif"), "MICROSOFT");
|
const ICON_MOJEID: &[u8] = include_res!("model_tt/res/fido/icon_mojeid.toif");
|
||||||
const ICON_MOJEID: NamedToif = NamedToif(include_res!("model_tt/res/fido/icon_mojeid.toif"), "MOJEID");
|
const ICON_NAMECHEAP: &[u8] = include_res!("model_tt/res/fido/icon_namecheap.toif");
|
||||||
const ICON_NAMECHEAP: NamedToif = NamedToif(include_res!("model_tt/res/fido/icon_namecheap.toif"), "NAMECHEAP");
|
const ICON_PROTON: &[u8] = include_res!("model_tt/res/fido/icon_proton.toif");
|
||||||
const ICON_PROTON: NamedToif = NamedToif(include_res!("model_tt/res/fido/icon_proton.toif"), "PROTON");
|
const ICON_SLUSHPOOL: &[u8] = include_res!("model_tt/res/fido/icon_slushpool.toif");
|
||||||
const ICON_SLUSHPOOL: NamedToif = NamedToif(include_res!("model_tt/res/fido/icon_slushpool.toif"), "SLUSHPOOL");
|
const ICON_STRIPE: &[u8] = include_res!("model_tt/res/fido/icon_stripe.toif");
|
||||||
const ICON_STRIPE: NamedToif = NamedToif(include_res!("model_tt/res/fido/icon_stripe.toif"), "STRIPE");
|
const ICON_TUTANOTA: &[u8] = include_res!("model_tt/res/fido/icon_tutanota.toif");
|
||||||
const ICON_TUTANOTA: NamedToif = NamedToif(include_res!("model_tt/res/fido/icon_tutanota.toif"), "TUTANOTA");
|
|
||||||
/// Default icon when app does not have its own
|
/// Default icon when app does not have its own
|
||||||
const ICON_WEBAUTHN: NamedToif = NamedToif(include_res!("model_tt/res/fido/icon_webauthn.toif"), "WEBAUTHN");
|
const ICON_WEBAUTHN: &[u8] = include_res!("model_tt/res/fido/icon_webauthn.toif");
|
||||||
|
|
||||||
/// Translates icon name into its data.
|
/// Translates icon name into its data.
|
||||||
/// Returns default `ICON_WEBAUTHN` when the icon is not found or name not
|
/// Returns default `ICON_WEBAUTHN` when the icon is not found or name not
|
||||||
/// supplied.
|
/// supplied.
|
||||||
pub fn get_fido_icon_data<T: AsRef<str>>(icon_name: Option<T>) -> NamedToif {
|
pub fn get_fido_icon_data<T: AsRef<str>>(icon_name: Option<T>) -> &'static [u8] {
|
||||||
if let Some(icon_name) = icon_name {
|
if let Some(icon_name) = icon_name {
|
||||||
match icon_name.as_ref() {
|
match icon_name.as_ref() {
|
||||||
"aws" => ICON_AWS,
|
"aws" => ICON_AWS,
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
//! (by running `make templates` in `core`)
|
//! (by running `make templates` in `core`)
|
||||||
//! do not edit manually!
|
//! do not edit manually!
|
||||||
|
|
||||||
use crate::ui::display::toif::NamedToif;
|
|
||||||
|
|
||||||
<%
|
<%
|
||||||
icons: list[tuple[str, str]] = []
|
icons: list[tuple[str, str]] = []
|
||||||
for app in fido:
|
for app in fido:
|
||||||
@ -15,15 +13,15 @@ for app in fido:
|
|||||||
%>\
|
%>\
|
||||||
|
|
||||||
% for icon_name, var_name in icons:
|
% for icon_name, var_name in icons:
|
||||||
const ICON_${var_name}: NamedToif = NamedToif(include_res!("model_tt/res/fido/icon_${icon_name}.toif"), "${var_name}");
|
const ICON_${var_name}: &[u8] = include_res!("model_tt/res/fido/icon_${icon_name}.toif");
|
||||||
% endfor
|
% endfor
|
||||||
/// Default icon when app does not have its own
|
/// Default icon when app does not have its own
|
||||||
const ICON_WEBAUTHN: NamedToif = NamedToif(include_res!("model_tt/res/fido/icon_webauthn.toif"), "WEBAUTHN");
|
const ICON_WEBAUTHN: &[u8] = include_res!("model_tt/res/fido/icon_webauthn.toif");
|
||||||
|
|
||||||
/// Translates icon name into its data.
|
/// Translates icon name into its data.
|
||||||
/// Returns default `ICON_WEBAUTHN` when the icon is not found or name not
|
/// Returns default `ICON_WEBAUTHN` when the icon is not found or name not
|
||||||
/// supplied.
|
/// supplied.
|
||||||
pub fn get_fido_icon_data<T: AsRef<str>>(icon_name: Option<T>) -> NamedToif {
|
pub fn get_fido_icon_data<T: AsRef<str>>(icon_name: Option<T>) -> &'static [u8] {
|
||||||
if let Some(icon_name) = icon_name {
|
if let Some(icon_name) = icon_name {
|
||||||
match icon_name.as_ref() {
|
match icon_name.as_ref() {
|
||||||
% for icon_name, var_name in icons:
|
% for icon_name, var_name in icons:
|
||||||
|
@ -12,7 +12,6 @@ use crate::{
|
|||||||
|
|
||||||
use super::component::{ButtonStyle, ButtonStyleSheet, LoaderStyle, LoaderStyleSheet};
|
use super::component::{ButtonStyle, ButtonStyleSheet, LoaderStyle, LoaderStyleSheet};
|
||||||
|
|
||||||
use crate::ui::display::toif::NamedToif;
|
|
||||||
use num_traits::FromPrimitive;
|
use num_traits::FromPrimitive;
|
||||||
|
|
||||||
pub const ERASE_HOLD_DURATION: Duration = Duration::from_millis(1500);
|
pub const ERASE_HOLD_DURATION: Duration = Duration::from_millis(1500);
|
||||||
@ -53,67 +52,41 @@ pub const QR_SIDE_MAX: u32 = 140;
|
|||||||
pub const ICON_SIZE: i16 = 16;
|
pub const ICON_SIZE: i16 = 16;
|
||||||
|
|
||||||
// UI icons (greyscale).
|
// UI icons (greyscale).
|
||||||
pub const ICON_CANCEL: NamedToif = NamedToif(include_res!("model_tt/res/cancel.toif"), "cancel");
|
pub const ICON_CANCEL: &[u8] = include_res!("model_tt/res/cancel.toif");
|
||||||
pub const ICON_CONFIRM: NamedToif = NamedToif(include_res!("model_tt/res/confirm.toif"), "confirm");
|
pub const ICON_CONFIRM: &[u8] = include_res!("model_tt/res/confirm.toif");
|
||||||
pub const ICON_SPACE: NamedToif = NamedToif(include_res!("model_tt/res/space.toif"), "space");
|
pub const ICON_SPACE: &[u8] = include_res!("model_tt/res/space.toif");
|
||||||
pub const ICON_BACK: NamedToif = NamedToif(include_res!("model_tt/res/back.toif"), "back");
|
pub const ICON_BACK: &[u8] = include_res!("model_tt/res/back.toif");
|
||||||
pub const ICON_CLICK: NamedToif = NamedToif(include_res!("model_tt/res/click.toif"), "click");
|
pub const ICON_CLICK: &[u8] = include_res!("model_tt/res/click.toif");
|
||||||
pub const ICON_NEXT: NamedToif = NamedToif(include_res!("model_tt/res/next.toif"), "next");
|
pub const ICON_NEXT: &[u8] = include_res!("model_tt/res/next.toif");
|
||||||
pub const ICON_WARN: NamedToif = NamedToif(include_res!("model_tt/res/warn-icon.toif"), "warn");
|
pub const ICON_WARN: &[u8] = include_res!("model_tt/res/warn-icon.toif");
|
||||||
pub const ICON_MAGIC: NamedToif = NamedToif(include_res!("model_tt/res/magic.toif"), "magic");
|
pub const ICON_MAGIC: &[u8] = include_res!("model_tt/res/magic.toif");
|
||||||
pub const ICON_LIST_CURRENT: NamedToif =
|
pub const ICON_LIST_CURRENT: &[u8] = include_res!("model_tt/res/current.toif");
|
||||||
NamedToif(include_res!("model_tt/res/current.toif"), "current");
|
pub const ICON_LIST_CHECK: &[u8] = include_res!("model_tt/res/check.toif");
|
||||||
pub const ICON_LIST_CHECK: NamedToif = NamedToif(include_res!("model_tt/res/check.toif"), "check");
|
pub const ICON_LOCK: &[u8] = include_res!("model_tt/res/lock.toif");
|
||||||
pub const ICON_LOCK: NamedToif = NamedToif(include_res!("model_tt/res/lock.toif"), "lock");
|
|
||||||
|
|
||||||
// Large, three-color icons.
|
// Large, three-color icons.
|
||||||
pub const WARN_COLOR: Color = YELLOW;
|
pub const WARN_COLOR: Color = YELLOW;
|
||||||
pub const INFO_COLOR: Color = BLUE;
|
pub const INFO_COLOR: Color = BLUE;
|
||||||
pub const SUCCESS_COLOR: Color = GREEN;
|
pub const SUCCESS_COLOR: Color = GREEN;
|
||||||
pub const ERROR_COLOR: Color = RED;
|
pub const ERROR_COLOR: Color = RED;
|
||||||
pub const IMAGE_FG_WARN: NamedToif =
|
pub const IMAGE_FG_WARN: &[u8] = include_res!("model_tt/res/warn_fg.toif");
|
||||||
NamedToif(include_res!("model_tt/res/warn_fg.toif"), "warn_fg");
|
pub const IMAGE_FG_SUCCESS: &[u8] = include_res!("model_tt/res/success_fg.toif");
|
||||||
pub const IMAGE_FG_SUCCESS: NamedToif =
|
pub const IMAGE_FG_ERROR: &[u8] = include_res!("model_tt/res/error_fg.toif");
|
||||||
NamedToif(include_res!("model_tt/res/success_fg.toif"), "success_fg");
|
pub const IMAGE_FG_INFO: &[u8] = include_res!("model_tt/res/info_fg.toif");
|
||||||
pub const IMAGE_FG_ERROR: NamedToif =
|
pub const IMAGE_BG_CIRCLE: &[u8] = include_res!("model_tt/res/circle.toif");
|
||||||
NamedToif(include_res!("model_tt/res/error_fg.toif"), "error_fg");
|
pub const IMAGE_BG_TRIANGLE: &[u8] = include_res!("model_tt/res/triangle.toif");
|
||||||
pub const IMAGE_FG_INFO: NamedToif =
|
pub const IMAGE_BG_BACK_BTN: &[u8] = include_res!("model_tt/res/back_btn.toif");
|
||||||
NamedToif(include_res!("model_tt/res/info_fg.toif"), "info_fg");
|
pub const IMAGE_BG_BACK_BTN_TALL: &[u8] = include_res!("model_tt/res/back_btn_tall.toif");
|
||||||
pub const IMAGE_BG_CIRCLE: NamedToif =
|
|
||||||
NamedToif(include_res!("model_tt/res/circle.toif"), "circle");
|
|
||||||
pub const IMAGE_BG_TRIANGLE: NamedToif =
|
|
||||||
NamedToif(include_res!("model_tt/res/triangle.toif"), "triangle");
|
|
||||||
pub const IMAGE_BG_BACK_BTN: NamedToif =
|
|
||||||
NamedToif(include_res!("model_tt/res/back_btn.toif"), "back_btn");
|
|
||||||
pub const IMAGE_BG_BACK_BTN_TALL: NamedToif = NamedToif(
|
|
||||||
include_res!("model_tt/res/back_btn_tall.toif"),
|
|
||||||
"back_btn_tall",
|
|
||||||
);
|
|
||||||
|
|
||||||
// Default homescreen
|
// Default homescreen
|
||||||
pub const IMAGE_HOMESCREEN: &[u8] = include_res!("model_tt/res/bg.jpg");
|
pub const IMAGE_HOMESCREEN: &[u8] = include_res!("model_tt/res/bg.jpg");
|
||||||
|
|
||||||
// Scrollbar/PIN dots.
|
// Scrollbar/PIN dots.
|
||||||
pub const DOT_ACTIVE: NamedToif = NamedToif(
|
pub const DOT_ACTIVE: &[u8] = include_res!("model_tt/res/scroll-active.toif");
|
||||||
include_res!("model_tt/res/scroll-active.toif"),
|
pub const DOT_INACTIVE: &[u8] = include_res!("model_tt/res/scroll-inactive.toif");
|
||||||
"scroll-active",
|
pub const DOT_INACTIVE_HALF: &[u8] = include_res!("model_tt/res/scroll-inactive-half.toif");
|
||||||
);
|
pub const DOT_INACTIVE_QUARTER: &[u8] = include_res!("model_tt/res/scroll-inactive-quarter.toif");
|
||||||
pub const DOT_INACTIVE: NamedToif = NamedToif(
|
pub const DOT_SMALL: &[u8] = include_res!("model_tt/res/scroll-small.toif");
|
||||||
include_res!("model_tt/res/scroll-inactive.toif"),
|
|
||||||
"scroll-inactive",
|
|
||||||
);
|
|
||||||
pub const DOT_INACTIVE_HALF: NamedToif = NamedToif(
|
|
||||||
include_res!("model_tt/res/scroll-inactive-half.toif"),
|
|
||||||
"scroll-inactive-half",
|
|
||||||
);
|
|
||||||
pub const DOT_INACTIVE_QUARTER: NamedToif = NamedToif(
|
|
||||||
include_res!("model_tt/res/scroll-inactive-quarter.toif"),
|
|
||||||
"scroll-inactive-quarter",
|
|
||||||
);
|
|
||||||
pub const DOT_SMALL: NamedToif = NamedToif(
|
|
||||||
include_res!("model_tt/res/scroll-small.toif"),
|
|
||||||
"scroll-small",
|
|
||||||
);
|
|
||||||
|
|
||||||
pub const fn label_default() -> TextStyle {
|
pub const fn label_default() -> TextStyle {
|
||||||
TEXT_NORMAL
|
TEXT_NORMAL
|
||||||
|
Loading…
Reference in New Issue
Block a user