Skip to content

Commit 9e77c22

Browse files
authored
Merge pull request pop-os#620 from git-f0x/master
[Context Menu] Use radius from theme
2 parents e85cfdb + aa0a026 commit 9e77c22

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
@@ -3078,10 +3078,7 @@ impl Tab {
30783078
//TODO: use widget::image::viewer, when its zoom can be reset
30793079
widget::image(widget::image::Handle::from_path(path)),
30803080
)
3081-
.align_x(Alignment::Center)
3082-
.align_y(Alignment::Center)
3083-
.width(Length::Fill)
3084-
.height(Length::Fill)
3081+
.center(Length::Fill)
30853082
.into(),
30863083
);
30873084
} else {
@@ -3090,10 +3087,7 @@ impl Tab {
30903087
//TODO: use widget::image::viewer, when its zoom can be reset
30913088
widget::image(handle.clone()),
30923089
)
3093-
.align_x(Alignment::Center)
3094-
.align_y(Alignment::Center)
3095-
.width(Length::Fill)
3096-
.height(Length::Fill)
3090+
.center(Length::Fill)
30973091
.into(),
30983092
);
30993093
}

0 commit comments

Comments
 (0)