From 62424e4ae365b7272cfe7dd496e469bf68cfd53e Mon Sep 17 00:00:00 2001 From: earthian <418@duck.com> Date: Mon, 13 May 2024 19:41:43 +0700 Subject: [PATCH 1/2] fix outdated information and typos --- src/content/docs/config/widgets.md | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/content/docs/config/widgets.md b/src/content/docs/config/widgets.md index 64c75fc..a21b420 100644 --- a/src/content/docs/config/widgets.md +++ b/src/content/docs/config/widgets.md @@ -412,7 +412,7 @@ const fixed = Widget.Fixed({ ### FlowBox -subclass of [Gtk.FlowBox](https://gjs-docs.gnome.org/gtk30~3.0/gtk.FlowBox) +subclass of [Gtk.FlowBox](https://gjs-docs.gnome.org/gtk30~3.0/gtk.flowbox) :::note `Gtk.FlowBox` is not yet subclassed to be declarative and doesn't have @@ -522,7 +522,7 @@ const discrete = Widget.LevelBar({ ### ListBox -subclass of [Gtk.ListBox](https://gjs-docs.gnome.org/gtk30~3.0/gtk.ListBox) +subclass of [Gtk.ListBox](https://gjs-docs.gnome.org/gtk30~3.0/gtk.listbox) :::note `Gtk.ListBox` is not yet subclassed to be declarative and doesn't have @@ -672,7 +672,7 @@ subclass of [Gtk.ScrolledWindow](https://gjs-docs.gnome.org/gtk30~3.0/gtk.scroll const scrollable = Widget.Scrollable({ hscroll: 'always', vscroll: 'never', - style: 'min-width: 20px;', + css: 'min-width: 20px;', child: Widget.Label('Lorem ipsum dolor sit amet, ' + 'officia excepteur ex fugiat reprehenderit enim ' + 'labore culpa sint ad nisi Lorem pariatur mollit'), @@ -699,7 +699,6 @@ subclass of [Gtk.Scale](https://gjs-docs.gnome.org/gtk30~3.0/gtk.scale) | Property | Type | Description | |----------|------|-------------| -| vertical | `bool` | Setting `vertical: true` is the same as `orientation: 1` | | value | `number` | | | min | `number` | | | max | `number` | | @@ -709,7 +708,6 @@ subclass of [Gtk.Scale](https://gjs-docs.gnome.org/gtk30~3.0/gtk.scale) ```js Widget.Slider({ onChange: ({ value }) => print(value), - vertical: true, value: 0, min: 0, max: 1, @@ -730,12 +728,12 @@ subclass of [Gtk.SpinButton](https://gjs-docs.gnome.org/gtk30~3.0/gtk.spinbutton |----------|------| | on-value-changed | `() => void` | | range | `[min: number, max: number]` | -| incements | `[step: number, page: number]` | +| increments | `[step: number, page: number]` | ```js const spinbutton = Widget.SpinButton({ range: [0, 100], - incements: [1, 5], + increments: [1, 5], onValueChanged: ({ value }) => { print(value) }, From 576fe8abaf3cd03f46a414b07854c3b82f9abac4 Mon Sep 17 00:00:00 2001 From: earthian <418@duck.com> Date: Tue, 14 May 2024 15:31:58 +0700 Subject: [PATCH 2/2] revert vertical prop doc --- src/content/docs/config/widgets.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/content/docs/config/widgets.md b/src/content/docs/config/widgets.md index a21b420..d4dbf0b 100644 --- a/src/content/docs/config/widgets.md +++ b/src/content/docs/config/widgets.md @@ -699,6 +699,7 @@ subclass of [Gtk.Scale](https://gjs-docs.gnome.org/gtk30~3.0/gtk.scale) | Property | Type | Description | |----------|------|-------------| +| vertical | `bool` | Setting `vertical: true` is the same as `orientation: 1` | | value | `number` | | | min | `number` | | | max | `number` | | @@ -708,6 +709,7 @@ subclass of [Gtk.Scale](https://gjs-docs.gnome.org/gtk30~3.0/gtk.scale) ```js Widget.Slider({ onChange: ({ value }) => print(value), + vertical: true, value: 0, min: 0, max: 1,