File tree Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Original file line number Diff line number Diff line change 1
- import { QWidget , NodeWidget } from "@nodegui/nodegui" ;
1
+ import {
2
+ QWidget ,
3
+ NodeWidget ,
4
+ WindowState ,
5
+ CursorShape ,
6
+ QCursor ,
7
+ QIcon
8
+ } from "@nodegui/nodegui" ;
2
9
import { registerComponent } from "../config" ;
3
10
4
11
type Geometry = {
@@ -19,6 +26,10 @@ export interface ViewProps {
19
26
mouseTracking ?: boolean ;
20
27
enabled ?: boolean ;
21
28
windowOpacity ?: Number ;
29
+ windowTitle ?: string ;
30
+ windowState ?: WindowState ;
31
+ windowIcon ?: QIcon ;
32
+ cursor ?: CursorShape | QCursor ;
22
33
on ?: ListenerMap ;
23
34
ref ?: any ;
24
35
}
@@ -61,6 +72,18 @@ export const setProps = (
61
72
set windowOpacity ( opacity : Number ) {
62
73
widget . setWindowOpacity ( opacity ) ;
63
74
} ,
75
+ set windowTitle ( title : string ) {
76
+ widget . setWindowTitle ( title ) ;
77
+ } ,
78
+ set windowState ( state : WindowState ) {
79
+ widget . setWindowState ( state ) ;
80
+ } ,
81
+ set cursor ( cursor : CursorShape | QCursor ) {
82
+ widget . setCursor ( cursor ) ;
83
+ } ,
84
+ set windowIcon ( icon : QIcon ) {
85
+ widget . setWindowIcon ( icon ) ;
86
+ } ,
64
87
set on ( listenerMap : ListenerMap ) {
65
88
const listenerMapLatest = Object . assign ( { } , listenerMap ) ;
66
89
const oldListenerMap = Object . assign ( { } , oldProps . on ) ;
You can’t perform that action at this time.
0 commit comments