Skip to content

Commit

Permalink
Improve sizing of EmptyPaneTab
Browse files Browse the repository at this point in the history
  • Loading branch information
sedwards2009 committed Aug 27, 2023
1 parent ff6a114 commit b6edb58
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions main/src/EmptyPaneTab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,16 @@ export class EmptyPaneTab implements Tab {
direction: Direction.LeftToRight,
children: [
{ widget: Widget({}), stretch: 1},
BoxLayout({
direction: Direction.TopToBottom,
children: [
Label({text: "Pane Menu"}),
this.#listPicker.getWidget()
]
}),
{ layout:
BoxLayout({
direction: Direction.TopToBottom,
children: [
Label({text: "Pane Menu"}),
this.#listPicker.getWidget()
]
}),
stretch: 1,
},
{ widget: Widget({}), stretch: 1},
]
})
Expand Down Expand Up @@ -92,8 +95,10 @@ export class EmptyPaneTab implements Tab {
}

populateMenu(window: Window): void {
const widthPx = Math.round(300 * window.getDpi() / 96);
this.#listPicker.getWidget().setFixedWidth(widthPx);
const minimumWidthPx = Math.round(300 * window.getDpi() / 96);
const maximumWidthPx = Math.round(450 * window.getDpi() / 96);
this.#listPicker.getWidget().setMinimumWidth(minimumWidthPx);
this.#listPicker.getWidget().setMaximumWidth(maximumWidthPx);

this.#state = {
activeBlockFrame: null,
Expand Down

0 comments on commit b6edb58

Please sign in to comment.