Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 284719
Collapse All | Expand All

(-)src/org/eclipse/swt/internal/widgets/toolitemkit/DropDownToolItemLCA.java (+3 lines)
Lines 46-51 Link Here
46
    ToolItemLCAUtil.preserveValues( toolItem );
46
    ToolItemLCAUtil.preserveValues( toolItem );
47
    ToolItemLCAUtil.preserveImages( toolItem );
47
    ToolItemLCAUtil.preserveImages( toolItem );
48
    WidgetLCAUtil.preserveCustomVariant( toolItem );
48
    WidgetLCAUtil.preserveCustomVariant( toolItem );
49
    
50
    final IWidgetAdapter adapter = WidgetUtil.getAdapter( toolItem );
51
    adapter.preserve( Props.MENU, toolItem.getParent().getMenu() );
49
  }
52
  }
50
53
51
  void readData( final ToolItem toolItem ) {
54
  void readData( final ToolItem toolItem ) {
(-)src/org/eclipse/swt/internal/widgets/toolitemkit/ToolItemLCAUtil.java (-2 / +7 lines)
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
  ////////

Return to bug 284719