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 369470 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/swt/widgets/Tree.java (-1 / +1 lines)
Lines 1781-1787 Link Here
1781
  }
1781
  }
1782
1782
1783
  int getTextWidth( int index ) {
1783
  int getTextWidth( int index ) {
1784
    int result = getCellWidth( index ) - getTextOffset( index );
1784
    int result = getCellWidth( index ) - getTextOffset( index ) - getCellPadding().width;
1785
    if( isTreeColumn( index ) ) {
1785
    if( isTreeColumn( index ) ) {
1786
      result -= ( TEXT_MARGIN.width - TEXT_MARGIN.x );
1786
      result -= ( TEXT_MARGIN.width - TEXT_MARGIN.x );
1787
    }
1787
    }
(-)src/org/eclipse/swt/internal/widgets/treekit/TreeLCA_Test.java (-2 / +2 lines)
Lines 214-220 Link Here
214
    item1.setText( "item" );
214
    item1.setText( "item" );
215
    item1.setImage( image );
215
    item1.setImage( image );
216
    ItemMetrics[] metrics = TreeLCA.getItemMetrics( tree );
216
    ItemMetrics[] metrics = TreeLCA.getItemMetrics( tree );
217
    assertEquals( 69, metrics[ 0 ].textWidth );
217
    assertEquals( 57, metrics[ 0 ].textWidth );
218
  }
218
  }
219
219
220
  public void testPreserveValues() {
220
  public void testPreserveValues() {
Lines 751-757 Link Here
751
751
752
    Message message = Fixture.getProtocolMessage();
752
    Message message = Fixture.getProtocolMessage();
753
    JSONArray actual = ( JSONArray )message.findSetProperty( tree, "itemMetrics" );
753
    JSONArray actual = ( JSONArray )message.findSetProperty( tree, "itemMetrics" );
754
    assertTrue( ProtocolTestUtil.jsonEquals( "[0,0,50,0,0,3,42]", ( JSONArray )actual.get( 0 ) ) );
754
    assertTrue( ProtocolTestUtil.jsonEquals( "[0,0,50,0,0,3,30]", ( JSONArray )actual.get( 0 ) ) );
755
  }
755
  }
756
756
757
  public void testRenderItemMetricsUnchanged() throws IOException {
757
  public void testRenderItemMetricsUnchanged() throws IOException {

Return to bug 369470