feat: Update button padding and height in title bar for improved UI consistency
This commit is contained in:
@@ -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,
|
||||
);
|
||||
|
||||
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user