Skip to content

Commit

Permalink
Compare float with epsilon to determine transparency
Browse files Browse the repository at this point in the history
  • Loading branch information
TheOptik committed Feb 29, 2024
1 parent e146356 commit 24b06b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/interface/windows/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ impl Window {
}

pub fn has_transparency(&self, theme: &InterfaceTheme) -> bool {
self.get_background_color(theme).alpha_as_u8() != 255
(self.get_background_color(theme).alpha - 1.0).abs() < 0.001
}

pub fn is_closable(&self) -> bool {
Expand Down

0 comments on commit 24b06b1

Please sign in to comment.