mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 11:46:41 +01:00
ohh why did i begin this refactor. e57
This commit is contained in:
parent
83eb9dd2fa
commit
49adf34b02
6 changed files with 46 additions and 41 deletions
|
|
@ -175,11 +175,10 @@ fn align<E: Engine, T: Content<E>, N: Coordinate, R: Area<N> + From<[N;4]>> (ali
|
|||
impl<E: Engine, T: Content<E>> Content<E> for Align<E, T> {
|
||||
fn render (&self, to: &mut E::Output) {
|
||||
let outer_area = to.area();
|
||||
if let Some(content) = self.content() {
|
||||
let inner_area = content.area(outer_area);
|
||||
if let Some(aligned) = align(&self, outer_area.into(), inner_area.into()) {
|
||||
to.place(aligned, &content)
|
||||
}
|
||||
let content = self.content();
|
||||
let inner_area = content.area(outer_area);
|
||||
if let Some(aligned) = align(&self, outer_area.into(), inner_area.into()) {
|
||||
to.place(aligned, &content)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue