diff --git a/hcie-iced-app/crates/hcie-iced-gui/src/canvas/shader_canvas.rs b/hcie-iced-app/crates/hcie-iced-gui/src/canvas/shader_canvas.rs index 80383ec..495495f 100644 --- a/hcie-iced-app/crates/hcie-iced-gui/src/canvas/shader_canvas.rs +++ b/hcie-iced-app/crates/hcie-iced-gui/src/canvas/shader_canvas.rs @@ -856,11 +856,13 @@ impl shader::Primitive for CanvasShaderPrimitive { clip_bounds.width, clip_bounds.height, ); + // clip_bounds is already in physical pixels from iced — use it for the + // wgpu viewport which also expects physical pixel coordinates. render_pass.set_viewport( - self.bounds.x, - self.bounds.y, - self.bounds.width, - self.bounds.height, + clip_bounds.x as f32, + clip_bounds.y as f32, + clip_bounds.width as f32, + clip_bounds.height as f32, 0.0, 1.0, ); diff --git a/hcie-iced-app/crates/hcie-iced-gui/src/panels/title_bar.rs b/hcie-iced-app/crates/hcie-iced-gui/src/panels/title_bar.rs index f2af9f0..b8ea08b 100644 --- a/hcie-iced-app/crates/hcie-iced-gui/src/panels/title_bar.rs +++ b/hcie-iced-app/crates/hcie-iced-gui/src/panels/title_bar.rs @@ -178,7 +178,8 @@ pub fn view<'a>( let minimize_btn = button(text("─").size(12)) .on_press(Message::WindowMinimize) - .padding([2, 8]) + .padding([4, 10]) + .height(MENU_BAR_HEIGHT) .style( move |_theme: &iced::Theme, status: iced::widget::button::Status| match status { iced::widget::button::Status::Hovered => iced::widget::button::Style { @@ -189,7 +190,7 @@ pub fn view<'a>( }, _ => iced::widget::button::Style { background: Some(iced::Background::Color(iced::Color::from_rgba( - 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.06, ))), text_color: c.text_secondary, border: iced::Border::default(), @@ -200,7 +201,8 @@ pub fn view<'a>( let maximize_btn = button(text("□").size(12)) .on_press(Message::WindowMaximize) - .padding([2, 8]) + .padding([4, 10]) + .height(MENU_BAR_HEIGHT) .style( move |_theme: &iced::Theme, status: iced::widget::button::Status| match status { iced::widget::button::Status::Hovered => iced::widget::button::Style { @@ -211,7 +213,7 @@ pub fn view<'a>( }, _ => iced::widget::button::Style { background: Some(iced::Background::Color(iced::Color::from_rgba( - 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.06, ))), text_color: c.text_secondary, border: iced::Border::default(), @@ -222,7 +224,8 @@ pub fn view<'a>( let close_btn = button(text("×").size(13)) .on_press(Message::WindowClose) - .padding([2, 10]) + .padding([4, 10]) + .height(MENU_BAR_HEIGHT) .style( move |_theme: &iced::Theme, status: iced::widget::button::Status| match status { iced::widget::button::Status::Hovered => iced::widget::button::Style { @@ -233,7 +236,7 @@ pub fn view<'a>( }, _ => iced::widget::button::Style { background: Some(iced::Background::Color(iced::Color::from_rgba( - 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.06, ))), text_color: c.text_secondary, border: iced::Border::default(),