| Summary: | Cannot scroll GridLayout when zoomed | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Tools] GEF | Reporter: | Mark Proe <markproe> | ||||||||||
| Component: | GEF-Legacy Draw2d | Assignee: | Alex Boyko <aboyko> | ||||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||||
| Severity: | normal | ||||||||||||
| Priority: | P3 | CC: | aboyko, ahunter.eclipse, Udo.Walker, vijay.rajonline | ||||||||||
| Version: | 3.3 | ||||||||||||
| Target Milestone: | 3.6.0 (Helios) RC2 | ||||||||||||
| Hardware: | PC | ||||||||||||
| OS: | Windows Vista | ||||||||||||
| Whiteboard: | |||||||||||||
| Attachments: |
|
||||||||||||
Zooming out, e.g. 50% works fine but if you zoom in more than 100%, e.g. 150% than the scroll bars vanish. Any progress on this issue ??? at least a comment whether this issue will be fixed or not pls. Can yu please attach the "hack"-patch for one of GEF example editors? Thus, with the "hack" patch we get the grid layout in of the example editors and can easily reproduce your problem. Thnanks. Created attachment 163137 [details]
patched shapes example plugin
run it as a shapes example and open the shapesExaple1.shapes file in the editor.
try zoomIn and zoomout tool bar actions
(In reply to comment #3) > Can yu please attach the "hack"-patch for one of GEF example editors? > Thus, with the "hack" patch we get the grid layout in of the example editors > and can easily reproduce your problem. Thnanks. i have attached the modified shapes example plugin. Note: I have changed ScalableFreeFormRootEditPart to ScalableRootEditPart and added zoom toolbar actions to editor. open the shapesExaple1.shapes file in the editor. try zoomIn and zoomout tool bar actions the scrollbar vanishes for zoom levels above 100 and below 100%. also pls refer this forum discussion... http://www.eclipse.org/forums/index.php?t=msg&th=79050&start=0&SQ=7c9b11f8fe1c0040ed16892827be9eaa& Created attachment 163139 [details]
The saved shapes example file to be opened in the editor
Created attachment 168625 [details]
patch
This is the fix.
Turns out GridLayout was getting wHint == 0 and hHint == 0 for the preferred size instead of -1, -1. -1 was being scaled and casted to (int), i.e. (int) (-0.67f) == 0.
Corrected the problem ScalableLayeredPane. Tested with the attached example on Win 7 x64.
Thanks a lot for the attached example! If you have any problems with the patch - let me know.
Created attachment 168626 [details]
patch
Updated the patch. Had to do the same thing for the preferred size too.
Please test the fix with your app. Let me know if everything looks ok.
Waiting for feedback so moving to RC2. The patch seems ok. I'll commit it then. Seems ok to me too. Delivered for 3.6 RC2 |
Build ID: I20070621-1340 Steps To Reproduce: 1. Create a GraphicalEditor that uses a ScalableRootEditPart. 2. For the root component, create a figure that uses GridLayout. See below... @Override protected IFigure createFigure() { Layer figure = new Layer(); GridLayout layout = new GridLayout(1, true); layout.marginWidth = 15; layout.marginHeight = 7; layout.verticalSpacing = 5; figure.setLayoutManager(layout); return figure; } 3. Create at least one child edit part. You may use any simple figure such as a Label or Shape. 4. While running the application, size the window so that the viewer doesn't fit and the scroll bars appear. 5. Try zooming in. The scroll bars will vanish, even though they should still be visible. More information: I only seem to lose my scroll bars when zooming a GridLayout. If I use a StackLayout, everything looks fine. However, I would really prefer to be using the additional functionality GridLayout provides.