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 286902
Collapse All | Expand All

(-)js/org/eclipse/swt/widgets/List.js (-1 / +1 lines)
Lines 67-73 Link Here
67
        } else {
67
        } else {
68
          // TODO [rh] optimize this: context menu should be handled by the List
68
          // TODO [rh] optimize this: context menu should be handled by the List
69
          //      itself for all its ListItems
69
          //      itself for all its ListItems
70
          var item = new qx.ui.form.ListItem();
70
          var item = new org.eclipse.swt.widgets.ListItem();
71
          // prevent items from being drawn outside the list
71
          // prevent items from being drawn outside the list
72
          item.setOverflow( qx.constant.Style.OVERFLOW_HIDDEN );
72
          item.setOverflow( qx.constant.Style.OVERFLOW_HIDDEN );
73
          item.setContextMenu( this.getContextMenu() );
73
          item.setContextMenu( this.getContextMenu() );
(-)src/org/eclipse/swt/internal/widgets/displaykit/QooxdooResourcesUtil.java (-1 / +4 lines)
Lines 77-82 Link Here
77
    = "org/eclipse/swt/widgets/CoolItem.js";
77
    = "org/eclipse/swt/widgets/CoolItem.js";
78
  private static final String LIST_JS
78
  private static final String LIST_JS
79
    = "org/eclipse/swt/widgets/List.js";
79
    = "org/eclipse/swt/widgets/List.js";
80
  private static final String LIST_ITEM_JS
81
    = "org/eclipse/swt/widgets/ListItem.js";
80
  private static final String SHELL_JS
82
  private static final String SHELL_JS
81
    = "org/eclipse/swt/widgets/Shell.js";
83
    = "org/eclipse/swt/widgets/Shell.js";
82
  private static final String TREE_JS
84
  private static final String TREE_JS
Lines 202-207 Link Here
202
      register( CTAB_FOLDER_JS, compress );
204
      register( CTAB_FOLDER_JS, compress );
203
      register( COOL_ITEM_JS, compress );
205
      register( COOL_ITEM_JS, compress );
204
      register( LIST_JS, compress );
206
      register( LIST_JS, compress );
207
      register( LIST_ITEM_JS, compress );
205
      register( SHELL_JS, compress );
208
      register( SHELL_JS, compress );
206
      register( TREE_JS, compress );
209
      register( TREE_JS, compress );
207
      register( TREE_ITEM_JS, compress );
210
      register( TREE_ITEM_JS, compress );
Lines 237-243 Link Here
237
      register( HTMLUTIL_JS, compress );
240
      register( HTMLUTIL_JS, compress );
238
      register( MULTICELLWIDGET, compress );
241
      register( MULTICELLWIDGET, compress );
239
      register( BUTTON, compress );
242
      register( BUTTON, compress );
240
      
243
241
      // register contributions
244
      // register contributions
242
      registerContributions();
245
      registerContributions();
243
    } finally {
246
    } finally {
(-)js/org/eclipse/swt/theme/AppearancesBase.js (+5 lines)
Lines 661-666 Link Here
661
        result.textColor = tv.getCssColor( "List-Item", "color" );
661
        result.textColor = tv.getCssColor( "List-Item", "color" );
662
      }
662
      }
663
      result.backgroundColor = tv.getCssColor( "List-Item", "background-color" );
663
      result.backgroundColor = tv.getCssColor( "List-Item", "background-color" );
664
      var outline = tv.getCssBorder( "List-Item", "outline" );
665
      result.outline = outline.getWidthTop() + "px " + outline.getStyleTop();
666
      if( outline.getColorTop() != null ) {
667
        result.outline += " " + outline.getColorTop();
668
      }
664
      return result;
669
      return result;
665
    }
670
    }
666
  },
671
  },
(-)js/org/eclipse/swt/widgets/ListItem.js (+46 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2009 EclipseSource and others. All rights reserved.
3
 * This program and the accompanying materials are made available under the
4
 * terms of the Eclipse Public License v1.0 which accompanies this distribution, 
5
 * and is available at http://www.eclipse.org/legal/epl-v10.html
6
 *
7
 * Contributors:
8
 *   EclipseSource - initial API and implementation
9
 ******************************************************************************/
10
11
/**
12
 * This class provides the client-side counterpart for
13
 * org.eclipse.swt.widgets.ListItem.
14
 */
15
qx.Class.define( "org.eclipse.swt.widgets.ListItem", {
16
  extend : qx.ui.form.ListItem,
17
  
18
  properties : {
19
    
20
    outline : {
21
      check : "String",
22
      themeable : true,
23
      nullable : false,
24
      apply : "_applyOutline",
25
      init : "1px dotted"
26
    }
27
    
28
  },
29
  
30
  members : {
31
    
32
    _applyOutline : function( value ) {
33
      this.handleStateChange();
34
    },
35
    
36
    handleStateChange : function() {
37
      if( this.hasState( "lead" ) ) {
38
        this.setStyleProperty( "outline", this.getOutline() );
39
      } else {
40
        this.setStyleProperty("outline", "0px none");
41
      }
42
    }
43
    
44
  }
45
  
46
} );
(-)src/org/eclipse/rwt/internal/theme/css/PropertyResolver.java (-1 / +2 lines)
Lines 157-163 Link Here
157
      result = ThemeDefinitionReader.TYPE_COLOR;
157
      result = ThemeDefinitionReader.TYPE_COLOR;
158
    } else if( "font".equals( property ) ) {
158
    } else if( "font".equals( property ) ) {
159
      result = ThemeDefinitionReader.TYPE_FONT;
159
      result = ThemeDefinitionReader.TYPE_FONT;
160
    } else if( "border".equals( property ) ) {
160
    } else if( "border".equals( property )
161
        || "outline".equals( property ) ) {
161
      result = ThemeDefinitionReader.TYPE_BORDER;
162
      result = ThemeDefinitionReader.TYPE_BORDER;
162
    } else if( "spacing".equals( property )
163
    } else if( "spacing".equals( property )
163
        || "width".equals( property )
164
        || "width".equals( property )
(-)src/org/eclipse/swt/internal/widgets/listkit/List.theme.xml (+4 lines)
Lines 48-53 Link Here
48
      <property name="background-color"
48
      <property name="background-color"
49
          type="color"
49
          type="color"
50
          description="Background color for list items." />
50
          description="Background color for list items." />
51
      
52
      <property name="outline"
53
          type="border"
54
          description="Outline around the focused list item." />    
51
55
52
      <state name="selected"
56
      <state name="selected"
53
          description="Applies to selected items." />
57
          description="Applies to selected items." />
(-)src/org/eclipse/swt/internal/widgets/listkit/List.default.css (+1 lines)
Lines 13-18 Link Here
13
List-Item {
13
List-Item {
14
  background-color: transparent;
14
  background-color: transparent;
15
  color: black;
15
  color: black;
16
  outline: 1px dotted;
16
}
17
}
17
18
18
List-Item:selected {
19
List-Item:selected {

Return to bug 286902