@@ -1526,10 +1526,10 @@ pub const ScrollView = struct {
1526
1526
const child = win32 .GetWindow (hwnd , win32 .GW_CHILD );
1527
1527
_ = win32 .MoveWindow (
1528
1528
child ,
1529
- @max (rect .left - parent .left , @min (0 , - (@as (c_int , @intCast (preferred .width )) - width ))),
1530
- @max (rect .top - parent .top , @min (0 , - (@as (c_int , @intCast (preferred .height )) - height ))),
1531
- @as (c_int , @intCast (preferred .width )),
1532
- @as (c_int , @intCast (preferred .height )),
1529
+ @max (rect .left - parent .left , @min (0 , - (@as (c_int , @intFromFloat (preferred .width )) - width ))),
1530
+ @max (rect .top - parent .top , @min (0 , - (@as (c_int , @intFromFloat (preferred .height )) - height ))),
1531
+ @as (c_int , @intFromFloat (preferred .width )),
1532
+ @as (c_int , @intFromFloat (preferred .height )),
1533
1533
1 ,
1534
1534
);
1535
1535
@@ -1538,7 +1538,7 @@ pub const ScrollView = struct {
1538
1538
.cbSize = @sizeOf (win32 .SCROLLINFO ),
1539
1539
.fMask = @as (win32 .SCROLLINFO_MASK , @enumFromInt (@intFromEnum (win32 .SIF_RANGE ) | @intFromEnum (win32 .SIF_PAGE ))),
1540
1540
.nMin = 0 ,
1541
- .nMax = @as (c_int , @intCast (preferred .width )),
1541
+ .nMax = @as (c_int , @intFromFloat (preferred .width )),
1542
1542
.nPage = @as (c_uint , @intCast (width )),
1543
1543
.nPos = 0 ,
1544
1544
.nTrackPos = 0 ,
@@ -1549,7 +1549,7 @@ pub const ScrollView = struct {
1549
1549
.cbSize = @sizeOf (win32 .SCROLLINFO ),
1550
1550
.fMask = @as (win32 .SCROLLINFO_MASK , @enumFromInt (@intFromEnum (win32 .SIF_RANGE ) | @intFromEnum (win32 .SIF_PAGE ))),
1551
1551
.nMin = 0 ,
1552
- .nMax = @as (c_int , @intCast (preferred .height )),
1552
+ .nMax = @as (c_int , @intFromFloat (preferred .height )),
1553
1553
.nPage = @as (c_uint , @intCast (height )),
1554
1554
.nPos = 0 ,
1555
1555
.nTrackPos = 0 ,
0 commit comments