File tree Expand file tree Collapse file tree 4 files changed +15
-3
lines changed
examples/weather-app-widget/src Expand file tree Collapse file tree 4 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -19,12 +19,14 @@ const placeStyle = `
1919 flex: 1;
2020 font-size: 20px;
2121 qproperty-alignment: 'AlignCenter';
22+ color: white;
2223` ;
2324
2425const dateStyle = `
2526 flex: 1;
2627 font-size: 12px;
2728 qproperty-alignment: 'AlignCenter';
29+ color: white;
2830` ;
2931
3032const containerStyle = `
Original file line number Diff line number Diff line change @@ -21,4 +21,5 @@ const containerStyle = `
2121` ;
2222
2323const textStyle = `
24+ color: white;
2425` ;
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ const currentTempStyle = `
2323 font-size: 20px;
2424 width: 100px;
2525 qproperty-alignment: AlignCenter;
26+ color: white;
2627` ;
2728
2829const temperatureBoxStyle = `
@@ -40,5 +41,6 @@ const smallBox = `
4041
4142const smallInfo = `
4243 width: 150px;
44+ color: white;
4345 qproperty-alignment: AlignCenter;
4446` ;
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import {
1313 QApplication ,
1414 QPushButtonEvents
1515} from "@nodegui/nodegui" ;
16+ import os from 'os' ;
1617import { getCurrentWeather } from "./utils/weather" ;
1718import { WeatherIcon } from "./components/WeatherIcon" ;
1819import { TemperatureBox } from "./components/TemperatureBox" ;
@@ -83,6 +84,10 @@ const App = () => {
8384} ;
8485
8586const stylesheet = `
87+ #win {
88+ background-color: black;
89+ color: white;
90+ }
8691 #container {
8792 height: '100%';
8893 }
@@ -113,9 +118,11 @@ const buttonBox = `
113118const initWindow = ( win : QMainWindow ) => {
114119 win . hide ( ) ; //https://forum.qt.io/topic/60642/framelesswindowhint-fails-at-runtime-on-mainwindow
115120 win . resize ( 300 , 300 ) ;
116- win . setAttribute ( WidgetAttribute . WA_NoSystemBackground , true ) ;
117- win . setAttribute ( WidgetAttribute . WA_TranslucentBackground , true ) ;
118- win . setWindowFlag ( WindowType . FramelessWindowHint , true ) ;
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);
125+ }
119126 win . show ( ) ;
120127} ;
121128
You can’t perform that action at this time.
0 commit comments