change layout prop to childLayout
This commit is contained in:
parent
f94f418947
commit
164e54c608
@ -6,7 +6,7 @@ import { Direction } from '../QtEnums';
|
||||
|
||||
export class QBoxLayout extends NodeLayout {
|
||||
native: NativeElement;
|
||||
layout: NodeLayout | null;
|
||||
childLayouts: Set<NodeLayout>;
|
||||
constructor(dir: Direction, parent?: NodeWidget) {
|
||||
let native: NativeElement;
|
||||
if (parent) {
|
||||
@ -17,11 +17,11 @@ export class QBoxLayout extends NodeLayout {
|
||||
super(native);
|
||||
this.nodeParent = parent;
|
||||
this.native = native;
|
||||
this.layout = null;
|
||||
this.childLayouts = new Set();
|
||||
}
|
||||
addLayout(layout: NodeLayout, stretch = 0): void {
|
||||
this.native.addLayout(layout.native, stretch);
|
||||
this.layout = layout;
|
||||
this.childLayouts.add(layout);
|
||||
}
|
||||
addSpacing(size: number): void {
|
||||
this.native.addSpacing(size);
|
||||
@ -41,7 +41,7 @@ export class QBoxLayout extends NodeLayout {
|
||||
}
|
||||
insertLayout(index: number, layout: NodeLayout, stretch = 0): void {
|
||||
this.native.insertLayout(index, layout.native, stretch);
|
||||
this.layout = layout;
|
||||
this.childLayouts.add(layout);
|
||||
}
|
||||
removeWidget(widget: NodeWidget): void {
|
||||
this.native.removeWidget(widget.native);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user