Skip to content

Commit 3108885

Browse files
committed
Merge branch '2.9'
2 parents fbee829 + 5bd26b5 commit 3108885

6 files changed

Lines changed: 42 additions & 13 deletions

File tree

lib/python/qtvcp/widgets/status_label.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def _f(data):
159159
elif self.halpin:
160160
STATUS.connect('periodic', lambda w: self._set_halpin_text())
161161
else:
162-
LOG.warning('{} : no option recognised'.format(self.HAL_NAME_))
162+
LOG.debug('{} : no option recognised'.format(self.HAL_NAME_))
163163

164164
def _set_text(self, data):
165165
tmpl = lambda s: str(self._textTemplate) % s

share/qtvcp/screens/qtdragon/brushed_metal_color.qss

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ SystemToolButton,
1313
OffsetToolButton,
1414
AxisToolButton,
1515
QToolButton {
16-
background: qlineargradient(spread:reflect, x1:0.5, y:0, x2:0.5, y2:1.6, stop:0 rgba(180, 180, 180, 225), stop:0.6 rgba(130, 130, 130, 180));
16+
background: qlineargradient(spread:reflect, x1:0.5, y:0, x2:0.5, y2:1.6, stop:0 rgba(180, 180, 180, 225), stop:0.6 rgba(130, 130, 130, 225));
1717
border: 2px solid black;
1818
border-radius: 4px;
1919
font: 10pt "Lato Heavy";
@@ -38,10 +38,12 @@ AxisToolButton:hover {
3838

3939
QPushButton:disabled,
4040
ActionButton:disabled,
41-
AxisToolButton:disabled {
42-
color: #c8c8c8;
41+
AxisToolButton:disabled,
42+
QToolButton:disabled {
43+
color: #cacaca;
4344
}
4445

46+
4547
ActionButton#action_machine_on {
4648
color: #FF0000;
4749
}
@@ -79,7 +81,8 @@ ActionButton#action_machine_on[isStateOn=true] {
7981

8082
ActionButton#action_estop {
8183
color: #00FF00;
82-
background: rgb(255, 80, 80,160);
84+
background: qlineargradient(spread:reflect, x1:0.5, y:0, x2:0.5, y2:1, stop:0 rgba(255, 120, 120,150), stop:0.6 rgba(255, 20, 20,150));
85+
8386
}
8487

8588

@@ -239,7 +242,7 @@ QProgressBar {
239242
background-color: rgb(250, 250, 250);
240243
border: 1px solid black;
241244
border-radius: 4px;
242-
font: 9 pt "Lato Heavy";
245+
font: 10pt "Lato Heavy";
243246
}
244247

245248
QProgressBar::chunk {
@@ -396,3 +399,4 @@ OriginOffsetView {
396399
}
397400

398401

402+

share/qtvcp/screens/qtdragon/qtdragon_handler.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ def __init__(self, halcomp, widgets, paths):
9797
"btn_home_z", "action_home_a", "btn_reload_file", "macrobutton0", "macrobutton1",
9898
"macrobutton2", "macrobutton3", "macrobutton4", "macrobutton5", "macrobutton6",
9999
"macrobutton7", "macrobutton8", "macrobutton9"]
100+
self.statusbar_reset_time = 10000 # ten seconds
100101

101102
STATUS.connect('general', self.dialog_return)
102103
STATUS.connect('state-on', lambda w: self.enable_onoff(True))
@@ -1139,13 +1140,20 @@ def forward(self):
11391140
def writer(self):
11401141
WRITER.show()
11411142

1143+
def endcolor(self):
1144+
self.timer = QtCore.QTimer()
1145+
self.timer.timeout.connect(self.set_style_default)
1146+
self.timer.start(self.statusbar_reset_time)
1147+
11421148
# change Status bar text color
11431149
def set_style_default(self):
11441150
self.w.lineEdit_statusbar.setStyleSheet("background-color: rgb(252, 252, 252);color: rgb(0,0,0)") #default white
11451151
def set_style_warning(self):
1146-
self.w.lineEdit_statusbar.setStyleSheet("background-color: rgb(242, 246, 103);color: rgb(0,0,0)") #yelow
1152+
self.w.lineEdit_statusbar.setStyleSheet("background-color: rgb(242, 246, 103);color: rgb(0,0,0)") #yellow
1153+
self.endcolor()
11471154
def set_style_critical(self):
11481155
self.w.lineEdit_statusbar.setStyleSheet("background-color: rgb(255, 144, 0);color: rgb(0,0,0)") #orange
1156+
self.endcolor()
11491157

11501158
def adjust_stacked_widgets(self,requestedIndex):
11511159
IGNORE = -1

share/qtvcp/screens/qtdragon_hd/brushed_metal_color.qss

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ SystemToolButton,
1313
OffsetToolButton,
1414
AxisToolButton,
1515
QToolButton {
16-
background: qlineargradient(spread:reflect, x1:0.5, y:0, x2:0.5, y2:1.6, stop:0 rgba(180, 180, 180, 225), stop:0.6 rgba(130, 130, 130, 180));
16+
background: qlineargradient(spread:reflect, x1:0.5, y:0, x2:0.5, y2:1.6, stop:0 rgba(180, 180, 180, 225), stop:0.6 rgba(130, 130, 130, 225));
1717
border: 2px solid black;
1818
border-radius: 4px;
1919
font: 10pt "Lato Heavy";
@@ -38,10 +38,12 @@ AxisToolButton:hover {
3838

3939
QPushButton:disabled,
4040
ActionButton:disabled,
41-
AxisToolButton:disabled {
42-
color: #c8c8c8;
41+
AxisToolButton:disabled,
42+
QToolButton:disabled {
43+
color: #cacaca;
4344
}
4445

46+
4547
ActionButton#action_machine_on {
4648
color: #FF0000;
4749
}
@@ -79,7 +81,8 @@ ActionButton#action_machine_on[isStateOn=true] {
7981

8082
ActionButton#action_estop {
8183
color: #00FF00;
82-
background: rgb(255, 80, 80,160);
84+
background: qlineargradient(spread:reflect, x1:0.5, y:0, x2:0.5, y2:1, stop:0 rgba(255, 120, 120,150), stop:0.6 rgba(255, 20, 20,150));
85+
8386
}
8487

8588

@@ -239,7 +242,7 @@ QProgressBar {
239242
background-color: rgb(250, 250, 250);
240243
border: 1px solid black;
241244
border-radius: 4px;
242-
font: 9 pt "Lato Heavy";
245+
font: 10pt "Lato Heavy";
243246
}
244247

245248
QProgressBar::chunk {
@@ -396,3 +399,4 @@ OriginOffsetView {
396399
}
397400

398401

402+

share/qtvcp/screens/qtdragon_hd/qtdragon_hd_handler.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ def __init__(self, halcomp, widgets, paths):
9898
self.axis_a_list = ["label_axis_a", "dro_axis_a", "action_zero_a", "axistoolbutton_a",
9999
"dro_button_stack_a", "widget_jog_angular", "widget_increments_angular",
100100
"a_plus_jogbutton", "a_minus_jogbutton"]
101+
self.statusbar_reset_time = 10000 # ten seconds
101102

102103
STATUS.connect('general', self.dialog_return)
103104
STATUS.connect('state-on', lambda w: self.enable_onoff(True))
@@ -1197,16 +1198,23 @@ def forward(self):
11971198
def writer(self):
11981199
WRITER.show()
11991200

1201+
def endcolor(self):
1202+
self.timer = QtCore.QTimer()
1203+
self.timer.timeout.connect(self.set_style_default)
1204+
self.timer.start(self.statusbar_reset_time)
1205+
12001206
# change Status bar text color
12011207
def set_style_default(self):
12021208
self.w.statusbar.setStyleSheet(
12031209
"background-color: rgb(252, 252, 252);color: rgb(0,0,0)") #default white
12041210
def set_style_warning(self):
12051211
self.w.statusbar.setStyleSheet(
1206-
"background-color: rgb(242, 246, 103);color: rgb(0,0,0)") #yelow
1212+
"background-color: rgb(242, 246, 103);color: rgb(0,0,0)") #yellow
1213+
self.endcolor()
12071214
def set_style_critical(self):
12081215
self.w.statusbar.setStyleSheet(
12091216
"background-color: rgb(255, 144, 0);color: rgb(0,0,0)") #orange
1217+
self.endcolor()
12101218

12111219
def adjust_stacked_widgets(self,requestedIndex):
12121220
IGNORE = -1

src/hal/utils/scope_vert.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,6 +1094,11 @@ void channel_changed(void)
10941094
gtk_adjustment_set_lower(adj, chan->min_index);
10951095
gtk_adjustment_set_upper(adj, chan->max_index);
10961096
gtk_adjustment_set_value(adj, chan->scale_index);
1097+
1098+
// Call the `scale_changed()` callback once by hand to initialize
1099+
// the new channel's scale/gain.
1100+
scale_changed(adj, NULL);
1101+
10971102
/* update the channel number and name display */
10981103
snprintf(buf1, BUFLEN, "%2d", vert->selected);
10991104
name = chan->name;

0 commit comments

Comments
 (0)