Skip to content

Commit

Permalink
change default background color to white
Browse files Browse the repository at this point in the history
  • Loading branch information
Sharktheone committed Sep 15, 2024
1 parent 0d36535 commit 1e3b493
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion crates/gosub_renderer/src/draw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ where
rect: bg,
transform: None,
radius: None,
brush: Brush::color(Color::BLACK),
brush: Brush::color(Color::WHITE),
brush_transform: None,
border: None,
};
Expand Down
14 changes: 6 additions & 8 deletions crates/gosub_styling/src/render_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -846,11 +846,9 @@ impl gosub_render_backend::layout::CssProperty for CssProperty {
}

fn parse_color(&self) -> Option<(f32, f32, f32, f32)> {
if let Some(color) = self.actual.to_color() {
Some((color.r, color.g, color.b, color.a))
} else {
None
}
self.actual
.to_color()
.map(|color| (color.r, color.g, color.b, color.a))
}

fn as_number(&self) -> Option<f32> {
Expand Down Expand Up @@ -932,9 +930,9 @@ impl gosub_render_backend::layout::CssValue for Value {
}
}

impl Into<Value> for CssValue {
fn into(self) -> Value {
Value(self)
impl From<CssValue> for Value {
fn from(val: CssValue) -> Self {
Value(val)
}
}

Expand Down
4 changes: 2 additions & 2 deletions crates/gosub_taffy/src/compute/inline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -514,9 +514,9 @@ pub fn compute_inline_layout<LT: LayoutTree<TaffyLayouter>>(
Some(0) => {}

Some(i) => {
glyphs.get(i).map(|g| {
if let Some(g) = glyphs.get(i) {
decoration.x_offset = g.x;
});
}
}
}
}
Expand Down

0 comments on commit 1e3b493

Please sign in to comment.