Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 169112 Details for
Bug 312271
[Design] Tabbar sometimes hides active editor
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Fixes the problem
bug312271.patch (text/plain), 4.21 KB, created by
Holger Staudacher
on 2010-05-19 09:51:18 EDT
(
hide
)
Description:
Fixes the problem
Filename:
MIME Type:
Creator:
Holger Staudacher
Created:
2010-05-19 09:51:18 EDT
Size:
4.21 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rap.design.example >Index: src/org/eclipse/rap/internal/design/example/stacks/ViewStackPresentation.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.ui/org.eclipse.rap.design.example/src/org/eclipse/rap/internal/design/example/stacks/ViewStackPresentation.java,v >retrieving revision 1.23 >diff -u -r1.23 ViewStackPresentation.java >--- src/org/eclipse/rap/internal/design/example/stacks/ViewStackPresentation.java 19 Apr 2010 09:44:37 -0000 1.23 >+++ src/org/eclipse/rap/internal/design/example/stacks/ViewStackPresentation.java 19 May 2010 13:34:43 -0000 >@@ -436,7 +436,6 @@ > > } > } ); >- > Composite corner = new Composite( buttonArea, SWT.NONE ); > corner.setData( WidgetUtil.CUSTOM_VARIANT, "compTrans" ); > corner.setLayout( new FormLayout() ); >@@ -493,7 +492,6 @@ > buttonArea.setBackground( bg ); > Control[] children = buttonArea.getChildren(); > buttonArea.setLayout( new FormLayout() ); >- > for( int i = 0; i < children.length; i++ ) { > Control child = children[ i ]; > if( child instanceof Button ) { >@@ -541,10 +539,17 @@ > } > } > buttonArea.getParent().layout(); >+ preventButtonOfOverflow(); > } > > } > >+ private void preventButtonOfOverflow() { >+ if( isOverflowNecessary() ) { >+ showPartButton( currentPart ); >+ } >+ } >+ > private void checkHideSeparator( final Composite buttonArea ) { > int indexOf = buttonList.indexOf( buttonArea ); > for( int i = 0; i < buttonList.size(); i++ ) { >@@ -618,7 +623,6 @@ > fdTabBg.top = new FormAttachment( 0 ); > fdTabBg.bottom = new FormAttachment( 100 ); > createConfArea( fdTabBg ); >- > FormData fdLayout > = stackBuilder.getPosition( ILayoutSetConstants.STACK_TABBG_POS ); > RowLayout layout = new RowLayout( SWT.HORIZONTAL ); >@@ -646,10 +650,7 @@ > } > > private void manageOverflow() { >- int tabChildrenSize = getTabChildrenSize(); >- if( tabChildrenSize > tabBg.getBounds().width >- && moreThanOneChildVisible() ) >- { >+ if( isOverflowNecessary() ) { > hideLastVisibleButton(); > manageOverflow(); > } else { >@@ -657,6 +658,13 @@ > } > handleOverflowButton(); > } >+ >+ private boolean isOverflowNecessary() { >+ int tabChildrenSize = getTabChildrenSize(); >+ boolean childrenBiggerThanParent >+ = tabChildrenSize > tabBg.getBounds().width; >+ return childrenBiggerThanParent && moreThanOneChildVisible(); >+ } > > private boolean moreThanOneChildVisible() { > boolean result = false; >@@ -817,9 +825,7 @@ > overflowButtons.add( children[ i ] ); > } > lastChildHidden = true; >- >- tabBg.layout( true, true ); >- >+ tabBg.layout( true, true ); > } > } > } >@@ -874,7 +880,6 @@ > fdConfArea.right = new FormAttachment( 100 ); > fdConfArea.width = 28; > fdTabBg.right = new FormAttachment( confArea ); >- > confCorner = new Label( confArea, SWT.NONE ); > Image cornerImage > = stackBuilder.getImage( ILayoutSetConstants.STACK_INACTIVE_CORNER ); >@@ -884,7 +889,6 @@ > fdCorner.left = new FormAttachment( 0 ); > fdCorner.top = new FormAttachment( 0 ); > fdCorner.bottom = new FormAttachment( 100 ); >- > confButton = new Button( confArea, SWT.PUSH ); > Image confImage > = stackBuilder.getImage( ILayoutSetConstants.STACK_CONF_INACTIVE ); >@@ -923,16 +927,16 @@ > > public Control[] getTabList( final IPresentablePart part ) { > ArrayList list = new ArrayList(); >- if (getControl() != null) { >- list.add(getControl()); >+ if( getControl() != null ) { >+ list.add( getControl() ); > } >- if (part.getToolBar() != null) { >- list.add(part.getToolBar()); >+ if( part.getToolBar() != null ) { >+ list.add( part.getToolBar() ); > } >- if (part.getControl() != null) { >- list.add(part.getControl()); >+ if( part.getControl() != null ) { >+ list.add( part.getControl() ); > } >- return (Control[]) list.toArray(new Control[list.size()]); >+ return ( Control[] )list.toArray( new Control[ list.size() ] ); > } > > public void removePart( final IPresentablePart oldPart ) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 312271
:
167721
|
169112
|
169116