Size the canvas item to the proper width.
483963
def size_to_content(self):
        
        new_sizing = self.copy_sizing()
        new_sizing.minimum_width = 0
        new_sizing.maximum_width = 0
        axes = self.__axes
        if axes and axes.is_valid:
            if axes.y_calibration and axes.y_calibration.units:
                new_sizing.minimum_width = self.font_size + 4
                new_sizing.maximum_width = self.font_size + 4
        self.update_sizing(new_sizing)
869707
def sizeHint(self, column):
        
        hint = super(XTreeWidgetItem, self).sizeHint(column)
        hint.setHeight(max(hint.height(), self.fixedHeight()))
        return hint
113943
def wrap(self, availWidth, availHeight):
        "  "
        availHeight = self.setMaxHeight(availHeight)
        # print "image wrap", id(self), availWidth, availHeight, self.drawWidth, self.drawHeight
        width = min(self.drawWidth, availWidth)
        wfactor = float(width) / self.drawWidth
        height = min(self.drawHeight, availHeight * MAX_IMAGE_RATIO)
        hfactor = float(height) / self.drawHeight
        factor = min(wfactor, hfactor)
        self.dWidth = self.drawWidth * factor
        self.dHeight = self.drawHeight * factor
        # print "imgage result", factor, self.dWidth, self.dHeight
        return self.dWidth, self.dHeight
1286371
def _get_width(maxwidth):
    """"""
    width = maxwidth / 3
    if maxwidth <= 60:
        width = maxwidth
    elif 60 < maxwidth <= 120:
        width = maxwidth / 2
    return width
1060158
def width(self, width=None):
        """"""

        if width is None:
            return self._width
        else:
            if not is_numeric(width):
                raise TypeError("width must be numeric, not '%s'" % str(width))
            self._width = width
308107
function() {
        var c = this._canvas;
        c.width = Crafty.viewport.width;
        c.height = Crafty.viewport.height;

        var gl = this.context;
        gl.viewportWidth = c.width;
        gl.viewportHeight = c.height;
    }
717057
def do_fit(self, event, min_size=None):
        
        #self.grid.ShowScrollbars(wx.SHOW_SB_NEVER, wx.SHOW_SB_NEVER)
        if event:
            event.Skip()
        self.main_sizer.Fit(self)
        disp_size = wx.GetDisplaySize()
        actual_size = self.GetSize()
        # if there isn't enough room to display new content
        # resize the frame
        if disp_size[1] - 75 < actual_size[1]:
            self.SetSize((actual_size[0], disp_size[1] * .95))
        # make sure you adhere to a minimum size
        if min_size:
            actual_size = self.GetSize()
            larger_width = max([actual_size[0], min_size[0]])
            larger_height = max([actual_size[1], min_size[1]])
            if larger_width > actual_size[0] or larger_height > actual_size[1]:
                self.SetSize((larger_width, larger_height))
        self.Centre()
904117
function (element) {
            var p = this.padding,
                w = this.canvas.width,
                h = this.canvas.height * 0.5;

            // Convert padding percentage to actual padding
            p = p.map(function (a, i) {
                return a * ((i % 2) ? w : h);
            });

            return [
                this.prettify((parseInt($(element).css("left"), 10)    - p[3]) / (w + p[1] + p[3])),
                this.prettify((h - parseInt($(element).css("top"), 10) - p[2]) / (h - p[0] - p[2]))
            ];
        }
827185
def OnMeasureItemWidth(self, item):
        """"""

        item_name = self.GetItems()[item]
        return icons[item_name].GetWidth()
993214
def resize(self, width, height):
        """"""
        SetWindowPos(self._hwnd, None, 0, 0, width, height, SWP_NOMOVE)
54415
def adjustMinimumWidth( self ):
        
        pw = self.pixmapSize().width()
        
        # allow 1 pixel space between the icons
        self.setMinimumWidth(pw * self.maximum() + 3 * self.maximum())
630822
function( width, height ) {
		if( arguments.length === 2 ) {
			this.width = width;
			this.height = height;
		} else {
			this.width = this.container.width();
			this.height = this.container.height();
		}

		if( this.isInitialised === true ) {
			this.root.callDownwards( 'setSize', [ this.width, this.height ] );

			if( this._maximisedItem ) {
				this._maximisedItem.element.width( this.container.width() );
				this._maximisedItem.element.height( this.container.height() );
				this._maximisedItem.callDownwards( 'setSize' );
			}

			this._adjustColumnsResponsive();
		}
	}
1190229
function Canvas(width, height) {
  var canvas = new NodeCanvas(width, height);
  var ctx = canvas.getContext('2d');
  this.canvas = canvas;
  this.ctx = ctx;
}
884830
def element_width_should_be(self, locator, expected):
		""""""

		self._info("Verifying element '%s' width is '%s'" % (locator, expected))
		self._check_element_size(locator, 'width', expected)
221952
function(width, height){
		if(!this.preInitCanvasInfo){
			this.painter.resizeCanvas(width, height);
		}
		else{
			this.preInitCanvasInfo.width  = width;
			this.preInitCanvasInfo.height = height;
		}
	}
537636
protected void normalizeItemWidths() {

        int widestItemWidth = 1 + getWidthOfWidestItem();
        // Add 1 because actual width may not be an integer
        for (CmsContextMenuItemWidget item : m_menuItems) {
            if (measureWidth(item) <= widestItemWidth) {
                item.setWidth(widestItemWidth + "px");
            }
        }
    }
1195951
def toggleWidth(self, width):
        ''
        if self.width != width:
            self.width = width
        else:
            self.width = int(options.default_width)