generated from PlexSheep/rs-base
refactor: move additional information like date and timebar over clockw
cargo devel CI / cargo CI (push) Successful in 1m43s
Details
cargo devel CI / cargo CI (push) Successful in 1m43s
Details
This commit is contained in:
parent
9b7f36870f
commit
5eb07fabc8
|
@ -485,8 +485,8 @@ impl Clock {
|
||||||
let part = Layout::default()
|
let part = Layout::default()
|
||||||
.direction(Direction::Vertical)
|
.direction(Direction::Vertical)
|
||||||
.constraints([
|
.constraints([
|
||||||
Constraint::Length(if r.width > 80 { 8 } else { 5 }),
|
|
||||||
Constraint::Length(3),
|
Constraint::Length(3),
|
||||||
|
Constraint::Length(if r.width > 80 { 8 } else { 5 }),
|
||||||
])
|
])
|
||||||
.split(r);
|
.split(r);
|
||||||
let hlen_date: u16 = (f32::from(part[1].width) * 0.35) as u16;
|
let hlen_date: u16 = (f32::from(part[1].width) * 0.35) as u16;
|
||||||
|
@ -494,10 +494,10 @@ impl Clock {
|
||||||
.direction(Direction::Horizontal)
|
.direction(Direction::Horizontal)
|
||||||
.constraints([
|
.constraints([
|
||||||
Constraint::Length(hlen_date),
|
Constraint::Length(hlen_date),
|
||||||
Constraint::Length(part[1].width - hlen_date),
|
Constraint::Length(part[0].width - hlen_date),
|
||||||
])
|
])
|
||||||
.split(part[1]);
|
.split(part[0]);
|
||||||
|
|
||||||
vec![part[0], subparts[0], subparts[1]]
|
vec![part[1], subparts[0], subparts[1]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue