Bug 164939 - [Forms] Form-based editor horizontal scroll pagesize too small
Summary: [Forms] Form-based editor horizontal scroll pagesize too small
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: User Assistance (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.3 M3   Edit
Assignee: Adam Archer CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
: 205102 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-11-17 04:45 EST by Andreas Goetz CLA
Modified: 2007-10-03 17:41 EDT (History)
5 users (show)

See Also:
cgold: review+


Attachments
patch (923 bytes, patch)
2007-09-25 11:47 EDT, Adam Archer CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Goetz CLA 2006-11-17 04:45:41 EST
This is a copy of Bug 159898.

In form-based editors (like Mylar task editor or PDE plugin.xml editor), the horizontal scrollbar behaves strangely.
Clicking on the scoll pane, the content is scrolled horizontally by the same
amount as when clicking on the arrow symbols. Expected behaviour is to scroll
for a bigger amount (page size). Vertical scrollbar behaves normally.
Comment 1 Andreas Goetz CLA 2006-11-22 13:22:04 EST
Any chance to look at this? Minor but annoying...
Comment 2 Andreas Goetz CLA 2006-11-29 13:13:45 EST
I've not done too much investigating, but I believe the source may be down to org.eclipse.ui.internal.forms.widgets.FormUtil:

	public static void updatePageIncrement(ScrolledComposite scomp) {
		ScrollBar vbar = scomp.getVerticalBar();
		if (vbar != null) {
			Rectangle clientArea = scomp.getClientArea();
			int increment = clientArea.height - 5;
			vbar.setPageIncrement(increment);
		}
	}

Only the vbar page increment is net, not the hbar. Unclear why this doesn't happen for non-form based widgets, too.

Call stack:
org.eclipse.ui.forms.widgets.initializeScrollBars();
org.eclipse.ui.forms.widgets.ScrolledForm.(init);
org.eclipse.ui.forms.widgets.FormToolkit.createScrolledForm();
org.eclipse.ui.forms.editor.FormPage.createPartControl();
Comment 3 Andreas Goetz CLA 2007-05-17 16:03:55 EDT
Any chance fixing this? Seems quite simple?
Comment 4 Chris Goldthorpe CLA 2007-05-17 16:21:05 EDT
It does appear to be simple but we are getting too late in the Eclipse 3.3 cycle to be able to fix this.
Comment 5 Andreas Goetz CLA 2007-09-25 03:12:50 EDT
Any chance looking into this for 3.4?
Comment 6 Dejan Glozic CLA 2007-09-25 09:52:47 EDT
Low hanging fruit for Adam (must keep exercising those Eclipse muscles :-).
Comment 7 Adam Archer CLA 2007-09-25 11:47:41 EDT
Created attachment 79142 [details]
patch

Your instinct was correct Andreas. The fix was exactly where you thought.

Thanks for the investigation.  :P
Comment 8 Andreas Goetz CLA 2007-09-25 12:05:33 EDT
My first time digging into Eclipse code- great experience actually finding something ;)
Comment 9 Chris Goldthorpe CLA 2007-09-25 12:36:00 EDT
Fixed in HEAD.

The patch is good, thanks Andreas and Adam.
Comment 10 Dejan Glozic CLA 2007-10-03 17:41:57 EDT
*** Bug 205102 has been marked as a duplicate of this bug. ***