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 {
|
||||
type BindableProps,
|
||||
childType,
|
||||
type Cursor,
|
||||
dummyBuilder,
|
||||
type MixinParams,
|
||||
noImplicitDestroy,
|
||||
setChildren,
|
||||
childType,
|
||||
} from './generics';
|
||||
|
||||
|
||||
|
@ -107,6 +108,18 @@ export default <
|
|||
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(
|
||||
object: Connectable,
|
||||
|
|
|
@ -25,4 +25,41 @@ export interface AstalifyProps {
|
|||
css: string
|
||||
child: 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,
|
||||
|
||||
endWidget: MenuButton({
|
||||
cursor: Gdk.Cursor.new_from_name('pointer', null),
|
||||
cursorName: 'pointer',
|
||||
hexpand: true,
|
||||
halign: CENTER,
|
||||
|
||||
|
|
Loading…
Reference in a new issue