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 = `
19
19
flex: 1;
20
20
font-size: 20px;
21
21
qproperty-alignment: 'AlignCenter';
22
+ color: white;
22
23
` ;
23
24
24
25
const dateStyle = `
25
26
flex: 1;
26
27
font-size: 12px;
27
28
qproperty-alignment: 'AlignCenter';
29
+ color: white;
28
30
` ;
29
31
30
32
const containerStyle = `
Original file line number Diff line number Diff line change @@ -21,4 +21,5 @@ const containerStyle = `
21
21
` ;
22
22
23
23
const textStyle = `
24
+ color: white;
24
25
` ;
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ const currentTempStyle = `
23
23
font-size: 20px;
24
24
width: 100px;
25
25
qproperty-alignment: AlignCenter;
26
+ color: white;
26
27
` ;
27
28
28
29
const temperatureBoxStyle = `
@@ -40,5 +41,6 @@ const smallBox = `
40
41
41
42
const smallInfo = `
42
43
width: 150px;
44
+ color: white;
43
45
qproperty-alignment: AlignCenter;
44
46
` ;
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import {
13
13
QApplication ,
14
14
QPushButtonEvents
15
15
} from "@nodegui/nodegui" ;
16
+ import os from 'os' ;
16
17
import { getCurrentWeather } from "./utils/weather" ;
17
18
import { WeatherIcon } from "./components/WeatherIcon" ;
18
19
import { TemperatureBox } from "./components/TemperatureBox" ;
@@ -83,6 +84,10 @@ const App = () => {
83
84
} ;
84
85
85
86
const stylesheet = `
87
+ #win {
88
+ background-color: black;
89
+ color: white;
90
+ }
86
91
#container {
87
92
height: '100%';
88
93
}
@@ -113,9 +118,11 @@ const buttonBox = `
113
118
const initWindow = ( win : QMainWindow ) => {
114
119
win . hide ( ) ; //https://forum.qt.io/topic/60642/framelesswindowhint-fails-at-runtime-on-mainwindow
115
120
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
+ }
119
126
win . show ( ) ;
120
127
} ;
121
128
You can’t perform that action at this time.
0 commit comments