Skip to content

Commit

Permalink
LibGfx+LibWeb: Do not ignore corner radius if it is defined in one axis
Browse files Browse the repository at this point in the history
  • Loading branch information
kalenikaliaksandr committed Jan 15, 2024
1 parent 72dd374 commit 6b7b9ca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Userland/Libraries/LibGfx/AntiAliasingPainter.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class AntiAliasingPainter {

inline operator bool() const
{
return horizontal_radius > 0 && vertical_radius > 0;
return horizontal_radius > 0 || vertical_radius > 0;
}

Gfx::IntRect as_rect() const
Expand Down
2 changes: 1 addition & 1 deletion Userland/Libraries/LibWeb/Painting/BorderRadiiData.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ struct BorderRadiusData {

inline operator bool() const
{
return horizontal_radius > 0 && vertical_radius > 0;
return horizontal_radius > 0 || vertical_radius > 0;
}

inline void shrink(CSSPixels horizontal, CSSPixels vertical)
Expand Down

0 comments on commit 6b7b9ca

Please sign in to comment.