Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » left and right margin of coolbar
left and right margin of coolbar [message #83817] Mon, 21 April 2008 14:22 Go to next message
Stefan   is currently offline Stefan Friend
Messages: 316
Registered: July 2009
Senior Member
Hi,

when using a coolbar, there's always a margin of some pixels (red in
this example).

GridLayoutFactory.fillDefaults().applyTo(parent);

coolBar = new CoolBar( parent, SWT.NONE );
coolBar.setBackground(Graphics.getColor(255, 0, 0));
coolBar.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
coolBar.setLocked(true);

final CoolItem coolItem1 = new CoolItem( coolBar, SWT.NONE );
final Button button = new Button(coolBar, SWT.NONE);
button.setText("Hallo");
coolItem1.setControl( button );
coolItem1.setSize(button.computeSize(SWT.DEFAULT, SWT.DEFAULT));


The margin is used to display the pickup icon (on the left), if the
setLocked property is set to false.

Has anyone an idea how I can get rid of these nasty pixels?

Regards,
Stefan.
Re: left and right margin of coolbar [message #83831 is a reply to message #83817] Mon, 21 April 2008 15:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rsternberg.innoopract.com

Hi Stefan,

I guess this is the same issue as reported in bug 211077, isn't it?

I tried your snippet with GTK, and there is also a red area on the left
side in locked mode. If this is the SWT behavior, we probably cannot do
so much about it, unless we'd make this margin themeable...

Best regards,
Ralf

Stefan Röck wrote:
> Hi,
>
> when using a coolbar, there's always a margin of some pixels (red in
> this example).
>
> GridLayoutFactory.fillDefaults().applyTo(parent);
>
> coolBar = new CoolBar( parent, SWT.NONE );
> coolBar.setBackground(Graphics.getColor(255, 0, 0));
> coolBar.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
> coolBar.setLocked(true);
>
> final CoolItem coolItem1 = new CoolItem( coolBar, SWT.NONE );
> final Button button = new Button(coolBar, SWT.NONE);
> button.setText("Hallo");
> coolItem1.setControl( button );
> coolItem1.setSize(button.computeSize(SWT.DEFAULT, SWT.DEFAULT));
>
>
> The margin is used to display the pickup icon (on the left), if the
> setLocked property is set to false.
>
> Has anyone an idea how I can get rid of these nasty pixels?
>
> Regards,
> Stefan.
Re: left and right margin of coolbar [message #83885 is a reply to message #83831] Tue, 22 April 2008 08:07 Go to previous message
Stefan   is currently offline Stefan Friend
Messages: 316
Registered: July 2009
Senior Member
Hi Ralf,
you are right, it is the bug
https://bugs.eclipse.org/bugs/show_bug.cgi?id=211077

I attachted a screenshot to the bug for illustration. Could you make
this margin themable? It would help us very much because the currently
implemented workaround causes a high load on the server for layout
calculations :-(

Regards,
Stefan.


Ralf Sternberg schrieb:
> Hi Stefan,
>
> I guess this is the same issue as reported in bug 211077, isn't it?
>
> I tried your snippet with GTK, and there is also a red area on the left
> side in locked mode. If this is the SWT behavior, we probably cannot do
> so much about it, unless we'd make this margin themeable...
>
> Best regards,
> Ralf
>
> Stefan Röck wrote:
>> Hi,
>>
>> when using a coolbar, there's always a margin of some pixels (red in
>> this example).
>>
>> GridLayoutFactory.fillDefaults().applyTo(parent);
>>
>> coolBar = new CoolBar( parent, SWT.NONE );
>> coolBar.setBackground(Graphics.getColor(255, 0, 0));
>> coolBar.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
>> coolBar.setLocked(true);
>>
>> final CoolItem coolItem1 = new CoolItem( coolBar, SWT.NONE );
>> final Button button = new Button(coolBar, SWT.NONE);
>> button.setText("Hallo");
>> coolItem1.setControl( button );
>> coolItem1.setSize(button.computeSize(SWT.DEFAULT, SWT.DEFAULT));
>>
>>
>> The margin is used to display the pickup icon (on the left), if the
>> setLocked property is set to false.
>>
>> Has anyone an idea how I can get rid of these nasty pixels?
>>
>> Regards,
>> Stefan.
Previous Topic:RAP JUnit plugin in M3
Next Topic:Problem loading external resource
Goto Forum:
  


Current Time: Fri Apr 26 15:18:33 GMT 2024

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

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

Back to the top