ソースを参照

- minor changes in the Properties Tool

Marius Stanciu 5 年 前
コミット
1b3919aca7
3 ファイル変更7 行追加9 行削除
  1. 1 0
      CHANGELOG.md
  2. 1 1
      appTool.py
  3. 5 8
      appTools/ToolProperties.py

+ 1 - 0
CHANGELOG.md

@@ -17,6 +17,7 @@ CHANGELOG for FlatCAM beta
 - some minor changes in the AppTextEditor.py file
 - removed Hungarian language since it's looking like is no longer being translated
 - added a default properties tab which will hold a set of information's about the application
+- minor changes in the Properties Tool
 
 22.10.2020
 

+ 1 - 1
appTool.py

@@ -90,7 +90,7 @@ class AppTool(QtWidgets.QWidget):
         # Remove anything else in the appGUI
         self.app.ui.tool_scroll_area.takeWidget()
 
-        # Put ourself in the appGUI
+        # Put ourselves in the appGUI
         self.app.ui.tool_scroll_area.setWidget(self)
 
         # Switch notebook to tool page

+ 5 - 8
appTools/ToolProperties.py

@@ -35,9 +35,10 @@ class Properties(AppTool):
     def __init__(self, app):
         AppTool.__init__(self, app)
 
-        self.setSizePolicy(QtWidgets.QSizePolicy.Ignored, QtWidgets.QSizePolicy.Ignored)
+        # self.setSizePolicy(QtWidgets.QSizePolicy.Ignored, QtWidgets.QSizePolicy.Ignored)
 
         self.decimals = self.app.decimals
+        self.layout.setContentsMargins(0, 0, 0, 0)
 
         # this way I can hide/show the frame
         self.properties_frame = QtWidgets.QFrame()
@@ -58,16 +59,12 @@ class Properties(AppTool):
         #                 """)
         # self.properties_box.addWidget(title_label)
 
-        # self.layout.setMargin(0)  # PyQt4
-        self.properties_box.setContentsMargins(0, 0, 0, 0)  # PyQt5
-        self.vlay = QtWidgets.QVBoxLayout()
-        self.properties_box.addLayout(self.vlay)
-
         self.treeWidget = FCTree(columns=2)
+        self.treeWidget.setSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
         self.treeWidget.setStyleSheet("QTreeWidget {border: 0px;}")
 
-        self.vlay.addWidget(self.treeWidget)
-        self.vlay.setStretch(0, 0)
+        self.properties_box.addWidget(self.treeWidget)
+        # self.properties_box.setStretch(0, 0)
 
         self.calculations_finished.connect(self.show_area_chull)