Merge pull request #794 from git-f0x/master
Set max height for previews
This commit is contained in:
commit
e96258917a
2 changed files with 16 additions and 15 deletions
|
|
@ -1274,7 +1274,9 @@ impl App {
|
|||
}
|
||||
|
||||
fn desktop_view_options(&self) -> Element<Message> {
|
||||
let cosmic_theme::Spacing { space_l, .. } = theme::active().cosmic().spacing;
|
||||
let cosmic_theme::Spacing {
|
||||
space_m, space_l, ..
|
||||
} = theme::active().cosmic().spacing;
|
||||
let config = self.config.desktop;
|
||||
|
||||
let mut children = Vec::new();
|
||||
|
|
@ -1349,6 +1351,7 @@ impl App {
|
|||
|
||||
widget::column::with_children(children)
|
||||
.padding([0, space_l, space_l, space_l])
|
||||
.spacing(space_m)
|
||||
.into()
|
||||
}
|
||||
|
||||
|
|
|
|||
14
src/tab.rs
14
src/tab.rs
|
|
@ -1491,11 +1491,11 @@ impl Item {
|
|||
|
||||
let mut column = widget::column().spacing(space_m);
|
||||
|
||||
column = column.push(widget::row::with_children(vec![
|
||||
widget::horizontal_space().into(),
|
||||
self.preview(sizes),
|
||||
widget::horizontal_space().into(),
|
||||
]));
|
||||
column = column.push(
|
||||
widget::container(self.preview(sizes))
|
||||
.center_x(Length::Fill)
|
||||
.max_height(THUMBNAIL_SIZE as f32),
|
||||
);
|
||||
|
||||
let mut details = widget::column().spacing(space_xxxs);
|
||||
details = details.push(widget::text::heading(self.name.clone()));
|
||||
|
|
@ -4089,9 +4089,7 @@ impl Tab {
|
|||
}
|
||||
Element::from(dnd_grid)
|
||||
}),
|
||||
mouse_area::MouseArea::new(
|
||||
widget::container(widget::column::with_children(children)).width(Length::Fill),
|
||||
)
|
||||
mouse_area::MouseArea::new(widget::column::with_children(children).width(Length::Fill))
|
||||
.on_press(|_| Message::Click(None))
|
||||
.on_drag(Message::Drag)
|
||||
.on_drag_end(|_| Message::DragEnd(None))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue