summaryrefslogtreecommitdiff
path: root/iced_builder/src/icon.rs
diff options
context:
space:
mode:
authorPolesznyák Márk László <116908301+pml68@users.noreply.github.com>2024-12-26 00:12:06 +0100
committerGitHub <noreply@github.com>2024-12-26 00:12:06 +0100
commit0ae3ec6cc9babcab39c76f023606229a151916ab (patch)
treee92d0109599622984b2c485cc020951da288cec3 /iced_builder/src/icon.rs
parentMerge pull request #3 from pml68/refactor/internal-restructuring (diff)
parentfeat: add `tip` widget helper from `hecrj/icebreaker` (diff)
downloadiced-builder-0ae3ec6cc9babcab39c76f023606229a151916ab.tar.gz
Merge pull request #4 from pml68/feat/playground
Playground done **for now**
Diffstat (limited to 'iced_builder/src/icon.rs')
-rw-r--r--iced_builder/src/icon.rs23
1 files changed, 23 insertions, 0 deletions
diff --git a/iced_builder/src/icon.rs b/iced_builder/src/icon.rs
new file mode 100644
index 0000000..f6760d5
--- /dev/null
+++ b/iced_builder/src/icon.rs
@@ -0,0 +1,23 @@
+// Generated automatically by iced_fontello at build time.
+// Do not edit manually. Source: ../fonts/icons.toml
+// 02c7558d187cdc056fdd0e6a638ef805fa10f5955f834575e51d75acd35bc70e
+use iced::widget::{text, Text};
+use iced::Font;
+
+pub const FONT: &[u8] = include_bytes!("../fonts/icons.ttf");
+
+pub fn copy<'a>() -> Text<'a> {
+ icon("\u{F1C9}")
+}
+
+pub fn open<'a>() -> Text<'a> {
+ icon("\u{F115}")
+}
+
+pub fn save<'a>() -> Text<'a> {
+ icon("\u{1F4BE}")
+}
+
+fn icon<'a>(codepoint: &'a str) -> Text<'a> {
+ text(codepoint).font(Font::with_name("icons"))
+}