summaryrefslogtreecommitdiffstats
path: root/examples/tour/src/main.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-04-11 05:57:01 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-04-11 05:57:01 +0200
commitaa0be30656e30d116e60a5d06557aea27442ce76 (patch)
tree1f6ca70211f9cfb54e0d220977d884a5cd19eda7 /examples/tour/src/main.rs
parentc794d8ba788b388d4fb7a8ef1bba208b98e1bd02 (diff)
downloadiced-aa0be30656e30d116e60a5d06557aea27442ce76.tar.gz
iced-aa0be30656e30d116e60a5d06557aea27442ce76.tar.bz2
iced-aa0be30656e30d116e60a5d06557aea27442ce76.zip
Move `ICON_FONT` constant in `tour` to `text_input` helper
Diffstat (limited to '')
-rw-r--r--examples/tour/src/main.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/tour/src/main.rs b/examples/tour/src/main.rs
index 9ee386d4..e9b9fb3a 100644
--- a/examples/tour/src/main.rs
+++ b/examples/tour/src/main.rs
@@ -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,