- added icon in status bar for HUD; clicking on it will toggle the HUD (heads up display)
This commit is contained in:
parent
49eb883cb1
commit
da81fb89b8
|
@ -1519,6 +1519,11 @@ class MainGUI(QtWidgets.QMainWindow):
|
|||
self.snap_toolbar.setMaximumHeight(24)
|
||||
self.infobar.addWidget(self.snap_toolbar)
|
||||
|
||||
self.hud_label = FCLabel("H")
|
||||
self.hud_label.setToolTip(_("HUD (Heads up display)"))
|
||||
self.hud_label.setMargin(2)
|
||||
self.infobar.addWidget(self.hud_label)
|
||||
|
||||
self.wplace_label = FCLabel("A4")
|
||||
self.wplace_label.setMargin(2)
|
||||
self.infobar.addWidget(self.wplace_label)
|
||||
|
@ -1642,6 +1647,7 @@ class MainGUI(QtWidgets.QMainWindow):
|
|||
self.clear_btn.clicked.connect(self.on_gui_clear)
|
||||
|
||||
self.wplace_label.clicked.connect(self.app.on_workspace_toggle)
|
||||
self.hud_label.clicked.connect(self.app.on_toggle_hud)
|
||||
|
||||
# to be used in the future
|
||||
# self.plot_tab_area.tab_attached.connect(lambda x: print(x))
|
||||
|
|
|
@ -208,12 +208,20 @@ class PlotCanvas(QtCore.QObject, VisPyCanvas):
|
|||
self.text_hud.parent = self.view
|
||||
|
||||
self.fcapp.defaults['global_hud'] = True
|
||||
self.fcapp.ui.hud_label.setStyleSheet("""
|
||||
QLabel
|
||||
{
|
||||
color: black;
|
||||
background-color: lightblue;
|
||||
}
|
||||
""")
|
||||
else:
|
||||
self.hud_enabled = False
|
||||
self.rect_hud.parent = None
|
||||
self.text_hud.parent = None
|
||||
|
||||
self.fcapp.defaults['global_hud'] = False
|
||||
self.fcapp.ui.hud_label.setStyleSheet("")
|
||||
|
||||
def draw_workspace(self, workspace_size):
|
||||
"""
|
||||
|
|
|
@ -324,11 +324,19 @@ class PlotCanvasLegacy(QtCore.QObject):
|
|||
self.text_hud.add_artist()
|
||||
|
||||
self.app.defaults['global_hud'] = True
|
||||
self.fcapp.ui.hud_label.setStyleSheet("""
|
||||
QLabel
|
||||
{
|
||||
color: black;
|
||||
background-color: lightblue;
|
||||
}
|
||||
""")
|
||||
else:
|
||||
self.hud_enabled = False
|
||||
self.text_hud.remove_artist()
|
||||
|
||||
self.app.defaults['global_hud'] = False
|
||||
self.fcapp.ui.hud_label.setStyleSheet("")
|
||||
|
||||
self.canvas.draw()
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@ CHANGELOG for FlatCAM beta
|
|||
- working on a new Tool: Etch Compensation Tool -> installed the tool and created the GUI and class template
|
||||
- moved more methods out of App_Main class
|
||||
- added confirmation messages for toggle of HUD, Grid, Grid Snap, Axis
|
||||
- added icon in status bar for HUD; clicking on it will toggle the HUD (heads up display)
|
||||
|
||||
17.05.2020
|
||||
|
||||
|
|
Loading…
Reference in New Issue