File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
examples/weather-app-widget/src Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -85,8 +85,7 @@ const App = () => {
85
85
86
86
const stylesheet = `
87
87
#win {
88
- background-color: black;
89
- color: white;
88
+ background-color: transparent;
90
89
}
91
90
#container {
92
91
height: '100%';
@@ -118,10 +117,11 @@ const buttonBox = `
118
117
const initWindow = ( win : QMainWindow ) => {
119
118
win . hide ( ) ; //https://forum.qt.io/topic/60642/framelesswindowhint-fails-at-runtime-on-mainwindow
120
119
win . resize ( 300 , 300 ) ;
121
- if ( os . platform ( ) === 'darwin' ) {
122
- // win.setAttribute(WidgetAttribute.WA_NoSystemBackground, true);
123
- // win.setAttribute(WidgetAttribute.WA_TranslucentBackground, true);
124
- // win.setWindowFlag(WindowType.FramelessWindowHint, true);
120
+
121
+ win . setWindowFlag ( WindowType . FramelessWindowHint , true ) ;
122
+ win . setWindowFlag ( WindowType . Widget , true ) ;
123
+ if ( os . platform ( ) === "darwin" ) {
124
+ win . setAttribute ( WidgetAttribute . WA_TranslucentBackground , true ) ;
125
125
}
126
126
win . show ( ) ;
127
127
} ;
You can’t perform that action at this time.
0 commit comments