mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-11-18 17:24:04 +01:00
working qt6 gui dark mode
This commit is contained in:
1 parent
6f874b7907
commit
d6338010a9
16 files changed
+251
-918
No files matched your search
@@ -53,9 +53,9 @@
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>150</green>
|
||||
<blue>110</blue>
|
||||
<red>60</red>
|
||||
<green>200</green>
|
||||
<blue>150</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
@@ -64,9 +64,9 @@
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>150</green>
|
||||
<blue>110</blue>
|
||||
<red>60</red>
|
||||
<green>200</green>
|
||||
<blue>150</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
@@ -75,9 +75,9 @@
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>139</red>
|
||||
<green>142</green>
|
||||
<blue>142</blue>
|
||||
<red>125</red>
|
||||
<green>125</green>
|
||||
<blue>125</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
@@ -119,8 +119,8 @@
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>255</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
<green>95</green>
|
||||
<blue>95</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
@@ -130,8 +130,8 @@
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>255</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
<green>95</green>
|
||||
<blue>95</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
@@ -140,9 +140,9 @@
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>139</red>
|
||||
<green>142</green>
|
||||
<blue>142</blue>
|
||||
<red>125</red>
|
||||
<green>125</green>
|
||||
<blue>125</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
|
||||
@@ -19,124 +19,6 @@
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="palette">
|
||||
<palette>
|
||||
<active>
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Text">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="ButtonText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Shadow">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</active>
|
||||
<inactive>
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Text">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="ButtonText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Shadow">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</inactive>
|
||||
<disabled>
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>185</red>
|
||||
<green>185</green>
|
||||
<blue>185</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Text">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>185</red>
|
||||
<green>185</green>
|
||||
<blue>185</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="ButtonText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>185</red>
|
||||
<green>185</green>
|
||||
<blue>185</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Shadow">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>89</red>
|
||||
<green>89</green>
|
||||
<blue>89</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</disabled>
|
||||
</palette>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Cantarell</family>
|
||||
@@ -193,178 +75,6 @@
|
||||
<layout class="QGridLayout" name="layoutTabs">
|
||||
<item row="0" column="0">
|
||||
<widget class="QTabWidget" name="tabs">
|
||||
<property name="palette">
|
||||
<palette>
|
||||
<active>
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Button">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
<blue>255</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Text">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="ButtonText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Base">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
<blue>255</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Window">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
<blue>255</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</active>
|
||||
<inactive>
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Button">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
<blue>255</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Text">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="ButtonText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Base">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
<blue>255</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Window">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
<blue>255</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</inactive>
|
||||
<disabled>
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>185</red>
|
||||
<green>185</green>
|
||||
<blue>185</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Button">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
<blue>255</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Text">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>185</red>
|
||||
<green>185</green>
|
||||
<blue>185</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="ButtonText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>185</red>
|
||||
<green>185</green>
|
||||
<blue>185</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Base">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
<blue>255</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Window">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
<blue>255</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</disabled>
|
||||
</palette>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Cantarell</family>
|
||||
@@ -374,9 +84,6 @@
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgb(255, 255, 255);</string>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
@@ -857,43 +564,6 @@
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="palette">
|
||||
<palette>
|
||||
<active>
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</active>
|
||||
<inactive>
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</inactive>
|
||||
<disabled>
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>119</red>
|
||||
<green>119</green>
|
||||
<blue>119</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</disabled>
|
||||
</palette>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Cantarell</family>
|
||||
|
||||
@@ -52,8 +52,8 @@
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<red>110</red>
|
||||
<green>160</green>
|
||||
<blue>255</blue>
|
||||
</color>
|
||||
</brush>
|
||||
@@ -63,8 +63,8 @@
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<red>110</red>
|
||||
<green>160</green>
|
||||
<blue>255</blue>
|
||||
</color>
|
||||
</brush>
|
||||
@@ -74,9 +74,9 @@
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>139</red>
|
||||
<green>142</green>
|
||||
<blue>142</blue>
|
||||
<red>125</red>
|
||||
<green>125</green>
|
||||
<blue>125</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
@@ -416,9 +416,9 @@
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>150</green>
|
||||
<blue>110</blue>
|
||||
<red>60</red>
|
||||
<green>200</green>
|
||||
<blue>150</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
@@ -427,9 +427,9 @@
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>150</green>
|
||||
<blue>110</blue>
|
||||
<red>60</red>
|
||||
<green>200</green>
|
||||
<blue>150</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
@@ -438,9 +438,9 @@
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>139</red>
|
||||
<green>142</green>
|
||||
<blue>142</blue>
|
||||
<red>125</red>
|
||||
<green>125</green>
|
||||
<blue>125</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
@@ -491,8 +491,8 @@
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>255</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
<green>95</green>
|
||||
<blue>95</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
@@ -502,8 +502,8 @@
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>255</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
<green>95</green>
|
||||
<blue>95</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
@@ -512,9 +512,9 @@
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>139</red>
|
||||
<green>142</green>
|
||||
<blue>142</blue>
|
||||
<red>125</red>
|
||||
<green>125</green>
|
||||
<blue>125</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
|
||||
@@ -98,43 +98,6 @@
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="palette">
|
||||
<palette>
|
||||
<active>
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>2</red>
|
||||
<green>2</green>
|
||||
<blue>2</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</active>
|
||||
<inactive>
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</inactive>
|
||||
<disabled>
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>119</red>
|
||||
<green>119</green>
|
||||
<blue>119</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</disabled>
|
||||
</palette>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Cantarell</family>
|
||||
@@ -195,43 +158,6 @@
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="palette">
|
||||
<palette>
|
||||
<active>
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>2</red>
|
||||
<green>2</green>
|
||||
<blue>2</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</active>
|
||||
<inactive>
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</inactive>
|
||||
<disabled>
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>119</red>
|
||||
<green>119</green>
|
||||
<blue>119</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</disabled>
|
||||
</palette>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Cantarell</family>
|
||||
@@ -301,43 +227,6 @@
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="palette">
|
||||
<palette>
|
||||
<active>
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>2</red>
|
||||
<green>2</green>
|
||||
<blue>2</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</active>
|
||||
<inactive>
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</inactive>
|
||||
<disabled>
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>119</red>
|
||||
<green>119</green>
|
||||
<blue>119</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</disabled>
|
||||
</palette>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Cantarell</family>
|
||||
|
||||
@@ -474,9 +474,9 @@
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>204</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
<red>255</red>
|
||||
<green>95</green>
|
||||
<blue>95</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
@@ -485,9 +485,9 @@
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>204</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
<red>255</red>
|
||||
<green>95</green>
|
||||
<blue>95</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
@@ -496,9 +496,9 @@
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>190</red>
|
||||
<green>190</green>
|
||||
<blue>190</blue>
|
||||
<red>125</red>
|
||||
<green>125</green>
|
||||
<blue>125</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
@@ -544,9 +544,9 @@
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>78</red>
|
||||
<green>154</green>
|
||||
<blue>6</blue>
|
||||
<red>130</red>
|
||||
<green>200</green>
|
||||
<blue>70</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
@@ -555,9 +555,9 @@
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>78</red>
|
||||
<green>154</green>
|
||||
<blue>6</blue>
|
||||
<red>130</red>
|
||||
<green>200</green>
|
||||
<blue>70</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
@@ -566,9 +566,9 @@
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>190</red>
|
||||
<green>190</green>
|
||||
<blue>190</blue>
|
||||
<red>125</red>
|
||||
<green>125</green>
|
||||
<blue>125</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
@@ -701,9 +701,9 @@
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>204</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
<red>255</red>
|
||||
<green>95</green>
|
||||
<blue>95</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
@@ -712,9 +712,9 @@
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>204</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
<red>255</red>
|
||||
<green>95</green>
|
||||
<blue>95</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
@@ -723,9 +723,9 @@
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>190</red>
|
||||
<green>190</green>
|
||||
<blue>190</blue>
|
||||
<red>125</red>
|
||||
<green>125</green>
|
||||
<blue>125</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
@@ -771,9 +771,9 @@
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>78</red>
|
||||
<green>154</green>
|
||||
<blue>6</blue>
|
||||
<red>130</red>
|
||||
<green>200</green>
|
||||
<blue>70</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
@@ -782,9 +782,9 @@
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>78</red>
|
||||
<green>154</green>
|
||||
<blue>6</blue>
|
||||
<red>130</red>
|
||||
<green>200</green>
|
||||
<blue>70</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
@@ -793,9 +793,9 @@
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>190</red>
|
||||
<green>190</green>
|
||||
<blue>190</blue>
|
||||
<red>125</red>
|
||||
<green>125</green>
|
||||
<blue>125</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
|
||||
@@ -1075,70 +1075,6 @@
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="palette">
|
||||
<palette>
|
||||
<active>
|
||||
<colorrole role="ButtonText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>11</red>
|
||||
<green>11</green>
|
||||
<blue>11</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Shadow">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>20</red>
|
||||
<green>20</green>
|
||||
<blue>20</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</active>
|
||||
<inactive>
|
||||
<colorrole role="ButtonText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>11</red>
|
||||
<green>11</green>
|
||||
<blue>11</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Shadow">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>20</red>
|
||||
<green>20</green>
|
||||
<blue>20</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</inactive>
|
||||
<disabled>
|
||||
<colorrole role="ButtonText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>119</red>
|
||||
<green>119</green>
|
||||
<blue>119</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Shadow">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>20</red>
|
||||
<green>20</green>
|
||||
<blue>20</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</disabled>
|
||||
</palette>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Cantarell</family>
|
||||
@@ -1183,70 +1119,6 @@
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="palette">
|
||||
<palette>
|
||||
<active>
|
||||
<colorrole role="ButtonText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>11</red>
|
||||
<green>11</green>
|
||||
<blue>11</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Shadow">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>20</red>
|
||||
<green>20</green>
|
||||
<blue>20</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</active>
|
||||
<inactive>
|
||||
<colorrole role="ButtonText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>11</red>
|
||||
<green>11</green>
|
||||
<blue>11</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Shadow">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>20</red>
|
||||
<green>20</green>
|
||||
<blue>20</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</inactive>
|
||||
<disabled>
|
||||
<colorrole role="ButtonText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>119</red>
|
||||
<green>119</green>
|
||||
<blue>119</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Shadow">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>20</red>
|
||||
<green>20</green>
|
||||
<blue>20</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</disabled>
|
||||
</palette>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Cantarell</family>
|
||||
@@ -1757,43 +1629,6 @@
|
||||
<height>35</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="palette">
|
||||
<palette>
|
||||
<active>
|
||||
<colorrole role="Shadow">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>20</red>
|
||||
<green>20</green>
|
||||
<blue>20</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</active>
|
||||
<inactive>
|
||||
<colorrole role="Shadow">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>20</red>
|
||||
<green>20</green>
|
||||
<blue>20</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</inactive>
|
||||
<disabled>
|
||||
<colorrole role="Shadow">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>20</red>
|
||||
<green>20</green>
|
||||
<blue>20</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</disabled>
|
||||
</palette>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Cantarell</family>
|
||||
@@ -1879,43 +1714,6 @@
|
||||
<height>35</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="palette">
|
||||
<palette>
|
||||
<active>
|
||||
<colorrole role="Shadow">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>20</red>
|
||||
<green>20</green>
|
||||
<blue>20</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</active>
|
||||
<inactive>
|
||||
<colorrole role="Shadow">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>20</red>
|
||||
<green>20</green>
|
||||
<blue>20</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</inactive>
|
||||
<disabled>
|
||||
<colorrole role="Shadow">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>20</red>
|
||||
<green>20</green>
|
||||
<blue>20</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</disabled>
|
||||
</palette>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Cantarell</family>
|
||||
@@ -2500,43 +2298,6 @@ Displays minimum, maximum and sum of values for each plot.
|
||||
<height>35</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="palette">
|
||||
<palette>
|
||||
<active>
|
||||
<colorrole role="Shadow">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>20</red>
|
||||
<green>20</green>
|
||||
<blue>20</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</active>
|
||||
<inactive>
|
||||
<colorrole role="Shadow">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>20</red>
|
||||
<green>20</green>
|
||||
<blue>20</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</inactive>
|
||||
<disabled>
|
||||
<colorrole role="Shadow">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>20</red>
|
||||
<green>20</green>
|
||||
<blue>20</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</disabled>
|
||||
</palette>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Cantarell</family>
|
||||
@@ -2622,43 +2383,6 @@ Displays minimum, maximum and sum of values for each plot.
|
||||
<height>35</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="palette">
|
||||
<palette>
|
||||
<active>
|
||||
<colorrole role="Shadow">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>20</red>
|
||||
<green>20</green>
|
||||
<blue>20</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</active>
|
||||
<inactive>
|
||||
<colorrole role="Shadow">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>20</red>
|
||||
<green>20</green>
|
||||
<blue>20</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</inactive>
|
||||
<disabled>
|
||||
<colorrole role="Shadow">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>20</red>
|
||||
<green>20</green>
|
||||
<blue>20</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</disabled>
|
||||
</palette>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Cantarell</family>
|
||||
@@ -3056,43 +2780,6 @@ Displays statistics, ie. minimum, maximum and sum of values for each plot.
|
||||
<height>35</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="palette">
|
||||
<palette>
|
||||
<active>
|
||||
<colorrole role="Shadow">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>20</red>
|
||||
<green>20</green>
|
||||
<blue>20</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</active>
|
||||
<inactive>
|
||||
<colorrole role="Shadow">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>20</red>
|
||||
<green>20</green>
|
||||
<blue>20</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</inactive>
|
||||
<disabled>
|
||||
<colorrole role="Shadow">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>20</red>
|
||||
<green>20</green>
|
||||
<blue>20</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</disabled>
|
||||
</palette>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Cantarell</family>
|
||||
@@ -3153,43 +2840,6 @@ Displays statistics, ie. minimum, maximum and sum of values for each plot.
|
||||
<height>35</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="palette">
|
||||
<palette>
|
||||
<active>
|
||||
<colorrole role="Shadow">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>20</red>
|
||||
<green>20</green>
|
||||
<blue>20</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</active>
|
||||
<inactive>
|
||||
<colorrole role="Shadow">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>20</red>
|
||||
<green>20</green>
|
||||
<blue>20</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</inactive>
|
||||
<disabled>
|
||||
<colorrole role="Shadow">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>20</red>
|
||||
<green>20</green>
|
||||
<blue>20</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</disabled>
|
||||
</palette>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Cantarell</family>
|
||||
|
||||
@@ -582,43 +582,6 @@
|
||||
<height>35</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="palette">
|
||||
<palette>
|
||||
<active>
|
||||
<colorrole role="Shadow">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>20</red>
|
||||
<green>20</green>
|
||||
<blue>20</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</active>
|
||||
<inactive>
|
||||
<colorrole role="Shadow">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>20</red>
|
||||
<green>20</green>
|
||||
<blue>20</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</inactive>
|
||||
<disabled>
|
||||
<colorrole role="Shadow">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>20</red>
|
||||
<green>20</green>
|
||||
<blue>20</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</disabled>
|
||||
</palette>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Cantarell</family>
|
||||
|
||||
@@ -28,6 +28,7 @@ class qTabMessages : public QWidget, private Ui::TabMessagesObject {
|
||||
void SetupWidgetWindow();
|
||||
void Initialization();
|
||||
void PrintNextLine();
|
||||
QString CommandFontTag() const;
|
||||
void GetLastCommand();
|
||||
void ClearCommand();
|
||||
void AppendOutput();
|
||||
|
||||
@@ -105,7 +105,8 @@ class SlsQtFastImage : public QWidget {
|
||||
QFont axisTitleFont() const;
|
||||
|
||||
signals:
|
||||
/** The user zoomed or panned, or the widget was resized */
|
||||
/** The user zoomed or panned, or a resize changed what is visible. A
|
||||
* resize is reported from the event loop, not from within the resize. */
|
||||
void visibleAreaChanged(const QRectF &area);
|
||||
/** Palette, log scale or colour range changed */
|
||||
void colorMapChanged();
|
||||
@@ -189,6 +190,7 @@ class SlsQtFastImage : public QWidget {
|
||||
|
||||
QRectF m_viewport; // (x, y) is the lower left corner
|
||||
bool m_fillPlot = true; // show more than m_viewport to fill the plot area
|
||||
bool m_resizeReportPending = false;
|
||||
QRectF m_axisRange; // null: pixel index
|
||||
bool m_zoomEnabled = true;
|
||||
bool m_axesVisible = true;
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include <QColor>
|
||||
#include <QFont>
|
||||
#include <QPalette>
|
||||
#include <QRect>
|
||||
#include <QRgb>
|
||||
#include <QSize>
|
||||
@@ -94,5 +95,11 @@ struct PlotTheme {
|
||||
// subtracted. Never smaller than 10x10 so a tiny widget still paints.
|
||||
QRect plotRectFor(const QSize &widgetSize, const PlotTheme &theme);
|
||||
|
||||
// Widget palette of the gui, made from the colours of PlotTheme so that the
|
||||
// tabs, docks and dialogs around the plots are as dark as the plots. Text
|
||||
// entry fields get the plot background, the windows are a little lighter.
|
||||
// QPalette::Link is the accent colour, for text that has to stand out.
|
||||
QPalette darkPalette();
|
||||
|
||||
} // namespace plot
|
||||
} // namespace sls
|
||||
@@ -44,7 +44,7 @@ QString formatValue(double v, int digits) {
|
||||
SlsQtFastImage::SlsQtFastImage(QWidget *parent) : QWidget(parent) {
|
||||
setMouseTracking(true);
|
||||
setFocusPolicy(Qt::StrongFocus);
|
||||
setMinimumSize(200, 200);
|
||||
setMinimumSize(50, 50); // the gain plot of the gui is small
|
||||
setAttribute(Qt::WA_OpaquePaintEvent, true);
|
||||
|
||||
m_titleFont = font();
|
||||
@@ -711,9 +711,22 @@ bool SlsQtFastImage::event(QEvent *e) {
|
||||
return QWidget::event(e);
|
||||
}
|
||||
|
||||
// A layout resizes the widget from within other calls, for example when a
|
||||
// neighbour is shown. Whoever made that call does not expect a signal in the
|
||||
// middle of it (qDrawPlot holds a mutex there that its slot takes as well), so
|
||||
// the new visible area is reported from the event loop.
|
||||
void SlsQtFastImage::resizeEvent(QResizeEvent *) {
|
||||
if (hasImage())
|
||||
emit visibleAreaChanged(visibleArea());
|
||||
if (!hasImage() || !m_fillPlot || m_resizeReportPending)
|
||||
return;
|
||||
m_resizeReportPending = true;
|
||||
QMetaObject::invokeMethod(
|
||||
this,
|
||||
[this] {
|
||||
m_resizeReportPending = false;
|
||||
if (hasImage())
|
||||
emit visibleAreaChanged(visibleArea());
|
||||
},
|
||||
Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
} // namespace sls
|
||||
@@ -496,5 +496,42 @@ QRect plotRectFor(const QSize &widgetSize, const PlotTheme &theme) {
|
||||
return QRect(x0, y0, x1 - x0, y1 - y0);
|
||||
}
|
||||
|
||||
QPalette darkPalette() {
|
||||
const PlotTheme theme;
|
||||
const QColor window(45, 45, 45);
|
||||
const QColor button(60, 60, 60);
|
||||
const QColor disabledText(125, 125, 125);
|
||||
const QColor accent(110, 160, 255);
|
||||
|
||||
QPalette p;
|
||||
p.setColor(QPalette::Window, window);
|
||||
p.setColor(QPalette::WindowText, theme.text);
|
||||
p.setColor(QPalette::Base, theme.background);
|
||||
p.setColor(QPalette::AlternateBase, QColor(38, 38, 38));
|
||||
p.setColor(QPalette::Text, theme.text);
|
||||
p.setColor(QPalette::PlaceholderText, disabledText);
|
||||
p.setColor(QPalette::Button, button);
|
||||
p.setColor(QPalette::ButtonText, theme.text);
|
||||
p.setColor(QPalette::BrightText, Qt::white);
|
||||
p.setColor(QPalette::ToolTipBase, button);
|
||||
p.setColor(QPalette::ToolTipText, theme.text);
|
||||
p.setColor(QPalette::Light, QColor(85, 85, 85));
|
||||
p.setColor(QPalette::Midlight, QColor(70, 70, 70));
|
||||
p.setColor(QPalette::Mid, QColor(38, 38, 38));
|
||||
p.setColor(QPalette::Dark, QColor(24, 24, 24));
|
||||
p.setColor(QPalette::Shadow, QColor(12, 12, 12));
|
||||
p.setColor(QPalette::Highlight, QColor(50, 100, 180));
|
||||
p.setColor(QPalette::HighlightedText, Qt::white);
|
||||
p.setColor(QPalette::Link, accent);
|
||||
p.setColor(QPalette::LinkVisited, QColor(180, 150, 255));
|
||||
|
||||
for (auto role : {QPalette::WindowText, QPalette::Text,
|
||||
QPalette::ButtonText, QPalette::HighlightedText})
|
||||
p.setColor(QPalette::Disabled, role, disabledText);
|
||||
p.setColor(QPalette::Disabled, QPalette::Base, window);
|
||||
p.setColor(QPalette::Disabled, QPalette::Highlight, QColor(75, 75, 75));
|
||||
return p;
|
||||
}
|
||||
|
||||
} // namespace plot
|
||||
} // namespace sls
|
||||
@@ -12,6 +12,8 @@
|
||||
#include "qTabPlot.h"
|
||||
#include "qTabSettings.h"
|
||||
|
||||
#include "SlsQtPlotCommon.h"
|
||||
|
||||
#include "sls/ToString.h"
|
||||
#include "sls/versionAPI.h"
|
||||
|
||||
@@ -23,6 +25,7 @@
|
||||
#include <QScrollArea>
|
||||
#include <QSizePolicy>
|
||||
#include <QStyleFactory>
|
||||
#include <QToolTip>
|
||||
|
||||
#include "sls/Version.h"
|
||||
#include <getopt.h>
|
||||
@@ -111,6 +114,11 @@ int main(int argc, char **argv) {
|
||||
if (QStyleFactory::keys().contains("Fusion", Qt::CaseInsensitive)) {
|
||||
app.setStyle(QStyleFactory::create("Fusion"));
|
||||
}
|
||||
// The plots are dark, and so is everything around them. Tool tips take
|
||||
// their palette from the platform, they have to be told separately.
|
||||
const QPalette darkPalette = sls::plot::darkPalette();
|
||||
app.setPalette(darkPalette);
|
||||
QToolTip::setPalette(darkPalette);
|
||||
try {
|
||||
sls::qDetectorMain det(multiId, fname, isDeveloper);
|
||||
det.show();
|
||||
@@ -186,8 +194,8 @@ void qDetectorMain::SetUpWidgetWindow() {
|
||||
|
||||
tabs->setCurrentIndex(MEASUREMENT);
|
||||
defaultTabColor = tabs->tabBar()->tabTextColor(DATAOUTPUT);
|
||||
// set current tab to blue
|
||||
tabs->tabBar()->setTabTextColor(0, QColor(0, 0, 200, 255));
|
||||
// highlight the current tab
|
||||
tabs->tabBar()->setTabTextColor(0, palette().color(QPalette::Link));
|
||||
tabs->setTabEnabled(DEBUGGING, false);
|
||||
tabs->setTabEnabled(ADVANCED, false);
|
||||
tabs->setTabEnabled(DEVELOPER, isDeveloper);
|
||||
@@ -520,7 +528,7 @@ void qDetectorMain::Refresh(int index) {
|
||||
}
|
||||
for (int i = 0; i < NumberOfTabs; ++i)
|
||||
tabs->tabBar()->setTabTextColor(i, defaultTabColor);
|
||||
tabs->tabBar()->setTabTextColor(index, QColor(0, 0, 200, 255));
|
||||
tabs->tabBar()->setTabTextColor(index, palette().color(QPalette::Link));
|
||||
}
|
||||
|
||||
void qDetectorMain::ResizeMainWindow(bool b) {
|
||||
@@ -612,8 +620,10 @@ void qDetectorMain::SetPlotSettingsDetached(bool detached) {
|
||||
void qDetectorMain::SetZoomToolTip(bool disable) {
|
||||
if (disable)
|
||||
dockWidgetPlot->setToolTip(
|
||||
"<span style=\" color:#00007f;\">To Enable mouse-controlled "
|
||||
"zooming capabilities,\ndisable min and max for all axes.<span> ");
|
||||
QString("<span style=\" color:%1;\">To Enable mouse-controlled "
|
||||
"zooming capabilities,\ndisable min and max for all "
|
||||
"axes.<span> ")
|
||||
.arg(palette().color(QPalette::Link).name()));
|
||||
else
|
||||
dockWidgetPlot->setToolTip(zoomToolTip);
|
||||
}
|
||||
|
||||
@@ -23,13 +23,14 @@ void qTabMeasurement::SetupWidgetWindow() {
|
||||
setFont(QFont("Carlito", 9, QFont::Normal));
|
||||
// palette
|
||||
red = QPalette();
|
||||
red.setColor(QPalette::Active, QPalette::WindowText, Qt::red);
|
||||
red.setColor(QPalette::Active, QPalette::WindowText,
|
||||
QColor(255, 95, 95)); // readable on the dark window
|
||||
acqPeriodTip = spinPeriod->toolTip();
|
||||
errPeriodTip =
|
||||
QString("<nobr>Frame period between exposures.</nobr><br>"
|
||||
"<nobr> #period#</nobr><br><br>") +
|
||||
QString(
|
||||
"<nobr><font color=\"red\"><b>Acquisition Period</b> should be"
|
||||
"<nobr><font color=\"#ff5f5f\"><b>Acquisition Period</b> should be"
|
||||
" greater than or equal to <b>Exposure Time</b>.</font></nobr>");
|
||||
|
||||
// timer to update the progress bar
|
||||
|
||||
@@ -60,6 +60,11 @@ void qTabMessages::PrintNextLine() {
|
||||
QString("</font>"));
|
||||
}
|
||||
|
||||
QString qTabMessages::CommandFontTag() const {
|
||||
return QString("<font color = \"%1\">")
|
||||
.arg(palette().color(QPalette::Link).name());
|
||||
}
|
||||
|
||||
void qTabMessages::GetLastCommand() {
|
||||
dispCommand->setText(lastCommand.join(" "));
|
||||
}
|
||||
@@ -73,8 +78,8 @@ void qTabMessages::ExecuteCommand() {
|
||||
dispCommand->clear();
|
||||
// appending command to log without newline
|
||||
dispLog->moveCursor(QTextCursor::End);
|
||||
dispLog->insertHtml(QString("<font color = \"DarkBlue\">") +
|
||||
param.join(" ") + QString("</font>"));
|
||||
dispLog->insertHtml(CommandFontTag() + param.join(" ") +
|
||||
QString("</font>"));
|
||||
|
||||
QString command = param.at(0);
|
||||
param.removeFirst();
|
||||
@@ -94,8 +99,7 @@ void qTabMessages::ExecuteCommand() {
|
||||
void qTabMessages::AppendOutput() {
|
||||
QByteArray result = process->readAll();
|
||||
result.replace("\n", "<br>");
|
||||
dispLog->append(QString("<font color = \"DarkBlue\">") + result +
|
||||
QString("</font>"));
|
||||
dispLog->append(CommandFontTag() + result + QString("</font>"));
|
||||
LOG(logDEBUG) << "Command executed successfully";
|
||||
PrintNextLine();
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <QComboBox>
|
||||
#include <QCoreApplication>
|
||||
#include <QElapsedTimer>
|
||||
#include <QHBoxLayout>
|
||||
#include <QHash>
|
||||
#include <QImage>
|
||||
#include <QLabel>
|
||||
@@ -229,6 +230,8 @@ class PlottingTest : public QObject {
|
||||
void imageReadout();
|
||||
void imageAxisValues();
|
||||
|
||||
void darkPaletteGoesWithThePlots();
|
||||
|
||||
void scaleHistoDrag();
|
||||
void scaleHistoLogAxis();
|
||||
void scalePanel();
|
||||
@@ -243,6 +246,7 @@ class PlottingTest : public QObject {
|
||||
void plot2dLogZ();
|
||||
void plot2dContours();
|
||||
void plot2dRoiAndZoom();
|
||||
void plot2dResizeIsReportedLater();
|
||||
void plot2dGain();
|
||||
|
||||
void performance1024x512();
|
||||
@@ -1588,6 +1592,88 @@ void PlottingTest::plot2dRoiAndZoom() {
|
||||
QVERIFY(view->zoomEnabled());
|
||||
}
|
||||
|
||||
// qDrawPlot shows the gain plot next to the data plot while it holds a mutex,
|
||||
// and its slot for PlotZoomedSignal takes the same mutex. Showing a widget
|
||||
// resizes its neighbours on the spot, so the plot may not report its new
|
||||
// visible area from within that resize.
|
||||
void PlottingTest::plot2dResizeIsReportedLater() {
|
||||
QWidget window;
|
||||
auto *plot = new sls::SlsQt2DPlot(&window);
|
||||
auto *gain = new sls::SlsQt2DPlot(&window, true);
|
||||
gain->setFixedSize(180, 120);
|
||||
gain->hide();
|
||||
auto *layout = new QHBoxLayout(&window);
|
||||
layout->addWidget(plot);
|
||||
layout->addWidget(gain);
|
||||
window.resize(900, 600);
|
||||
window.show();
|
||||
for (int i = 0; i < 3; i++) // the visible area now depends on the size
|
||||
sendWheel(*plot->imageView(), QPointF(300.0, 250.0), 120);
|
||||
const QSize before = plot->size();
|
||||
const QRectF areaBefore = plot->imageView()->visibleArea();
|
||||
|
||||
bool showing = false;
|
||||
int reportedWhileShowing = 0;
|
||||
QSignalSpy spy(plot, &sls::SlsQt2DPlot::PlotZoomedSignal);
|
||||
connect(plot, &sls::SlsQt2DPlot::PlotZoomedSignal, &window, [&] {
|
||||
if (showing)
|
||||
reportedWhileShowing++;
|
||||
});
|
||||
showing = true;
|
||||
gain->show();
|
||||
showing = false;
|
||||
QVERIFY(plot->width() < before.width()); // resized inside show()
|
||||
QVERIFY(plot->imageView()->visibleArea() != areaBefore);
|
||||
QCOMPARE(reportedWhileShowing, 0);
|
||||
|
||||
// but once that is over, for the gain plot to follow
|
||||
QCoreApplication::processEvents();
|
||||
QCOMPARE(spy.count(), 1);
|
||||
|
||||
// the gain plot is small, all of it has to be visible
|
||||
QVERIFY(gain->rect().contains(gain->imageView()->geometry()));
|
||||
if (!qEnvironmentVariableIsEmpty("PLOTTING_TEST_IMAGES"))
|
||||
window.grab().save(qEnvironmentVariable("PLOTTING_TEST_IMAGES") +
|
||||
QStringLiteral("/gain-next-to-data.png"));
|
||||
}
|
||||
|
||||
// The widgets around the plots use the plot colours, and every text colour is
|
||||
// readable on the background it is drawn on.
|
||||
void PlottingTest::darkPaletteGoesWithThePlots() {
|
||||
const sls::plot::PlotTheme theme;
|
||||
const QPalette p = sls::plot::darkPalette();
|
||||
QCOMPARE(p.color(QPalette::Base), theme.background);
|
||||
QCOMPARE(p.color(QPalette::Text), theme.text);
|
||||
QCOMPARE(p.color(QPalette::WindowText), theme.text);
|
||||
|
||||
auto luminance = [](const QColor &c) {
|
||||
auto lin = [](double v) {
|
||||
return v <= 0.03928 ? v / 12.92
|
||||
: std::pow((v + 0.055) / 1.055, 2.4);
|
||||
};
|
||||
return 0.2126 * lin(c.redF()) + 0.7152 * lin(c.greenF()) +
|
||||
0.0722 * lin(c.blueF());
|
||||
};
|
||||
auto contrast = [&](QPalette::ColorRole fg, QPalette::ColorRole bg) {
|
||||
const double a = luminance(p.color(fg));
|
||||
const double b = luminance(p.color(bg));
|
||||
return (std::max(a, b) + 0.05) / (std::min(a, b) + 0.05);
|
||||
};
|
||||
QVERIFY(contrast(QPalette::WindowText, QPalette::Window) > 7.0);
|
||||
QVERIFY(contrast(QPalette::Text, QPalette::Base) > 7.0);
|
||||
QVERIFY(contrast(QPalette::ButtonText, QPalette::Button) > 7.0);
|
||||
QVERIFY(contrast(QPalette::ToolTipText, QPalette::ToolTipBase) > 7.0);
|
||||
QVERIFY(contrast(QPalette::Link, QPalette::Window) > 4.5);
|
||||
QVERIFY(contrast(QPalette::Link, QPalette::Base) > 4.5);
|
||||
QVERIFY(contrast(QPalette::HighlightedText, QPalette::Highlight) > 4.5);
|
||||
|
||||
// disabled text is dimmer, but still there
|
||||
QVERIFY(p.color(QPalette::Disabled, QPalette::WindowText) !=
|
||||
p.color(QPalette::Active, QPalette::WindowText));
|
||||
QVERIFY(luminance(p.color(QPalette::Disabled, QPalette::WindowText)) >
|
||||
2.0 * luminance(p.color(QPalette::Window)));
|
||||
}
|
||||
|
||||
void PlottingTest::plot2dGain() {
|
||||
sls::SlsQt2DPlot gain(nullptr, true);
|
||||
gain.resize(200, 200);
|
||||
|
||||
Reference in new issue
Block a user