diff --git a/FlatCAMApp.py b/FlatCAMApp.py index 2b2f0b61..1025f6f1 100644 --- a/FlatCAMApp.py +++ b/FlatCAMApp.py @@ -3196,6 +3196,7 @@ class App(QtCore.QObject): self.ui.newexc_btn.triggered.connect(self.new_excellon_object) self.ui.editgeo_btn.triggered.connect(self.object2editor) self.ui.update_obj_btn.triggered.connect(lambda: self.editor2object()) + self.ui.copy_btn.triggered.connect(self.on_copy_object) self.ui.delete_btn.triggered.connect(self.on_delete) self.ui.distance_btn.triggered.connect(lambda: self.distance_tool.run(toggle=True)) diff --git a/FlatCAMObj.py b/FlatCAMObj.py index d1c6005e..000e500b 100644 --- a/FlatCAMObj.py +++ b/FlatCAMObj.py @@ -3519,21 +3519,21 @@ class FlatCAMGeometry(FlatCAMObj, Geometry): offset_item = QtWidgets.QComboBox() for item in self.offset_item_options: offset_item.addItem(item) - offset_item.setStyleSheet('background-color: rgb(255,255,255)') + # offset_item.setStyleSheet('background-color: rgb(255,255,255)') idx = offset_item.findText(tooluid_value['offset']) offset_item.setCurrentIndex(idx) type_item = QtWidgets.QComboBox() for item in self.type_item_options: type_item.addItem(item) - type_item.setStyleSheet('background-color: rgb(255,255,255)') + # type_item.setStyleSheet('background-color: rgb(255,255,255)') idx = type_item.findText(tooluid_value['type']) type_item.setCurrentIndex(idx) tool_type_item = QtWidgets.QComboBox() for item in self.tool_type_item_options: tool_type_item.addItem(item) - tool_type_item.setStyleSheet('background-color: rgb(255,255,255)') + # tool_type_item.setStyleSheet('background-color: rgb(255,255,255)') idx = tool_type_item.findText(tooluid_value['tool_type']) tool_type_item.setCurrentIndex(idx) diff --git a/README.md b/README.md index b8826d9b..a3e09167 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,9 @@ CAD program, and create G-Code for Isolation routing. - adjusted the layout in NCC Tool - fixed bug in Panelization Tool for which in case of Excellon objects, the panel kept a reference to the source object which created issues when moving or disabling/enabling the plots - cleaned up the module imports throughout the app (the TclCommands are not yet verified) +- removed the styling on the comboboxes cellWidget's in the Tool Tables +- replaced some of the icons that did not looked Ok on the dark theme +- added a new toolbar button for the Copy object functionality 14.10.2019 diff --git a/flatcamGUI/FlatCAMGUI.py b/flatcamGUI/FlatCAMGUI.py index ea44c147..9d86bf55 100644 --- a/flatcamGUI/FlatCAMGUI.py +++ b/flatcamGUI/FlatCAMGUI.py @@ -12,8 +12,10 @@ # ########################################################## from flatcamGUI.PreferencesUI import * +from flatcamEditors.FlatCAMGeoEditor import FCShapeTool from matplotlib.backend_bases import KeyEvent as mpl_key_event +import webbrowser from copy import deepcopy from datetime import datetime import gettext @@ -684,22 +686,23 @@ class FlatCAMGUI(QtWidgets.QMainWindow): self.file_open_excellon_btn = self.toolbarfile.addAction(QtGui.QIcon('share/drill32.png'), _("Open Excellon")) self.toolbarfile.addSeparator() self.file_open_btn = self.toolbarfile.addAction(QtGui.QIcon('share/folder32.png'), _("Open project")) - self.file_save_btn = self.toolbarfile.addAction(QtGui.QIcon('share/floppy32.png'), _("Save project")) + self.file_save_btn = self.toolbarfile.addAction(QtGui.QIcon('share/project_save32.png'), _("Save project")) # ######################################################################## # ########################## Edit Toolbar# ############################### # ######################################################################## - self.newgeo_btn = self.toolbargeo.addAction(QtGui.QIcon('share/new_geo32_bis.png'), _("New Blank Geometry")) - self.newgrb_btn = self.toolbargeo.addAction(QtGui.QIcon('share/new_geo32.png'), _("New Blank Gerber")) - self.newexc_btn = self.toolbargeo.addAction(QtGui.QIcon('share/new_exc32.png'), _("New Blank Excellon")) + self.newgeo_btn = self.toolbargeo.addAction(QtGui.QIcon('share/new_file_geo32.png'), _("New Blank Geometry")) + self.newgrb_btn = self.toolbargeo.addAction(QtGui.QIcon('share/new_file_grb32.png'), _("New Blank Gerber")) + self.newexc_btn = self.toolbargeo.addAction(QtGui.QIcon('share/new_file_exc32.png'), _("New Blank Excellon")) self.toolbargeo.addSeparator() - self.editgeo_btn = self.toolbargeo.addAction(QtGui.QIcon('share/edit32.png'), _("Editor")) + self.editgeo_btn = self.toolbargeo.addAction(QtGui.QIcon('share/edit_file32.png'), _("Editor")) self.update_obj_btn = self.toolbargeo.addAction( - QtGui.QIcon('share/edit_ok32_bis.png'), _("Save Object and close the Editor") + QtGui.QIcon('share/close_edit_file32.png'), _("Save Object and close the Editor") ) self.toolbargeo.addSeparator() - self.delete_btn = self.toolbargeo.addAction(QtGui.QIcon('share/cancel_edit32.png'), _("&Delete")) + self.copy_btn = self.toolbargeo.addAction(QtGui.QIcon('share/copy_file32.png'), _("Copy")) + self.delete_btn = self.toolbargeo.addAction(QtGui.QIcon('share/delete_file32.png'), _("&Delete")) self.toolbargeo.addSeparator() self.distance_btn = self.toolbargeo.addAction(QtGui.QIcon('share/distance32.png'), _("Distance Tool")) self.distance_min_btn = self.toolbargeo.addAction(QtGui.QIcon('share/distance_min32.png'), @@ -707,7 +710,6 @@ class FlatCAMGUI(QtWidgets.QMainWindow): self.origin_btn = self.toolbargeo.addAction(QtGui.QIcon('share/origin32.png'), _('Set Origin')) self.jmp_btn = self.toolbargeo.addAction(QtGui.QIcon('share/jump_to16.png'), _('Jump to Location')) - # ######################################################################## # ########################## View Toolbar# ############################### # ######################################################################## @@ -2108,19 +2110,21 @@ class FlatCAMGUI(QtWidgets.QMainWindow): self.file_open_excellon_btn = self.toolbarfile.addAction(QtGui.QIcon('share/drill32.png'), _("Open Excellon")) self.toolbarfile.addSeparator() self.file_open_btn = self.toolbarfile.addAction(QtGui.QIcon('share/folder32.png'), _("Open project")) - self.file_save_btn = self.toolbarfile.addAction(QtGui.QIcon('share/floppy32.png'), _("Save project")) + self.file_save_btn = self.toolbarfile.addAction(QtGui.QIcon('share/project_save32.png'), _("Save project")) # ## Edit Toolbar # ## - self.newgeo_btn = self.toolbargeo.addAction(QtGui.QIcon('share/new_geo32_bis.png'), _("New Blank Geometry")) - self.newexc_btn = self.toolbargeo.addAction(QtGui.QIcon('share/new_exc32.png'), _("New Blank Excellon")) + self.newgeo_btn = self.toolbargeo.addAction(QtGui.QIcon('share/new_file_geo32.png'), _("New Blank Geometry")) + self.newgrb_btn = self.toolbargeo.addAction(QtGui.QIcon('share/new_file_grb32.png'), _("New Blank Gerber")) + self.newexc_btn = self.toolbargeo.addAction(QtGui.QIcon('share/new_file_exc32.png'), _("New Blank Excellon")) self.toolbargeo.addSeparator() self.editgeo_btn = self.toolbargeo.addAction(QtGui.QIcon('share/edit32.png'), _("Editor")) self.update_obj_btn = self.toolbargeo.addAction( - QtGui.QIcon('share/edit_ok32_bis.png'), _("Save Object and close the Editor") + QtGui.QIcon('share/close_edit_file32.png'), _("Save Object and close the Editor") ) self.toolbargeo.addSeparator() - self.delete_btn = self.toolbargeo.addAction(QtGui.QIcon('share/cancel_edit32.png'), _("&Delete")) + self.copy_btn = self.toolbargeo.addAction(QtGui.QIcon('share/copy_file32.png'), _("Copy")) + self.delete_btn = self.toolbargeo.addAction(QtGui.QIcon('share/delete_file32.png'), _("&Delete")) self.toolbargeo.addSeparator() self.distance_btn = self.toolbargeo.addAction(QtGui.QIcon('share/distance32.png'), _("Distance Tool")) self.distance_min_btn = self.toolbargeo.addAction(QtGui.QIcon('share/distance_min32.png'), diff --git a/flatcamTools/ToolNonCopperClear.py b/flatcamTools/ToolNonCopperClear.py index 16817ab7..341f58e5 100644 --- a/flatcamTools/ToolNonCopperClear.py +++ b/flatcamTools/ToolNonCopperClear.py @@ -753,7 +753,7 @@ class NonCopperClear(FlatCAMTool, Gerber): tool_type_item = QtWidgets.QComboBox() for item in self.tool_type_item_options: tool_type_item.addItem(item) - tool_type_item.setStyleSheet('background-color: rgb(255,255,255)') + # tool_type_item.setStyleSheet('background-color: rgb(255,255,255)') idx = tool_type_item.findText(tooluid_value['tool_type']) tool_type_item.setCurrentIndex(idx) @@ -761,9 +761,9 @@ class NonCopperClear(FlatCAMTool, Gerber): operation_type = QtWidgets.QComboBox() operation_type.addItem('iso_op') - operation_type.setStyleSheet('background-color: rgb(255,255,255)') + # operation_type.setStyleSheet('background-color: rgb(255,255,255)') operation_type.addItem('clear_op') - operation_type.setStyleSheet('background-color: rgb(255,255,255)') + # operation_type.setStyleSheet('background-color: rgb(255,255,255)') op_idx = operation_type.findText(tooluid_value['operation']) operation_type.setCurrentIndex(op_idx) diff --git a/flatcamTools/ToolPaint.py b/flatcamTools/ToolPaint.py index cca0c827..07247783 100644 --- a/flatcamTools/ToolPaint.py +++ b/flatcamTools/ToolPaint.py @@ -675,7 +675,7 @@ class ToolPaint(FlatCAMTool, Gerber): tool_type_item = QtWidgets.QComboBox() for item in self.tool_type_item_options: tool_type_item.addItem(item) - tool_type_item.setStyleSheet('background-color: rgb(255,255,255)') + # tool_type_item.setStyleSheet('background-color: rgb(255,255,255)') idx = tool_type_item.findText(tooluid_value['tool_type']) tool_type_item.setCurrentIndex(idx) diff --git a/flatcamTools/ToolSolderPaste.py b/flatcamTools/ToolSolderPaste.py index 91ea734b..68dd3574 100644 --- a/flatcamTools/ToolSolderPaste.py +++ b/flatcamTools/ToolSolderPaste.py @@ -278,7 +278,7 @@ class SolderPaste(FlatCAMTool): ) self.pp_combo = FCComboBox() - self.pp_combo.setStyleSheet('background-color: rgb(255,255,255)') + # self.pp_combo.setStyleSheet('background-color: rgb(255,255,255)') self.gcode_form_layout.addRow(pp_label, self.pp_combo) # ## Buttons diff --git a/share/close_edit_file16.png b/share/close_edit_file16.png new file mode 100644 index 00000000..a3570981 Binary files /dev/null and b/share/close_edit_file16.png differ diff --git a/share/close_edit_file32.png b/share/close_edit_file32.png new file mode 100644 index 00000000..5fe11d58 Binary files /dev/null and b/share/close_edit_file32.png differ diff --git a/share/copy_file16.png b/share/copy_file16.png new file mode 100644 index 00000000..043ad45d Binary files /dev/null and b/share/copy_file16.png differ diff --git a/share/copy_file32.png b/share/copy_file32.png new file mode 100644 index 00000000..367dcf7a Binary files /dev/null and b/share/copy_file32.png differ diff --git a/share/delete_file16.png b/share/delete_file16.png new file mode 100644 index 00000000..bf25206f Binary files /dev/null and b/share/delete_file16.png differ diff --git a/share/delete_file32.png b/share/delete_file32.png new file mode 100644 index 00000000..a00f640f Binary files /dev/null and b/share/delete_file32.png differ diff --git a/share/edit_file16.png b/share/edit_file16.png new file mode 100644 index 00000000..e157e110 Binary files /dev/null and b/share/edit_file16.png differ diff --git a/share/edit_file32.png b/share/edit_file32.png new file mode 100644 index 00000000..7b696678 Binary files /dev/null and b/share/edit_file32.png differ diff --git a/share/new_file16.png b/share/new_file16.png new file mode 100644 index 00000000..e4e0353f Binary files /dev/null and b/share/new_file16.png differ diff --git a/share/new_file32.png b/share/new_file32.png new file mode 100644 index 00000000..761d747d Binary files /dev/null and b/share/new_file32.png differ diff --git a/share/new_file_exc16.png b/share/new_file_exc16.png new file mode 100644 index 00000000..1fd22439 Binary files /dev/null and b/share/new_file_exc16.png differ diff --git a/share/new_file_exc32.png b/share/new_file_exc32.png new file mode 100644 index 00000000..4e99f9d7 Binary files /dev/null and b/share/new_file_exc32.png differ diff --git a/share/new_file_geo16.png b/share/new_file_geo16.png new file mode 100644 index 00000000..c06ac06a Binary files /dev/null and b/share/new_file_geo16.png differ diff --git a/share/new_file_geo32.png b/share/new_file_geo32.png new file mode 100644 index 00000000..52daa00e Binary files /dev/null and b/share/new_file_geo32.png differ diff --git a/share/new_file_grb16.png b/share/new_file_grb16.png new file mode 100644 index 00000000..df7c6429 Binary files /dev/null and b/share/new_file_grb16.png differ diff --git a/share/new_file_grb32.png b/share/new_file_grb32.png new file mode 100644 index 00000000..0d214862 Binary files /dev/null and b/share/new_file_grb32.png differ diff --git a/share/project_save16.png b/share/project_save16.png new file mode 100644 index 00000000..df4e30a1 Binary files /dev/null and b/share/project_save16.png differ diff --git a/share/project_save32.png b/share/project_save32.png new file mode 100644 index 00000000..db1e03a1 Binary files /dev/null and b/share/project_save32.png differ