From f987fc87b906d22e668f636d73c24aa42780b38d Mon Sep 17 00:00:00 2001 From: Polesznyák Márk Date: Fri, 14 Nov 2025 13:16:22 +0100 Subject: chore: update deps --- src/icon.rs | 23 +++++++++++++++++------ src/main.rs | 4 ++-- 2 files changed, 19 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/icon.rs b/src/icon.rs index 32aa92b..e51ab90 100644 --- a/src/icon.rs +++ b/src/icon.rs @@ -2,20 +2,31 @@ // Do not edit manually. Source: ../fonts/icons.toml // 0a164ed48e8a0ef9ffb68cfe442a0cabc6c251beb644b51d01da8e5b7fdbd34e use iced::Font; -use iced::widget::text; - -use crate::widget::Text; +use iced::advanced::text::Renderer as TextRenderer; +use iced::widget::{Text, text}; pub const FONT: &[u8] = include_bytes!("../fonts/icons.ttf"); -pub fn copy<'a>() -> Text<'a> { +pub fn copy<'a, Theme, Renderer>() -> Text<'a, Theme, Renderer> +where + Theme: text::Catalog + 'a, + Renderer: TextRenderer +{ icon("\u{F1C9}") } -pub fn switch<'a>() -> Text<'a> { +pub fn switch<'a, Theme, Renderer>() -> Text<'a, Theme, Renderer> +where + Theme: text::Catalog + 'a, + Renderer: TextRenderer +{ icon("\u{21C6}") } -fn icon(codepoint: &str) -> Text<'_> { +fn icon<'a, Theme, Renderer>(codepoint: &'a str) -> Text<'a, Theme, Renderer> +where + Theme: text::Catalog + 'a, + Renderer: TextRenderer +{ text(codepoint).font(Font::with_name("icons")) } diff --git a/src/main.rs b/src/main.rs index add73ec..1908591 100644 --- a/src/main.rs +++ b/src/main.rs @@ -99,7 +99,7 @@ impl IcedBuilder { let state = pane_grid::State::with_configuration( pane_grid::Configuration::Split { axis: pane_grid::Axis::Vertical, - ratio: 0.8, + ratio: 0.9, a: Box::new(pane_grid::Configuration::Pane(Panes::Designer)), b: Box::new(pane_grid::Configuration::Pane(Panes::ElementList)), }, @@ -552,7 +552,7 @@ impl IcedBuilder { ] .spacing(10) .align_y(Alignment::Center) - .width(500); + .width(300); let pane_grid = pane_grid(&self.pane_state, |id, pane, _is_maximized| { let is_focused = Some(id) == self.focus; -- cgit v1.2.3