From d45960512801b3693237fbeddace3c26ce8188b3 Mon Sep 17 00:00:00 2001 From: PyvesB Date: Sun, 2 Aug 2020 16:29:10 +0200 Subject: [PATCH] Fix visibility of last editor line --- .../swt/widget/scrollable/CompositeScrollableLayouter.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/com.codeaffine.eclipse.swt/src/com/codeaffine/eclipse/swt/widget/scrollable/CompositeScrollableLayouter.java b/com.codeaffine.eclipse.swt/src/com/codeaffine/eclipse/swt/widget/scrollable/CompositeScrollableLayouter.java index e26b04bf0..425f71341 100644 --- a/com.codeaffine.eclipse.swt/src/com/codeaffine/eclipse/swt/widget/scrollable/CompositeScrollableLayouter.java +++ b/com.codeaffine.eclipse.swt/src/com/codeaffine/eclipse/swt/widget/scrollable/CompositeScrollableLayouter.java @@ -47,8 +47,11 @@ private static int computeHeight( AdaptionContext context ) { } private static int computeHeightWithHorizontalBarPadding( AdaptionContext context ) { - int horizontalBarHeight = context.getScrollable().getHorizontalBarSize().y; - return context.getVisibleArea().height - BAR_BREADTH + horizontalBarHeight; + if( context.getScrollable().getHorizontalBarVisible() ) { + int horizontalBarHeight = context.getScrollable().getHorizontalBarSize().y; + return context.getVisibleArea().height - BAR_BREADTH + horizontalBarHeight; + } + return context.getVisibleArea().height - BAR_BREADTH; } private static int computeWidth( AdaptionContext context ) {