From 4c097316789644ee35cfc0a579d5c90eaf759e91 Mon Sep 17 00:00:00 2001 From: genusistimelord Date: Tue, 14 Nov 2023 09:46:22 -0500 Subject: [PATCH] updated iced repo commit to latest --- Cargo.toml | 4 ++-- examples/tab_bar/src/main.rs | 9 ++++++--- src/native/tab_bar.rs | 4 ++-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index f6885e89..b50e0b37 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -70,7 +70,7 @@ itertools = { version = "0.11.0", optional = true } [dependencies.iced_widget] git = "https://github.com/iced-rs/iced.git" -rev = "751ea77c29f6eb3d00f45f0a04c833a1d03a425c" +rev = "817f72868746461891ca4e74473c555f3b5c5703" #version = "0.1.1" #[dependencies.iced_renderer] @@ -114,7 +114,7 @@ members = [ [workspace.dependencies.iced] git = "https://github.com/iced-rs/iced.git" -rev = "751ea77c29f6eb3d00f45f0a04c833a1d03a425c" +rev = "817f72868746461891ca4e74473c555f3b5c5703" #version = "0.10.0" features = ["advanced", "lazy", "tokio"] diff --git a/examples/tab_bar/src/main.rs b/examples/tab_bar/src/main.rs index 8999de75..4a0a4d7c 100644 --- a/examples/tab_bar/src/main.rs +++ b/examples/tab_bar/src/main.rs @@ -6,7 +6,10 @@ use iced::{ use iced_aw::{TabBar, TabLabel}; fn main() -> iced::Result { - TabBarExample::run(Settings::default()) + TabBarExample::run(Settings { + default_text_size: 12.into(), + ..Default::default() + }) } #[derive(Debug, Clone)] @@ -131,13 +134,13 @@ impl Application for TabBarExample { .push( TextInput::new("Tab label", &state.new_tab_label) .on_input(Message::TabLabelInputChanged) - .size(22) + .size(16) .padding(5.0), ) .push( TextInput::new("Tab content", &state.new_tab_content) .on_input(Message::TabContentInputChanged) - .size(22) + .size(12) .padding(5.0), ) .push(Button::new(Text::new("New")).on_press(Message::NewTab)) diff --git a/src/native/tab_bar.rs b/src/native/tab_bar.rs index f6a39065..000cf004 100644 --- a/src/native/tab_bar.rs +++ b/src/native/tab_bar.rs @@ -707,7 +707,7 @@ fn draw_tab( line_height: LineHeight::Relative(1.3), shaping: iced_widget::text::Shaping::Advanced, }, - Point::new(icon_bounds.x, icon_bounds.center_y()), + Point::new(icon_bounds.center_x(), icon_bounds.center_y()), style.icon_color, ); } @@ -726,7 +726,7 @@ fn draw_tab( line_height: LineHeight::Relative(1.3), shaping: iced_widget::text::Shaping::Advanced, }, - Point::new(text_bounds.x, text_bounds.center_y()), + Point::new(text_bounds.center_x(), text_bounds.center_y()), style.text_color, ); }