From 8108bcc6a34e0460f642dc724f0a26f33b938825 Mon Sep 17 00:00:00 2001 From: Aylur Date: Wed, 9 Oct 2024 11:50:50 +0000 Subject: gjs: fix widget props type delete test --- core/gjs/src/widgets.ts | 34 +++++++++++++++++----------------- core/lua/test.lua | 13 ------------- 2 files changed, 17 insertions(+), 30 deletions(-) delete mode 100644 core/lua/test.lua (limited to 'core') diff --git a/core/gjs/src/widgets.ts b/core/gjs/src/widgets.ts index 50fe303..e14ca0b 100644 --- a/core/gjs/src/widgets.ts +++ b/core/gjs/src/widgets.ts @@ -10,14 +10,14 @@ Object.defineProperty(Astal.Box.prototype, "children", { set(v) { this.set_children(v) }, }) -export type BoxProps = ConstructProps +export type BoxProps = ConstructProps export class Box extends astalify(Astal.Box) { static { GObject.registerClass({ GTypeName: "Box" }, this) } constructor(props?: BoxProps, ...children: Array) { super({ children, ...props } as any) } } // Button -export type ButtonProps = ConstructProps +export type CenterBoxProps = ConstructProps export class CenterBox extends astalify(Astal.CenterBox) { static { GObject.registerClass({ GTypeName: "CenterBox" }, this) } constructor(props?: CenterBoxProps, ...children: Array) { super({ children, ...props } as any) } } // CircularProgress -export type CircularProgressProps = ConstructProps +export type CircularProgressProps = ConstructProps export class CircularProgress extends astalify(Astal.CircularProgress) { static { GObject.registerClass({ GTypeName: "CircularProgress" }, this) } constructor(props?: CircularProgressProps, child?: BindableChild) { super({ child, ...props } as any) } } // DrawingArea -export type DrawingAreaProps = ConstructProps export class DrawingArea extends astalify(Gtk.DrawingArea) { @@ -54,7 +54,7 @@ export class DrawingArea extends astalify(Gtk.DrawingArea) { } // Entry -export type EntryProps = ConstructProps @@ -64,7 +64,7 @@ export class Entry extends astalify(Gtk.Entry) { } // EventBox -export type EventBoxProps = ConstructProps +export type IconProps = ConstructProps export class Icon extends astalify(Astal.Icon) { static { GObject.registerClass({ GTypeName: "Icon" }, this) } constructor(props?: IconProps) { super(props as any) } } // Label -export type LabelProps = ConstructProps +export type LabelProps = ConstructProps export class Label extends astalify(Astal.Label) { static { GObject.registerClass({ GTypeName: "Label" }, this) } constructor(props?: LabelProps) { super(props as any) } } // LevelBar -export type LevelBarProps = ConstructProps +export type LevelBarProps = ConstructProps export class LevelBar extends astalify(Astal.LevelBar) { static { GObject.registerClass({ GTypeName: "LevelBar" }, this) } constructor(props?: LevelBarProps) { super(props as any) } @@ -103,28 +103,28 @@ export class LevelBar extends astalify(Astal.LevelBar) { // TODO: ListBox // Overlay -export type OverlayProps = ConstructProps +export type OverlayProps = ConstructProps export class Overlay extends astalify(Astal.Overlay) { static { GObject.registerClass({ GTypeName: "Overlay" }, this) } constructor(props?: OverlayProps, ...children: Array) { super({ children, ...props } as any) } } // Revealer -export type RevealerProps = ConstructProps +export type RevealerProps = ConstructProps export class Revealer extends astalify(Gtk.Revealer) { static { GObject.registerClass({ GTypeName: "Revealer" }, this) } constructor(props?: RevealerProps, child?: BindableChild) { super({ child, ...props } as any) } } // Scrollable -export type ScrollableProps = ConstructProps +export type ScrollableProps = ConstructProps export class Scrollable extends astalify(Astal.Scrollable) { static { GObject.registerClass({ GTypeName: "Scrollable" }, this) } constructor(props?: ScrollableProps, child?: BindableChild) { super({ child, ...props } as any) } } // Slider -export type SliderProps = ConstructProps export class Slider extends astalify(Astal.Slider) { @@ -133,21 +133,21 @@ export class Slider extends astalify(Astal.Slider) { } // Stack -export type StackProps = ConstructProps +export type StackProps = ConstructProps export class Stack extends astalify(Astal.Stack) { static { GObject.registerClass({ GTypeName: "Stack" }, this) } constructor(props?: StackProps, ...children: Array) { super({ children, ...props } as any) } } // Switch -export type SwitchProps = ConstructProps +export type SwitchProps = ConstructProps export class Switch extends astalify(Gtk.Switch) { static { GObject.registerClass({ GTypeName: "Switch" }, this) } constructor(props?: SwitchProps) { super(props as any) } } // Window -export type WindowProps = ConstructProps +export type WindowProps = ConstructProps export class Window extends astalify(Astal.Window) { static { GObject.registerClass({ GTypeName: "Window" }, this) } constructor(props?: WindowProps, child?: BindableChild) { super({ child, ...props } as any) } diff --git a/core/lua/test.lua b/core/lua/test.lua deleted file mode 100644 index 2494403..0000000 --- a/core/lua/test.lua +++ /dev/null @@ -1,13 +0,0 @@ -local a = require("astal") - -a.App:start({ - instance_name = "Hello", - main = function() - a.Widget.Window({ - no_implicit_destroy = true, - a.Widget.Button({ - label = "hello", - }), - }) - end, -}) -- cgit v1.2.3