Skip to main content



      Home
Home » Eclipse Projects » Remote Application Platform (RAP) » CoolBar with overlapped CoolItems
CoolBar with overlapped CoolItems [message #651932] Wed, 02 February 2011 01:22 Go to next message
Eclipse UserFriend
Hi, everybody!

I've got the problem when CoolItems can be contained by CoolBar on one row and the CoolBar have to relayout them using two rows. But sometimes one from our CoolItems is wrongly positioned on first row and overlapped by other items. Cause of this is overlapped CoolItem should appear on the second row, but do on the first one. After long time investigation I've found that following fixes in CoolItem.js resolve the problem.

    // reparenting to enable coolitem dragging
    setControl : function( control ) {
      if( control != null ) {
        // TODO [tb] : Control positioning is already handled by server
        control.setTop( this.getTop() );
        control.setLeft( this.getLeft()
                         + org.eclipse.swt.widgets.CoolItem.CONTROL_OFFSET );
        control.setDisplay( true );
      }
      if( this._control != null ) {
        this._control.setDisplay( false );
      }
      this._control = control;
    },


Using
control.setTop( this.getTop() ); 

instead of
control.setTop( 0 );


I just want to inform you about this problem and its fixes. If you have some other suggestions I will be appreciated.

Best regards,
Yury.
Re: CoolBar with overlapped CoolItems [message #651965 is a reply to message #651932] Wed, 02 February 2011 04:53 Go to previous messageGo to next message
Eclipse UserFriend
Yury,
would you mind to open a bugzilla and attach a snippet to reproduce and
the patch that fix it. Otherwise, the problem and the solution will be lost.
Thanks,
Ivan

On 2/2/2011 8:22 AM, Yury wrote:
> Hi, everybody!
>
> I've got the problem when CoolItems can be contained by CoolBar on one
> row and the CoolBar have to relayout them using two rows. But
> sometimes one from our CoolItems is wrongly positioned on first row
> and overlapped by other items. Cause of this is overlapped CoolItem
> should appear on the second row, but do on the first one. After long
> time investigation I've found that following fixes in CoolItem.js
> resolve the problem.
>
>
> // reparenting to enable coolitem dragging
> setControl : function( control ) {
> if( control != null ) {
> // TODO [tb] : Control positioning is already handled by server
> control.setTop( this.getTop() );
> control.setLeft( this.getLeft()
> +
> org.eclipse.swt.widgets.CoolItem.CONTROL_OFFSET );
> control.setDisplay( true );
> }
> if( this._control != null ) {
> this._control.setDisplay( false );
> }
> this._control = control;
> },
>
>
> Using control.setTop( this.getTop() ); instead of control.setTop( 0 );
>
> I just want to inform you about this problem and its fixes. If you
> have some other suggestions I will be appreciated.
>
> Best regards,
> Yury.
Re: CoolBar with overlapped CoolItems [message #652005 is a reply to message #651965] Wed, 02 February 2011 07:09 Go to previous message
Eclipse UserFriend
Ivan,

I've filed the https://bugs.eclipse.org/bugs/show_bug.cgi?id=336057 with steps to reproduce using DemoWorkbench application.

Best regards,
Yury.
Previous Topic:Ask about required bundle
Next Topic:jface.txt supportability
Goto Forum:
  


Current Time: Wed Jul 23 18:44:42 EDT 2025

Powered by FUDForum. Page generated in 0.03194 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top