Skip to content

Commit

Permalink
Fix occasional gap between card BG and border
Browse files Browse the repository at this point in the history
  • Loading branch information
benfrankel committed Jul 28, 2024
1 parent 354f9d0 commit e441beb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/core/theme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ pub(super) fn plugin(app: &mut App) {
ThemeColorFor<UiImage>,
ThemeColorFor<BackgroundColor>,
ThemeColorFor<BorderColor>,
ThemeColorFor<Outline>,
ThemeColorForText,
)>();
}
Expand Down Expand Up @@ -160,3 +161,9 @@ impl ColorMut for BorderColor {
&mut self.0
}
}

impl ColorMut for Outline {
fn color_mut(&mut self) -> &mut Color {
&mut self.color
}
}
5 changes: 5 additions & 0 deletions src/game/card.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,11 @@ impl EntityCommand for CardBackground {
image: UiImage::new(self.texture),
..default()
},
Outline {
width: Vw(0.4),
..default()
},
ThemeColor::CardBorder.target::<Outline>(),
atlas,
));

Expand Down

0 comments on commit e441beb

Please sign in to comment.