Просмотр исходного кода

- solved the issue with the GUI in the Notebook being expanded too much in width due of the FCDoubleSpinner and FCSpinner sizeHint by setting the sizePolicy to Ignored value

Marius Stanciu 5 лет назад
Родитель
Сommit
29ce53b577
2 измененных файлов с 5 добавлено и 0 удалено
  1. 1 0
      CHANGELOG.md
  2. 4 0
      flatcamGUI/GUIElements.py

+ 1 - 0
CHANGELOG.md

@@ -11,6 +11,7 @@ CHANGELOG for FlatCAM beta
 
 
 - added new FlatCAM Tool: Corner Markers Tool which will add line markers in the selected corners of the bounding box of the targeted Gerber object
 - added new FlatCAM Tool: Corner Markers Tool which will add line markers in the selected corners of the bounding box of the targeted Gerber object
 - added a menu entry in Menu -> View for Toggle HUD
 - added a menu entry in Menu -> View for Toggle HUD
+- solved the issue with the GUI in the Notebook being expanded too much in width due of the FCDoubleSpinner and FCSpinner sizeHint by setting the sizePolicy to Ignored value
 
 
 16.05.2020
 16.05.2020
 
 

+ 4 - 0
flatcamGUI/GUIElements.py

@@ -684,6 +684,8 @@ class FCSpinner(QtWidgets.QSpinBox):
             self.setAlignment(align_val)
             self.setAlignment(align_val)
 
 
         self.prev_readyToEdit = True
         self.prev_readyToEdit = True
+        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Ignored, QtWidgets.QSizePolicy.Preferred)
+        self.setSizePolicy(sizePolicy)
 
 
     def eventFilter(self, object, event):
     def eventFilter(self, object, event):
         if event.type() == QtCore.QEvent.MouseButtonPress and self.prev_readyToEdit is True:
         if event.type() == QtCore.QEvent.MouseButtonPress and self.prev_readyToEdit is True:
@@ -816,6 +818,8 @@ class FCDoubleSpinner(QtWidgets.QDoubleSpinBox):
             self.setAlignment(align_val)
             self.setAlignment(align_val)
 
 
         self.prev_readyToEdit = True
         self.prev_readyToEdit = True
+        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Ignored, QtWidgets.QSizePolicy.Preferred)
+        self.setSizePolicy(sizePolicy)
 
 
     def on_edit_finished(self):
     def on_edit_finished(self):
         self.clearFocus()
         self.clearFocus()