Skip to content

Commit

Permalink
feat: Add padding property to DockPanel.addWidget
Browse files Browse the repository at this point in the history
Signed-off-by: Gordon Smith <[email protected]>
  • Loading branch information
GordonSmith committed Jan 12, 2024
1 parent f7e3fb4 commit 446cebd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/phosphor/src/DockPanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ export class DockPanel extends HTMLWidget implements IMessageHandler, IMessageHo
return retVal;
}

addWidget(widget: Widget, title: string, location: PhosphorDockPanel.InsertMode = "split-right", refWidget?: Widget, closable?: boolean | IClosable) {
addWidget(widget: Widget, title: string, location: PhosphorDockPanel.InsertMode = "split-right", refWidget?: Widget, closable?: boolean | IClosable, padding: number = 8) {
const addMode: PhosphorDockPanel.IAddOptions = { mode: location, ref: this.getWidgetAdapter(refWidget) };
const wa = new WidgetAdapter(this, widget, {}, closable);
wa.title.label = title;
wa.padding = 8;
wa.padding = padding;
this._dock.addWidget(wa, addMode);
this._dock.appendContent(wa);
this._dock.tabsMovable = true;
Expand Down

0 comments on commit 446cebd

Please sign in to comment.