Changeset 14104

Show
Ignore:
Timestamp:
06/22/08 22:30:14 (5 months ago)
Author:
bill
Message:

Fix vertical alignment of tree icons by using <img> nodes rather than <div> nodes, thus making everything inline (w/vertical-align: middle) rather than inline-block.
Fixes #6475, refs #1728. !strict

Location:
dijit/trunk
Files:
8 modified

Legend:

Unmodified
Added
Removed
  • dijit/trunk/tests/css/dijitTests.css

    r13804 r14104  
    5656} 
    5757 
    58 .customFolderOpenedIcon, .customFolderClosedIcon { 
     58body .customFolderOpenedIcon, body .customFolderClosedIcon { 
    5959        background-image: url('../../demos/mail/icons.png'); /* mail icons sprite image */ 
    6060        background-repeat: no-repeat; 
    61         width: 16px; 
    62         height: 16px; 
    63         text-align: center; 
    64         padding-right:4px; 
     61        width: 18px; 
     62        height: 18px; 
    6563    background-position: -44px; 
    6664} 
  • dijit/trunk/themes/dijit.css

    r14096 r14104  
    11191119} 
    11201120 
     1121.dijitTreeRow img { 
     1122        /* make the expando and folder icons line up with the label */ 
     1123        vertical-align: middle; 
     1124} 
     1125 
    11211126.dijitTreeContent { 
    11221127    cursor: default; 
  • dijit/trunk/themes/nihilo/Tree.css

    r14095 r14104  
    3333    min-height: 18px; 
    3434    min-width: 18px; 
    35     padding-top:3px; 
    3635    padding-left:1px; 
    3736} 
  • dijit/trunk/themes/soria/Tree.css

    r14095 r14104  
    1717.soria .dijitTreeLabel { 
    1818        font-weight: normal; 
    19         margin-left: 3px;        
     19        margin-left: 3px; 
    2020} 
    2121 
     
    3333    min-height: 18px; 
    3434    min-width: 18px; 
    35     padding-top:3px; 
    3635    padding-left:1px; 
    3736} 
  • dijit/trunk/themes/tundra/Tree.css

    r14095 r14104  
    2828    min-height: 18px; 
    2929    min-width: 18px; 
    30     padding-top:3px; 
    31 } 
    32  
     30 } 
    3331 
    3432.tundra .dijitTreeExpand { 
  • dijit/trunk/Tree.js

    r14095 r14104  
    7474                        item = null; 
    7575                } 
    76                 this.iconNode.className = "dijitInline dijitTreeIcon " + tree.getIconClass(item, this.isExpanded); 
     76                this.iconNode.className = "dijitTreeIcon " + tree.getIconClass(item, this.isExpanded); 
    7777                this.labelNode.className = "dijitTreeLabel " + tree.getLabelClass(item, this.isExpanded); 
    7878        }, 
     
    120120                dijit.setWaiState(this.labelNode, "expanded", "true"); 
    121121                dijit.setWaiRole(this.containerNode, "group"); 
    122                 this.contentNode.className = "dijitInline dijitTreeContent dijitTreeContentExpanded"; 
     122                this.contentNode.className = "dijitTreeContent dijitTreeContentExpanded"; 
    123123                this._setExpando(); 
    124124                this._updateItemClasses(this.item); 
     
    135135                this.isExpanded = false; 
    136136                dijit.setWaiState(this.labelNode, "expanded", "false"); 
    137                 this.contentNode.className = "dijitInline dijitTreeContent"; 
     137                this.contentNode.className = "dijitTreeContent"; 
    138138                this._setExpando(); 
    139139                this._updateItemClasses(this.item); 
  • dijit/trunk/_tree/Node.html

    r14095 r14104  
    11<div class="dijitTreeNode" waiRole="presentation" 
    22        ><div dojoAttachPoint="rowNode" class="dijitTreeRow" waiRole="presentation" 
    3                 ><span dojoAttachPoint="expandoNode" class="dijitInline dijitTreeExpando" waiRole="presentation" 
    4                 ></span 
     3                ><img src="${_blankGif}" dojoAttachPoint="expandoNode" class="dijitTreeExpando" waiRole="presentation" 
    54                ><span dojoAttachPoint="expandoNodeText" class="dijitExpandoText" waiRole="presentation" 
    65                ></span 
    7                 ><div dojoAttachPoint="contentNode" dojoAttachEvent="onmouseenter:_onMouseEnter, onmouseleave:_onMouseLeave" 
    8                         class="dijitInline dijitTreeContent" waiRole="presentation"> 
    9                         <div dojoAttachPoint="iconNode" class="dijitInline dijitTreeIcon" waiRole="presentation"></div> 
    10                         <span dojoAttachPoint="labelNode" class="dijitTreeLabel" wairole="treeitem" tabindex="-1" waiState="selected-false" dojoAttachEvent="onfocus:_onNodeFocus"></span> 
    11                 </div 
     6                ><span dojoAttachPoint="contentNode" dojoAttachEvent="onmouseenter:_onMouseEnter, onmouseleave:_onMouseLeave" 
     7                        class="dijitTreeContent" waiRole="presentation"> 
     8                        <img src="${_blankGif}" dojoAttachPoint="iconNode" class="dijitTreeIcon" waiRole="presentation" 
     9                        ><span dojoAttachPoint="labelNode" class="dijitTreeLabel" wairole="treeitem" tabindex="-1" waiState="selected-false" dojoAttachEvent="onfocus:_onNodeFocus"></span> 
     10                </span 
    1211        ></div> 
    1312</div> 
  • dijit/trunk/_Widget.js

    r14060 r14104  
    8383        //              Other node references can be specified as properties of 'this' 
    8484        attributeMap: {id:"", dir:"", lang:"", "class":"", style:"", title:""},  // TODO: add on* handlers? 
     85 
     86        // Constants used in templates 
     87        _blankGif: dojo.moduleUrl("dojo", "resources/blank.gif"), 
    8588 
    8689        //////////// INITIALIZATION METHODS ///////////////////////////////////////