Bug 476913 - [Cocoa] SWT on OSX: toolbar too high
Summary: [Cocoa] SWT on OSX: toolbar too high
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.3   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: consistency, helpwanted, polish, triaged, ui
Depends on:
Blocks:
 
Reported: 2015-09-08 16:14 EDT by Matthias Fuchs CLA
Modified: 2020-12-11 14:05 EST (History)
4 users (show)

See Also:


Attachments
Cord (left) with big icons - same toolbar height as my app (11.70 KB, image/png)
2015-09-08 16:14 EDT, Matthias Fuchs CLA
no flags Details
Cord (left) with small icons - same as my app, only that on my app the toolbar is still higher (15.53 KB, image/png)
2015-09-08 16:14 EDT, Matthias Fuchs CLA
no flags Details
screenshot-native app vs SWT app with toolbar (68.53 KB, image/tiff)
2016-02-09 01:57 EST, Lakshmi P Shanmugam CLA
no flags Details
simplified snippet (1.93 KB, text/x-java)
2016-02-09 02:03 EST, Lakshmi P Shanmugam CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Fuchs CLA 2015-09-08 16:14:07 EDT
Created attachment 256449 [details]
Cord (left) with big icons - same toolbar height as my app

Hi all,

I created my very first SWT app on OS X. So far it was quite easy. But I saw that the toolbar hight seems to be calculated in a wrong way.

With small icons the toolbar seems to have the same size of native apps' toolbars with big items.
If I use big items, the padding under the items gets even bigger.

I attached a screenshot of Cord with big and small icons and on the right side my app.

Setting the height of the toolbar doesn't do anything. So I thing some internal magic is doing something wrong here.
Comment 1 Matthias Fuchs CLA 2015-09-08 16:14:48 EDT
Created attachment 256450 [details]
Cord (left) with small icons - same as my app, only that on my app the toolbar is still higher
Comment 2 Arun Thondapu CLA 2015-12-18 05:07:12 EST
Can you please attach a SWT code snippet which demonstrates the problem clearly? Thanks!
Comment 3 Matthias Fuchs CLA 2016-02-04 16:51:08 EST
Hi,

Sorry it took so long:
https://github.com/mojo2012/VelocityEditor/blob/master/src/at/spot/velocityeditor/Application.java

Maybe I'm doing something wrong?
Comment 4 Arun Thondapu CLA 2016-02-05 07:19:40 EST
Lakshmi, can you please check the behavior with the snippet provided?
Comment 5 Lakshmi P Shanmugam CLA 2016-02-09 01:57:10 EST
Created attachment 259646 [details]
screenshot-native app vs SWT app with toolbar

I couldn't run the snippet as is, since it has too many dependencies to be resolved and the sample image was missing too. 
I just extracted out the SWT part and used a 32x32 image and ran it... Comparing with the Toolbar sample from [1], there is a very little extra padding above and below the ToolItem. Pls see the attached screenshot.

[1] https://developer.apple.com/library/mac/samplecode/ToolbarSample/Listings/Controller_h.html
Comment 6 Lakshmi P Shanmugam CLA 2016-02-09 02:03:50 EST
Created attachment 259647 [details]
simplified snippet
Comment 7 Matthias Fuchs CLA 2017-12-01 10:37:38 EST
Shouldn't this be an easy fix? This is now open for 1,5 years and not even a reaction yet?
Comment 8 Dani Megert CLA 2017-12-01 10:44:51 EST
(In reply to Matthias Fuchs from comment #7)
> Shouldn't this be an easy fix? This is now open for 1,5 years and not even a
> reaction yet?

Be our guest ;-)
Comment 9 Matthias Fuchs CLA 2017-12-01 13:42:23 EST
I am totally open to do it myself, but to be honest it‘s kinda hard to even get an overview of the source code - dozends of repos, some seem outdated, none or hard to find docs, no build by source guide, not even clear naming amond the various jars, not to me tion the very poor git web interface.
Coming from github, where everything is searchable, linked abd even indexed in google, looking for a single file in the swt code is a nightmare.
Sorry for the rant, just my experience in the last days.
Comment 10 Matthias Fuchs CLA 2017-12-01 13:43:14 EST
And this horrible bugzilla ...
Comment 11 Leo Ufimtsev CLA 2017-12-05 13:23:08 EST
(In reply to Matthias Fuchs from comment #9)
> I am totally open to do it myself, but to be honest it‘s kinda hard to even
> get an overview of the source code - dozends of repos, some seem outdated,
> none or hard to find docs, no build by source guide, not even clear naming
> amond the various jars, not to me tion the very poor git web interface.
> Coming from github, where everything is searchable, linked abd even indexed
> in google, looking for a single file in the swt code is a nightmare.
> Sorry for the rant, just my experience in the last days.

Hmm, I know what you mean. I intend to update the documentation upon completion of a larger project. Feel free to keep track via:
528173 – SWT Website Documentation needs a refresh 
https://bugs.eclipse.org/bugs/show_bug.cgi?id=528173

In the mean time, if you have any questions, feel free to reach out to me. I'm also around on IRC.
Comment 12 Lakshmi P Shanmugam CLA 2017-12-07 04:43:03 EST
(In reply to Matthias Fuchs from comment #9)
> I am totally open to do it myself, but to be honest it‘s kinda hard to even
> get an overview of the source code - dozends of repos, some seem outdated,
> none or hard to find docs, no build by source guide, not even clear naming
> amond the various jars, not to me tion the very poor git web interface.
> Coming from github, where everything is searchable, linked abd even indexed
> in google, looking for a single file in the swt code is a nightmare.
> Sorry for the rant, just my experience in the last days.

You can get started with setting up the source code - https://www.eclipse.org/swt/git.php
If you want to use any Cocoa APIs in the code, you can install the Mac Generator tool - https://www.eclipse.org/swt/macgen.php
Comment 13 Sravan Kumar Lakkimsetti CLA 2017-12-08 06:58:12 EST
We do have Oomph based automated setup. You can follow the steps given in

https://wiki.eclipse.org/Platform_UI/How_to_Contribute#Setting_up_your_SDK_for_code_contributions

When you are selecting projects select Platform > SWT instead of Platform > UI.

All the remaining steps are same
Comment 14 Eclipse Genie CLA 2020-12-11 14:05:04 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.