Skip to content

Commit

Permalink
Adding transparent white.
Browse files Browse the repository at this point in the history
Using helper color function (less verbose and clear to understand).
  • Loading branch information
Adenilson committed Apr 22, 2015
1 parent 23945f2 commit 95bcc57
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions components/gfx/color.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,8 @@ pub fn transparent_black() -> AzColor {
pub fn white() -> AzColor {
AzColor { r: 1.0, g: 1.0, b: 1.0, a: 1.0 }
}

#[inline]
pub fn transparent_white() -> AzColor {
AzColor { r: 1.0, g: 1.0, b: 1.0, a: 0.0 }
}
2 changes: 1 addition & 1 deletion components/layout/display_list_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1318,7 +1318,7 @@ impl BlockFlowDisplayListBuilding for BlockFlow {
ScrollPolicy::Scrollable
};

let transparent = color::rgba(1.0, 1.0, 1.0, 0.0);
let transparent = color::transparent_white();
let stacking_context =
self.create_stacking_context(display_list,
Some(Arc::new(PaintLayer::new(self.layer_id(0),
Expand Down

0 comments on commit 95bcc57

Please sign in to comment.