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 = () => {
8585
8686const stylesheet = `
8787 #win {
88- background-color: black;
89- color: white;
88+ background-color: transparent;
9089 }
9190 #container {
9291 height: '100%';
@@ -118,10 +117,11 @@ const buttonBox = `
118117const initWindow = ( win : QMainWindow ) => {
119118 win . hide ( ) ; //https://forum.qt.io/topic/60642/framelesswindowhint-fails-at-runtime-on-mainwindow
120119 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 ) ;
125125 }
126126 win . show ( ) ;
127127} ;
You can’t perform that action at this time.
0 commit comments