diff --git a/src/widget/Text.zig b/src/widget/Text.zig index 9a5f977..a823470 100644 --- a/src/widget/Text.zig +++ b/src/widget/Text.zig @@ -65,7 +65,7 @@ pub fn Widget(comptime Event: type, comptime Renderer: type) type { } const length: u16 = @truncate(length_usize); const cols = @min(length, this.size.cols); - const rows = @divExact(cols, length); + const rows = cols / length; break :blk .{ .anchor = .{ .col = this.size.anchor.col + @divTrunc(this.size.cols, 2) - @divTrunc(cols, 2), @@ -82,7 +82,7 @@ pub fn Widget(comptime Event: type, comptime Renderer: type) type { } const length: u16 = @truncate(length_usize); const cols = @min(length, this.size.cols); - const rows = @divExact(cols, length); + const rows = cols / length; break :blk .{ .anchor = .{ .col = this.size.anchor.col + @divTrunc(this.size.cols, 2) - @divTrunc(cols, 2), @@ -99,7 +99,7 @@ pub fn Widget(comptime Event: type, comptime Renderer: type) type { } const length: u16 = @truncate(length_usize); const cols = @min(length, this.size.cols); - const rows = @divExact(cols, length); + const rows = cols / length; break :blk .{ .anchor = .{ .col = this.size.anchor.col + @divTrunc(this.size.cols, 2) - @divTrunc(cols, 2), @@ -116,7 +116,7 @@ pub fn Widget(comptime Event: type, comptime Renderer: type) type { } const length: u16 = @truncate(length_usize); const cols = @min(length, this.size.cols); - const rows = @divExact(cols, length); + const rows = cols / length; break :blk .{ .anchor = .{ .col = this.size.anchor.col, @@ -133,7 +133,7 @@ pub fn Widget(comptime Event: type, comptime Renderer: type) type { } const length: u16 = @truncate(length_usize); const cols = @min(length, this.size.cols); - const rows = @divExact(cols, length); + const rows = cols / length; break :blk .{ .anchor = .{ .col = this.size.anchor.col + this.size.cols - cols,