feat(ags4): add cursorName to AstalifyProps
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
e6e79d4bbc
commit
bd6fa7ba28
3 changed files with 52 additions and 2 deletions
|
@ -7,11 +7,12 @@ import setupControllers from './controller';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
type BindableProps,
|
type BindableProps,
|
||||||
|
childType,
|
||||||
|
type Cursor,
|
||||||
dummyBuilder,
|
dummyBuilder,
|
||||||
type MixinParams,
|
type MixinParams,
|
||||||
noImplicitDestroy,
|
noImplicitDestroy,
|
||||||
setChildren,
|
setChildren,
|
||||||
childType,
|
|
||||||
} from './generics';
|
} from './generics';
|
||||||
|
|
||||||
|
|
||||||
|
@ -107,6 +108,18 @@ export default <
|
||||||
this.setChildren(this, children);
|
this.setChildren(this, children);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private _cursorName: Cursor = 'default';
|
||||||
|
|
||||||
|
@property(String)
|
||||||
|
get cursorName(): Cursor {
|
||||||
|
return this._cursorName;
|
||||||
|
}
|
||||||
|
|
||||||
|
set cursorName(val: Cursor) {
|
||||||
|
this._cursorName = val;
|
||||||
|
this.set_cursor_from_name(val);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
hook(
|
hook(
|
||||||
object: Connectable,
|
object: Connectable,
|
||||||
|
|
|
@ -25,4 +25,41 @@ export interface AstalifyProps {
|
||||||
css: string
|
css: string
|
||||||
child: Gtk.Widget
|
child: Gtk.Widget
|
||||||
children: Gtk.Widget[]
|
children: Gtk.Widget[]
|
||||||
|
cursorName: Cursor
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type Cursor =
|
||||||
|
| 'default'
|
||||||
|
| 'help'
|
||||||
|
| 'pointer'
|
||||||
|
| 'context-menu'
|
||||||
|
| 'progress'
|
||||||
|
| 'wait'
|
||||||
|
| 'cell'
|
||||||
|
| 'crosshair'
|
||||||
|
| 'text'
|
||||||
|
| 'vertical-text'
|
||||||
|
| 'alias'
|
||||||
|
| 'copy'
|
||||||
|
| 'no-drop'
|
||||||
|
| 'move'
|
||||||
|
| 'not-allowed'
|
||||||
|
| 'grab'
|
||||||
|
| 'grabbing'
|
||||||
|
| 'all-scroll'
|
||||||
|
| 'col-resize'
|
||||||
|
| 'row-resize'
|
||||||
|
| 'n-resize'
|
||||||
|
| 'e-resize'
|
||||||
|
| 's-resize'
|
||||||
|
| 'w-resize'
|
||||||
|
| 'ne-resize'
|
||||||
|
| 'nw-resize'
|
||||||
|
| 'sw-resize'
|
||||||
|
| 'se-resize'
|
||||||
|
| 'ew-resize'
|
||||||
|
| 'ns-resize'
|
||||||
|
| 'nesw-resize'
|
||||||
|
| 'nwse-resize'
|
||||||
|
| 'zoom-in'
|
||||||
|
| 'zoom-out';
|
||||||
|
|
|
@ -35,7 +35,7 @@ export default () => {
|
||||||
centerWidget: styledBox,
|
centerWidget: styledBox,
|
||||||
|
|
||||||
endWidget: MenuButton({
|
endWidget: MenuButton({
|
||||||
cursor: Gdk.Cursor.new_from_name('pointer', null),
|
cursorName: 'pointer',
|
||||||
hexpand: true,
|
hexpand: true,
|
||||||
halign: CENTER,
|
halign: CENTER,
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue