Add margins to your outmost view which contains everything. As default they are 0
are applied
18490
public DialogPlusBuilder setOutMostMargin(int left, int top, int right, int bottom) {
    this.outMostMargin[0] = left;
    this.outMostMargin[1] = top;
    this.outMostMargin[2] = right;
    this.outMostMargin[3] = bottom;
    return this;
  }
492369
def _do_layout(self):
        """"""

        sizer_csvoptions = wx.FlexGridSizer(5, 4, 5, 5)

        # Adding parameter widgets to sizer_csvoptions
        leftpos = wx.LEFT | wx.ADJUST_MINSIZE
        rightpos = wx.RIGHT | wx.EXPAND

        current_label_margin = 0  # smaller for left column
        other_label_margin = 15

        for label, widget in zip(self.param_labels, self.param_widgets):
            sizer_csvoptions.Add(label, 0, leftpos, current_label_margin)
            sizer_csvoptions.Add(widget, 0, rightpos, current_label_margin)

            current_label_margin, other_label_margin = \
                other_label_margin, current_label_margin

        sizer_csvoptions.AddGrowableCol(1)
        sizer_csvoptions.AddGrowableCol(3)

        self.sizer_csvoptions = sizer_csvoptions
1368109
def setContentsMargins(self, left, top, right, bottom):
        
        self._margins   = (left, top, right, bottom)
        self.adjustTitleFont()
332319
private ArrayList<Rect> calculateAllBounds(Paint paint) {
        ArrayList<Rect> list = new ArrayList<Rect>();
        //For each views (If no values then add a fake one)
        final int count = mRecyclerView.getAdapter().getItemCount();
        final int width = getWidth();
        final int halfWidth = width / 2;
        for (int i = 0; i < count; i++) {
            Rect bounds = calcBounds(i, paint);
            int w = bounds.right - bounds.left;
            int h = bounds.bottom - bounds.top;
            bounds.left = (int)(halfWidth - (w / 2f) + ((i - mCurrentPage - mPageOffset) * width));
            bounds.right = bounds.left + w;
            bounds.top = 0;
            bounds.bottom = h;
            list.add(bounds);
        }

        return list;
    }
772929
function setLayout(d, layout, lastDisplay) {
        if (layout === 'vertical' || layout === 'multimode_vertical' ||
            layout === 'all_vertical') {

            d.displayDiv.style.float = 'none';
            d.titleDiv.style.float = 'none';
            d.titleDiv.style['margin-right'] = '0px';
            d.contentDiv.style.float = 'none';
            return true;
        }
        if (layout === 'horizontal') {
            d.displayDiv.style.float = 'none';
            d.titleDiv.style.float = 'left';
            d.titleDiv.style['margin-right'] = '6px';
            d.contentDiv.style.float = 'right';
            return true;
        }
        if (layout === 'multimode_horizontal') {
            d.displayDiv.style.float = 'left';
            d.titleDiv.style.float = 'none';
            d.titleDiv.style['margin-right'] = '0px';
            d.contentDiv.style.float = 'none';
            if (!lastDisplay) {
                d.displayDiv.style['margin-right'] = '10px';
            }
            return true;
        }
        if (layout === 'all_horizontal') {
            d.displayDiv.style.float = 'left';
            d.titleDiv.style.float = 'left';
            d.titleDiv.style['margin-right'] = '6px';
            d.contentDiv.style.float = 'right';
            if (!lastDisplay) {
                d.displayDiv.style['margin-right'] = '10px';
            }
            return true;
        }
        return false;
    }
57977
def _set_view(self):
        """"""
        if self.logarithmic:
            view_class = HorizontalLogView
        else:
            view_class = HorizontalView

        self.view = view_class(
            self.width - self.margin_box.x, self.height - self.margin_box.y,
            self._box
        )
249896
function outerWidth(margin) {
  var s, style;
  if(!this.length) {
    return null;
  }
  s = this.dom[0].getClientRects()[0].width;
  if(!margin) {
    style = window.getComputedStyle(this.dom[0], null);
    s -= parseInt(style.getPropertyValue('margin-top'));
    s -= parseInt(style.getPropertyValue('margin-bottom'));
  }
  return s;
}
592072
def _extents(self):
        
        return (
            self._parent.width - self.margin_left - self.margin_right,
            self._parent.height - self.margin_top - self.margin_bottom
        )
483339
def _nuke_set_zero_margins(widget_object):
    
    parentApp = QtWidgets.QApplication.allWidgets()
    parentWidgetList = []
    for parent in parentApp:
        for child in parent.children():
            if widget_object.__class__.__name__ == child.__class__.__name__:
                parentWidgetList.append(
                    parent.parentWidget())
                parentWidgetList.append(
                    parent.parentWidget().parentWidget())
                parentWidgetList.append(
                    parent.parentWidget().parentWidget().parentWidget())

                for sub in parentWidgetList:
                        for tinychild in sub.children():
                            try:
                                tinychild.setContentsMargins(0, 0, 0, 0)
                            except Exception:
                                pass
1041293
function () {
        var self = this;

        self.parent()._lastRect = null;

        DomUtils.css(self.getEl(), { width: '', height: '' });

        self._layoutRect = self._lastRepaintRect = self._lastLayoutRect = null;
        self.initLayoutRect();
      }
1206067
def add_space(window):
        

        row, col = window.getyx()
        _, max_cols = window.getmaxyx()
        n_cols = max_cols - col - 1
        if n_cols <= 0:
            # Trying to draw outside of the screen bounds
            return

        window.addstr(row, col, ' ')
308567
def initialize_view(self):
        """"""
        self.clear()
        self.item_depth = 0   # To be use for collapsing/expanding one level
        self.item_list = []  # To be use for collapsing/expanding one level
        self.items_to_be_shown = {}
        self.current_view_depth = 0
1359972
function () {
        var self = this, style, rect;

        style = self.getEl().style;
        rect = self._layoutRect;

        style.left = rect.x + 'px';
        style.top = rect.y + 'px';
        style.zIndex = 0xFFFF + 0xFFFF;
      }
1248997
private void setIndicatorMeasure(View indicator, int width, int height, int margin) {
        if (indicator != null) {
            ViewGroup.LayoutParams layoutParams = indicator.getLayoutParams();
            layoutParams.width = width;
            layoutParams.height = height;

            if (margin > 0) {
                if (layoutParams instanceof FrameLayout.LayoutParams) {
                    FrameLayout.LayoutParams frameLayoutParams = (FrameLayout.LayoutParams) layoutParams;
                    frameLayoutParams.topMargin = margin;
                } else if (layoutParams instanceof LayoutParams) {
                    LayoutParams linearLayoutParams = (LayoutParams) layoutParams;
                    linearLayoutParams.topMargin = margin;
                }
            }
            indicator.setLayoutParams(layoutParams);
        }
    }
760527
def _set_leftMargin(self, value):
        
        diff = value - self.leftMargin
        self.moveBy((diff, 0))
        self.width += diff
1298081
void viewDidInit(CGRect bounds) {
    defaultFramebuffer = gl.glGetInteger(GL20.GL_FRAMEBUFFER_BINDING);
    if (defaultFramebuffer == 0) throw new IllegalStateException(
      "Failed to determine defaultFramebuffer");
    boundsChanged(bounds);
  }
145227
function() {
        var style = this._div.style,
            view = this._viewportRect();

        var scale = view._scale;
        var dx = -view._x * scale;
        var dy = -view._y * scale;

        style.transform = style[Crafty.support.prefix + "Transform"] =
            "scale(" + scale + ", " + scale + ")";
        style.left = Math.round(dx) + "px";
        style.top = Math.round(dy) + "px";
        style.zIndex = this.options.z;
    }