Fix x/y offset in full layout
Fixes https://github.com/ifreund/river/issues/13
This commit is contained in:
parent
2575f642f1
commit
74721c9674
@ -374,7 +374,8 @@ pub fn layoutFull(self: *Self, visible_count: u32, output_tags: u32) void {
|
|||||||
(outer_padding * 2) - (border_width * 2) - (view_padding * 2);
|
(outer_padding * 2) - (border_width * 2) - (view_padding * 2);
|
||||||
const layout_height = @intCast(u32, self.usable_box.height) -
|
const layout_height = @intCast(u32, self.usable_box.height) -
|
||||||
(outer_padding * 2) - (border_width * 2) - (view_padding * 2);
|
(outer_padding * 2) - (border_width * 2) - (view_padding * 2);
|
||||||
const xy_offset = @intCast(i32, outer_padding + border_width + view_padding);
|
const x_offset = self.usable_box.x + @intCast(i32, outer_padding + border_width + view_padding);
|
||||||
|
const y_offset = self.usable_box.y + @intCast(i32, outer_padding + border_width + view_padding);
|
||||||
|
|
||||||
var i: u32 = 0;
|
var i: u32 = 0;
|
||||||
var it = ViewStack(View).pendingIterator(self.views.first, output_tags);
|
var it = ViewStack(View).pendingIterator(self.views.first, output_tags);
|
||||||
@ -387,8 +388,8 @@ pub fn layoutFull(self: *Self, visible_count: u32, output_tags: u32) void {
|
|||||||
|
|
||||||
var new_box: Box = undefined;
|
var new_box: Box = undefined;
|
||||||
new_box = .{
|
new_box = .{
|
||||||
.x = xy_offset,
|
.x = x_offset,
|
||||||
.y = xy_offset,
|
.y = y_offset,
|
||||||
.width = layout_width,
|
.width = layout_width,
|
||||||
.height = layout_height,
|
.height = layout_height,
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user