Repository navigation
Conversation
c107893 to
d9ff51e
Compare
- This is POC - Set property -Dorg.eclipse.swt.internal.cocoa.smallItemHeight - Need to set the initial item height in the constructors of List, Table and Tree - See discussion at eclipse-platform/eclipse.platform.ui#1674
d9ff51e to
725f517
Compare
| * If this property exists then use smaller padding for item heights in Table, Tree and List controls | ||
| * TODO: this is initialized here, could this be put in a better place? And use a better property name? | ||
| */ | ||
| smallItemHeight = System.getProperty("org.eclipse.swt.internal.cocoa.smallItemHeight") != null; |
There was a problem hiding this comment.
It looks like all this change does is to either set vertical cell padding to 1 ("smallItemHeight" enabled) or 8 (disabled). Couldn't the setFont/setItemHeight calls be made unconditionally, i.e. even when smallItemHeight was false?
What if instead introducing a boolean property, we would allow "vertical cell padding" to be configured as an integer? That way, we could even try values other than these two.
Also, could this be configured via CSS in a UI theme?
There was a problem hiding this comment.
Couldn't the setFont/setItemHeight calls be made unconditionally, i.e. even when smallItemHeight was false?
That would be possible, but an overhead if the initial heights are the same as the ones set in setFont/setItemHeight
What if instead introducing a boolean property, we would allow "vertical cell padding" to be configured as an integer?
I have no personal preference, so that's something that users should decide.
Whatever method is chosen, the important thing is to keep the heights the same when the control is created and when setFont/setItemHeight is called, so we don't get "magical shrinkage".
There was a problem hiding this comment.
What if instead introducing a boolean property, we would allow "vertical cell padding" to be configured as an integer?
To get the old item height back in Eclipse something like this would need to be added in eclipse.ini:
-Dorg.eclipse.swt.internal.cocoa.itemPadding=1
If this option is not set, the internal default would be 8 to match native macOS padding.
- This makes smaller item heights the default - Option is org.eclipse.swt.internal.cocoa.enforceNativeItemHeightMinimum - Native height maintained if option set
|
Added a new commit with option
Based on #1117 |
|
Closing this in favour of #1117 |
Uh oh!
There was an error while loading. Please reload this page.