| Home » Eclipse Projects » Remote Application Platform (RAP) » left and right margin of coolbar
 Goto Forum:| 
| left and right margin of coolbar [message #83817] | Mon, 21 April 2008 10:22  |  | 
| Eclipse User  |  |  |  |  | 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 11:42   |  | 
| Eclipse User  |  |  |  |  | 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 04:07  |  | 
| Eclipse User  |  |  |  |  | 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.
 |  |  |  | 
 
 
 Current Time: Thu Oct 30 20:16:46 EDT 2025 
 Powered by FUDForum . Page generated in 0.03252 seconds |