gui: Add global QT Style Sheet
- Gray out the objects if they are disabled
This commit is contained in:
parent
de80aedafc
commit
6b250aa1fd
|
@ -12,6 +12,7 @@ from pglive.sources.live_plot import LiveLinePlot
|
||||||
from pglive.sources.live_plot_widget import LivePlotWidget
|
from pglive.sources.live_plot_widget import LivePlotWidget
|
||||||
from pglive.sources.live_axis import LiveAxis
|
from pglive.sources.live_axis import LiveAxis
|
||||||
import sys
|
import sys
|
||||||
|
import os
|
||||||
import argparse
|
import argparse
|
||||||
import logging
|
import logging
|
||||||
import asyncio
|
import asyncio
|
||||||
|
@ -371,6 +372,11 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
|
||||||
self.kirdy = Kirdy()
|
self.kirdy = Kirdy()
|
||||||
self.setupUi(self)
|
self.setupUi(self)
|
||||||
|
|
||||||
|
# Load Global QT Style Sheet Settings
|
||||||
|
qss=os.path.join(os.path.dirname(__file__), "ui/mainwindow.qss")
|
||||||
|
with open(qss,"r") as fh:
|
||||||
|
self.setStyleSheet(fh.read())
|
||||||
|
|
||||||
self.ip_addr = self.DEFAULT_IP_ADDR
|
self.ip_addr = self.DEFAULT_IP_ADDR
|
||||||
self.port = self.DEFAULT_PORT
|
self.port = self.DEFAULT_PORT
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
QPushButton:disabled { color: gray }
|
||||||
|
ParameterTree:disabled { color: gray }
|
||||||
|
QToolButton:disabled { color: gray }
|
||||||
|
QDoubleSpinBox:disabled { color: gray }
|
||||||
|
QCheckBox:disabled { color: gray }
|
||||||
|
QMenu:disabled { color: gray }
|
Loading…
Reference in New Issue