Skip to content

Commit aa0a026

Browse files
committed
fix(context menu): use radius from theme
1 parent 2871309 commit aa0a026

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

src/menu.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,14 +295,14 @@ pub fn context_menu<'a>(
295295
text_color: Some(component.on.into()),
296296
background: Some(Background::Color(component.base.into())),
297297
border: Border {
298-
radius: 8.0.into(),
298+
radius: cosmic.radius_s().into(),
299299
width: 1.0,
300300
color: component.divider.into(),
301301
},
302302
..Default::default()
303303
}
304304
})
305-
.width(Length::Fixed(260.0))
305+
.width(Length::Fixed(280.0))
306306
.into()
307307
}
308308

@@ -645,7 +645,7 @@ pub fn location_context_menu<'a>(ancestor_index: usize) -> Element<'a, tab::Mess
645645
text_color: Some(component.on.into()),
646646
background: Some(Background::Color(component.base.into())),
647647
border: Border {
648-
radius: 8.0.into(),
648+
radius: cosmic.radius_s().into(),
649649
width: 1.0,
650650
color: component.divider.into(),
651651
},

src/tab.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3020,10 +3020,7 @@ impl Tab {
30203020
//TODO: use widget::image::viewer, when its zoom can be reset
30213021
widget::image(widget::image::Handle::from_path(path)),
30223022
)
3023-
.align_x(Alignment::Center)
3024-
.align_y(Alignment::Center)
3025-
.width(Length::Fill)
3026-
.height(Length::Fill)
3023+
.center(Length::Fill)
30273024
.into(),
30283025
);
30293026
} else {
@@ -3032,10 +3029,7 @@ impl Tab {
30323029
//TODO: use widget::image::viewer, when its zoom can be reset
30333030
widget::image(handle.clone()),
30343031
)
3035-
.align_x(Alignment::Center)
3036-
.align_y(Alignment::Center)
3037-
.width(Length::Fill)
3038-
.height(Length::Fill)
3032+
.center(Length::Fill)
30393033
.into(),
30403034
);
30413035
}

0 commit comments

Comments
 (0)