- moved some graphical classes out of Tool Shell to GUIElements.py where they belong

- when selecting an object on canvas by single click, it's name is displayed in status bar. When nothing is selected a blank message (nothing) it's displayed
- in Move Tool I've added the type of object that was moved in the status bar message
- color coded the status bar bullet to blue for selection
- the name of the selected objects are displayed in the status bar color coded: green for Gerber objects, Brown for Excellon, Red for Geometry and Blue for CNCJobs.
This commit is contained in:
Marius Stanciu
2019-02-07 22:37:51 +02:00
committed by Marius S
parent c888303146
commit 5b75d416ec
7 changed files with 245 additions and 166 deletions

View File

@@ -4016,9 +4016,11 @@ class FlatCAMInfoBar(QtWidgets.QWidget):
layout.addStretch()
def set_text_(self, text):
def set_text_(self, text, color=None):
self.text.setText(text)
self.text.setToolTip(text)
if color:
self.text.setStyleSheet('color: %s' % str(color))
def set_status(self, text, level="info"):
level = str(level)
@@ -4029,9 +4031,11 @@ class FlatCAMInfoBar(QtWidgets.QWidget):
self.pmap = QtGui.QPixmap('share/greenlight12.png')
elif level == "WARNING" or level == "WARNING_NOTCL":
self.pmap = QtGui.QPixmap('share/yellowlight12.png')
elif level == "selected" or level == "SELECTED":
self.pmap = QtGui.QPixmap('share/bluelight12.png')
else:
self.pmap = QtGui.QPixmap('share/graylight12.png')
self.icon.setPixmap(self.pmap)
self.set_text_(text)
self.icon.setPixmap(self.pmap)
# end of file