Compare commits
1 commit
local/libc
...
fix/dialog
| Author | SHA1 | Date | |
|---|---|---|---|
| a71ab4ce11 |
1 changed files with 31 additions and 6 deletions
37
src/tab.rs
37
src/tab.rs
|
|
@ -5074,6 +5074,21 @@ impl Tab {
|
|||
.height(Length::Fixed((space_m + 4).into()))
|
||||
.padding([0, space_xxs]);
|
||||
|
||||
let dialog_mode = matches!(self.mode, Mode::Dialog(_));
|
||||
let heading_row_compact = widget::row::with_children([
|
||||
heading_item(fl!("name"), Length::Fill, HeadingOptions::Name),
|
||||
if self.location.is_trash() {
|
||||
heading_item(fl!("trashed-on"), Length::Shrink, HeadingOptions::TrashedOn)
|
||||
} else {
|
||||
heading_item(fl!("modified"), Length::Shrink, HeadingOptions::Modified)
|
||||
},
|
||||
heading_item(fl!("size"), Length::Shrink, HeadingOptions::Size),
|
||||
])
|
||||
.align_y(Alignment::Center)
|
||||
.spacing(space_s)
|
||||
.height(Length::Fixed((space_m + 4).into()))
|
||||
.padding([0, space_xxs]);
|
||||
|
||||
let accent_rule =
|
||||
rule::horizontal(1).class(theme::Rule::Custom(Box::new(|theme| rule::Style {
|
||||
color: theme.cosmic().accent_color().into(),
|
||||
|
|
@ -5158,9 +5173,14 @@ impl Tab {
|
|||
let mut column = widget::column::with_capacity(4).padding([0, space_s]);
|
||||
column = column.push(row);
|
||||
column = column.push(accent_rule);
|
||||
if self.config.view == View::List && !condensed {
|
||||
column = column.push(heading_row);
|
||||
column = column.push(heading_rule);
|
||||
if self.config.view == View::List {
|
||||
if !condensed {
|
||||
column = column.push(heading_row);
|
||||
column = column.push(heading_rule);
|
||||
} else if dialog_mode {
|
||||
column = column.push(heading_row_compact);
|
||||
column = column.push(heading_rule);
|
||||
}
|
||||
}
|
||||
return column.into();
|
||||
}
|
||||
|
|
@ -5306,9 +5326,14 @@ impl Tab {
|
|||
column = column.push(row);
|
||||
column = column.push(accent_rule);
|
||||
|
||||
if self.config.view == View::List && !condensed {
|
||||
column = column.push(heading_row);
|
||||
column = column.push(heading_rule);
|
||||
if self.config.view == View::List {
|
||||
if !condensed {
|
||||
column = column.push(heading_row);
|
||||
column = column.push(heading_rule);
|
||||
} else if dialog_mode {
|
||||
column = column.push(heading_row_compact);
|
||||
column = column.push(heading_rule);
|
||||
}
|
||||
}
|
||||
|
||||
let mouse_area = crate::mouse_area::MouseArea::new(column)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue