Dark mode on satellites

This commit is contained in:
2021-10-22 10:48:13 -04:00
parent b28817c0c6
commit a0157664cc
3 changed files with 29 additions and 2 deletions

View File

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
################################################################################
## Form generated from reading UI file 'mainwindow.ui'
## Form generated from reading UI file ''
##
## Created by: Qt User Interface Compiler version 5.15.2
##
@ -129,6 +129,12 @@ class Ui_MainWindow(object):
self.viewSatellites = QGraphicsView(self.centralwidget)
self.viewSatellites.setObjectName(u"viewSatellites")
self.viewSatellites.setGeometry(QRect(450, 10, 280, 280))
brush = QBrush(QColor(0, 0, 0, 255))
brush.setStyle(Qt.NoBrush)
self.viewSatellites.setBackgroundBrush(brush)
brush1 = QBrush(QColor(255, 255, 255, 255))
brush1.setStyle(Qt.NoBrush)
self.viewSatellites.setForegroundBrush(brush1)
self.label_14 = QLabel(self.centralwidget)
self.label_14.setObjectName(u"label_14")
self.label_14.setGeometry(QRect(10, 10, 221, 16))

View File

@ -112,6 +112,7 @@ class QtGPSWindow(MainWindow):
self.yellow = QColor(255,211,0)
self.green = QColor(0,255,0)
self.blue = QColor(0,0,255)
self.white = QColor(255,255,255)
self.scene = QtWidgets.QGraphicsScene()
self.viewSatellites.setScene(self.scene)
@ -155,7 +156,8 @@ class QtGPSWindow(MainWindow):
satellites = getattr(report, 'satellites')
txt = "%4s %4s %4s %3s %1s" % ('PRN', 'Azim', 'Elev', 'SNR', 'Used')
self.txtSatellites.setTextColor(self.black)
self.txtSatellites.setStyleSheet("background-color: rgb(0, 0, 0)")
self.txtSatellites.setTextColor(self.white)
self.txtSatellites.setFontWeight(QFont.Bold)
self.txtSatellites.setText(txt)
@ -226,6 +228,7 @@ class QtGPSWindow(MainWindow):
polar.set_theta_zero_location('N', offset=0)
canvas = FigureCanvas(figure)
self.scene.clear()
self.scene.addWidget(canvas)
h = float(self.scene.height()) / 2.0
w = float(self.scene.width()) / 2.0

View File

@ -442,6 +442,24 @@
<height>280</height>
</rect>
</property>
<property name="backgroundBrush">
<brush brushstyle="NoBrush">
<color alpha="255">
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</property>
<property name="foregroundBrush">
<brush brushstyle="NoBrush">
<color alpha="255">
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</property>
</widget>
<widget class="QLabel" name="label_14">
<property name="geometry">