|
Lines 45-51
Link Here
|
| 45 |
boolean hasListener = SelectionEvent.hasListener( toolItem ); |
45 |
boolean hasListener = SelectionEvent.hasListener( toolItem ); |
| 46 |
adapter.preserve( Props.SELECTION_LISTENERS, |
46 |
adapter.preserve( Props.SELECTION_LISTENERS, |
| 47 |
Boolean.valueOf( hasListener ) ); |
47 |
Boolean.valueOf( hasListener ) ); |
| 48 |
adapter.preserve( Props.BOUNDS, toolItem.getBounds() ); |
48 |
adapter.preserve( Props.BOUNDS, getFixedBounds( toolItem ) ); |
| 49 |
} |
49 |
} |
| 50 |
|
50 |
|
| 51 |
//////////// |
51 |
//////////// |
|
Lines 110-121
Link Here
|
| 110 |
// Bounds |
110 |
// Bounds |
| 111 |
|
111 |
|
| 112 |
static void writeBounds( final ToolItem toolItem ) throws IOException { |
112 |
static void writeBounds( final ToolItem toolItem ) throws IOException { |
|
|
113 |
final Rectangle bounds = getFixedBounds( toolItem ); |
| 114 |
WidgetLCAUtil.writeBounds( toolItem, toolItem.getParent(), bounds ); |
| 115 |
} |
| 116 |
|
| 117 |
private static Rectangle getFixedBounds( final ToolItem toolItem ) { |
| 113 |
Rectangle bounds = toolItem.getBounds(); |
118 |
Rectangle bounds = toolItem.getBounds(); |
| 114 |
// [rst] Chevron-button is created as a separate widget on the client side |
119 |
// [rst] Chevron-button is created as a separate widget on the client side |
| 115 |
if( ( toolItem.getStyle() & SWT.DROP_DOWN ) != 0 ) { |
120 |
if( ( toolItem.getStyle() & SWT.DROP_DOWN ) != 0 ) { |
| 116 |
bounds.width -= 15; // ToolItem#DROP_DOWN_ARROW_WIDTH |
121 |
bounds.width -= 15; // ToolItem#DROP_DOWN_ARROW_WIDTH |
| 117 |
} |
122 |
} |
| 118 |
WidgetLCAUtil.writeBounds( toolItem, toolItem.getParent(), bounds ); |
123 |
return bounds; |
| 119 |
} |
124 |
} |
| 120 |
|
125 |
|
| 121 |
//////// |
126 |
//////// |