Skip to content

Commit

Permalink
fix: account for scrollbar size
Browse files Browse the repository at this point in the history
  • Loading branch information
WillsterJohnsonAtZenesis committed Jun 5, 2024
1 parent fa2f45c commit 31fb80f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions source/class/qxl/datagrid/VirtualScrollDataGrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -475,9 +475,11 @@ qx.Class.define("qxl.datagrid.VirtualScrollDataGrid", {
_setAvailableSize(width, height) {
const initialOffsetLeft = this.getQxObject("widgetPane").getPaddingLeft();
const initialOffsetTop = this.getQxObject("widgetPane").getPaddingTop();
let scrollbarWidth = this.getChildControl("scrollbar-y").getVisibility() === "visible" ? this.getChildControl("scrollbar-y").getSizeHint().width : 0;
let scrollbarHeight = this.getChildControl("scrollbar-x").getVisibility() === "visible" ? this.getChildControl("scrollbar-x").getSizeHint().height : 0;
return this.getSizeCalculator().setAvailableSize(
width - this.getChildControl("scrollbar-y").getSizeHint().width - initialOffsetLeft - this.getQxObject("widgetPane").getPaddingRight(),
height - this.getChildControl("scrollbar-x").getSizeHint().height - initialOffsetTop - this.getQxObject("widgetPane").getPaddingBottom(),
width - initialOffsetLeft - this.getQxObject("widgetPane").getPaddingRight() - scrollbarWidth,
height - initialOffsetTop - this.getQxObject("widgetPane").getPaddingBottom() - scrollbarHeight,
this.getStartRowIndex(),
this.getStartColumnIndex(),
initialOffsetLeft,
Expand Down

0 comments on commit 31fb80f

Please sign in to comment.