@@ -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
0 commit comments