Skip to content

Commit

Permalink
Funny :)
Browse files Browse the repository at this point in the history
  • Loading branch information
jacksongoode committed Feb 14, 2024
1 parent e3370b4 commit bd1d3d1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions psst-gui/src/widget/link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ impl<T: Data> Widget<T> for Link<T> {

fn lifecycle(&mut self, ctx: &mut LifeCycleCtx, event: &LifeCycle, data: &T, env: &Env) {
if let LifeCycle::HotChanged(_) = event {
ctx.request_anim_frame();
ctx.request_paint();
}
self.inner.lifecycle(ctx, event, data, env)
Expand Down Expand Up @@ -86,8 +85,8 @@ impl<T: Data> Widget<T> for Link<T> {
};
let border_color = self.border_color.resolve(env);
let border_width = self.border_width.resolve(env);
let visible_background = background.as_rgba_u32() & 0x00000FF > 0;
let visible_border = border_color.as_rgba_u32() & 0x000000FF > 0 && border_width > 0.0;
let visible_background = background.as_rgba_u32() >> 24 > 0;
let visible_border = border_color.as_rgba_u32() >> 24 > 0 && border_width > 0.0;
if visible_background || visible_border {
let corner_radius = self.corner_radius.resolve(env);
let rounded_rect = ctx
Expand Down

0 comments on commit bd1d3d1

Please sign in to comment.