Skip to content

Commit

Permalink
Fix visual glitch when Label size is 0 or negative
Browse files Browse the repository at this point in the history
  • Loading branch information
fabioarnold committed Jul 7, 2022
1 parent cd40492 commit 05f7f19
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/gui/widgets/Label.zig
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ pub fn draw(widget: *gui.Widget, vg: nvg) void {
const self = @fieldParentPtr(Self, "widget", widget);

const rect = widget.relative_rect;
if (rect.w <= 0 or rect.h <= 0) return;

if (self.draw_border) {
gui.drawPanelInset(vg, rect.x, rect.y, rect.w, rect.h, 1);
Expand Down

0 comments on commit 05f7f19

Please sign in to comment.