@@ -1249,9 +1249,8 @@ pub const Element = struct {
12491249
12501250 /// Draw the current element, along with any children elements.
12511251 pub fn draw (element : * Element , display : * Display , parent_scroll_offset : Vector , parent_clip : ? Clip ) void {
1252- if (element .visible == .hidden ) {
1252+ if (element .visible == .hidden )
12531253 return ;
1254- }
12551254
12561255 const scroll_offset : Vector = element .offset .add (parent_scroll_offset );
12571256
@@ -1275,9 +1274,8 @@ pub const Element = struct {
12751274 return ;
12761275 }
12771276 }
1278- if (element .visible == .culled ) {
1277+ if (element .visible == .culled )
12791278 element .visible = .visible ;
1280- }
12811279
12821280 // Elements may optionally have a background texture or a simple
12831281 // filled background.
@@ -1572,8 +1570,7 @@ pub const Element = struct {
15721570 .width = element .rect .width - element .pad .left - element .pad .right ,
15731571 .height = element .rect .height - element .pad .top - element .pad .bottom ,
15741572 };
1575- dest .x += scroll_offset .x ;
1576- dest .y += scroll_offset .y ;
1573+ dest = dest .move (& scroll_offset );
15771574
15781575 if (dest .height <= 0 or dest .width <= 0 ) return ;
15791576
@@ -4334,7 +4331,7 @@ pub const Display = struct {
43344331 found .? .maximum .height ,
43354332 });
43364333 if (dev_build and dev_mode and found .? .type == .panel ) {
4337- trace ("entered hover({s} {s}) panel content {d}x{d}. usable area: {d}x{d}" , .{
4334+ trace ("entered panel hover({s} {s}) panel content {d}x{d}. usable area: {d}x{d}" , .{
43384335 @tagName (found .? .type ),
43394336 found .? .name ,
43404337 found .? .type .panel .scrollable .size .width ,
0 commit comments