提交 f7eacf96 编写于 作者: S Serge Rider

#7695 Data viewer: preserve space for vertical scrollbar

上级 c70b2e70
......@@ -2419,15 +2419,21 @@ public abstract class LightGrid extends Canvas {
if (!columnScrolling) {
// horizontal scrolling works pixel by pixel
int hiddenArea = preferredSize.x - clientArea.width + 1;
int hiddenArea = preferredSize.x - clientArea.width + 1 + (vScroll.getVisible() ? vScroll.getWidth() : 0);
// if possible, remember selection, if selection is too large,
// if possi
// ble, remember selection, if selection is too large,
// just
// make it the max you can
int selection = Math.min(hScroll.getSelection(), hiddenArea - 1);
hScroll.setValues(selection, 0, hiddenArea + clientArea.width - 1, clientArea.width,
HORZ_SCROLL_INCREMENT, clientArea.width);
hScroll.setValues(
selection,
0,
hiddenArea + clientArea.width - 1,
clientArea.width,
HORZ_SCROLL_INCREMENT,
clientArea.width);
} else {
// horizontal scrolling is column by column
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册