Move ICON_FONT constant in tour to text_input helper

This commit is contained in:
Héctor Ramón Jiménez 2023-04-11 05:57:01 +02:00
parent c794d8ba78
commit aa0be30656
No known key found for this signature in database
GPG key ID: 140CC052C94F138E

View file

@ -7,11 +7,6 @@ use iced::widget::{
use iced::widget::{Button, Column, Container, Slider};
use iced::{Color, Element, Font, Length, Renderer, Sandbox, Settings};
const ICON_FONT: Font = Font::External {
name: "Icons",
bytes: include_bytes!("../fonts/icons.ttf"),
};
pub fn main() -> iced::Result {
env_logger::init();
@ -570,6 +565,11 @@ impl<'a> Step {
is_secure: bool,
is_showing_icon: bool,
) -> Column<'a, StepMessage> {
const ICON_FONT: Font = Font::External {
name: "Icons",
bytes: include_bytes!("../fonts/icons.ttf"),
};
let mut text_input = text_input(
"Type something to continue...",
value,