From f7eaf6260624120718d66493b7ddaae41ec18812 Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Mon, 30 Dec 2019 17:07:43 +0200 Subject: [PATCH] - changes in the Preferences UI for NCC and Paint Tool in Tool Dia entry field --- README.md | 1 + flatcamGUI/GUIElements.py | 5 ++++- flatcamGUI/PreferencesUI.py | 6 ++++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 878a96ee..413d5d68 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ CAD program, and create G-Code for Isolation routing. - in Transform Tool adjusted the GUI - fixed some decimals issues in NCC Tool, Paint Tool and Excellon Editor (they were still using the harcoded values) - some small updates in the NCC Tool +- changes in the Preferences UI for NCC and Paint Tool in Tool Dia entry field 29.12.2019 diff --git a/flatcamGUI/GUIElements.py b/flatcamGUI/GUIElements.py index f0d7df81..eeab3efe 100644 --- a/flatcamGUI/GUIElements.py +++ b/flatcamGUI/GUIElements.py @@ -367,12 +367,15 @@ class IntEntry(QtWidgets.QLineEdit): class FCEntry(QtWidgets.QLineEdit): - def __init__(self, decimals=None, alignment=None, parent=None): + def __init__(self, decimals=None, alignment=None, border_color=None, parent=None): super(FCEntry, self).__init__(parent) self.readyToEdit = True self.editingFinished.connect(self.on_edit_finished) self.decimals = decimals if decimals is not None else 4 + if border_color: + self.setStyleSheet("QLineEdit {border: 1px solid %s;}" % border_color) + if alignment: if alignment == 'center': align_val = QtCore.Qt.AlignHCenter diff --git a/flatcamGUI/PreferencesUI.py b/flatcamGUI/PreferencesUI.py index 2ec568bd..b0803044 100644 --- a/flatcamGUI/PreferencesUI.py +++ b/flatcamGUI/PreferencesUI.py @@ -5034,7 +5034,8 @@ class ToolsNCCPrefGroupUI(OptionsGroupUI): "Valid values: 0.3, 1.0") ) grid0.addWidget(ncctdlabel, 0, 0) - self.ncc_tool_dia_entry = FCEntry() + self.ncc_tool_dia_entry = FCEntry(border_color='#0069A9') + self.ncc_tool_dia_entry.setPlaceholderText(_("Comma separated values")) grid0.addWidget(self.ncc_tool_dia_entry, 0, 1) # Tool Type Radio Button @@ -5545,7 +5546,8 @@ class ToolsPaintPrefGroupUI(OptionsGroupUI): ) grid0.addWidget(ptdlabel, 0, 0) - self.painttooldia_entry = FCEntry() + self.painttooldia_entry = FCEntry(border_color='#0069A9') + self.painttooldia_entry.setPlaceholderText(_("Comma separated values")) grid0.addWidget(self.painttooldia_entry, 0, 1)