Skip to content
Permalink
Browse files

Selectmenu: removed iconWidth

  • Loading branch information
fnagel committed Sep 28, 2011
1 parent 3e1557b commit 7f8f3212985edd4150a23c659da068f581d5d7db
Showing with 8 additions and 4 deletions.
  1. +8 −4 ui/jquery.ui.selectmenu.js
@@ -21,7 +21,6 @@ $.widget( "ui.selectmenu", {
defaultElement: "<select>",
options: {
dropdown: true,
iconWidth: 26,
wrapperElement: "<div />",
appendTo: "body",
position: {
@@ -169,11 +168,16 @@ $.widget( "ui.selectmenu", {
id: self.ids[1]
});

// wrap list
var newelementWidth = self.newelement.outerWidth();
// wrap list
if ( options.dropdown ) {
var setWidth = self.newelement.outerWidth();
} else {
var text = self.newelement.find( "span.ui-button-text");
var setWidth = text.width() + parseFloat( text.css( "padding-left" ) ) + parseFloat( text.css( "margin-left" ) );
}
self.listWrap = $( options.wrapperElement )
.addClass( self.widgetBaseClass + '-menu' )
.width( ( options.dropdown ) ? newelementWidth : newelementWidth - options.iconWidth )
.width( setWidth )
.append( self.list )
.appendTo( options.appendTo );

0 comments on commit 7f8f321

Please sign in to comment.
You can’t perform that action at this time.