- created a new custom layout based on the Grid Layout where I can set the horizontal and vertical spacings between grid items and used it throughout the app

This commit is contained in:
Marius Stanciu
2021-08-07 11:46:45 +03:00
committed by Marius
parent 3c06280d3d
commit 461aa763ad
88 changed files with 325 additions and 281 deletions

View File

@@ -10,7 +10,7 @@ from PyQt6 import QtWidgets, QtCore, QtGui
from appTool import AppTool
from appGUI.GUIElements import FCCheckBox, FCDoubleSpinner, RadioSet, FCTable, FCButton, FCComboBox2, \
FCComboBox, OptionalInputSection, FCSpinner, NumericalEvalTupleEntry, OptionalHideInputSection, FCLabel, \
VerticalScrollArea
VerticalScrollArea, FCGridLayout
from appParsers.ParseExcellon import Excellon
from camlib import grace
@@ -3571,7 +3571,7 @@ class MillingUI:
self.title_box.addWidget(self.level)
# Grid Layout
grid0 = QtWidgets.QGridLayout()
grid0 = FCGridLayout(v_spacing=3)
grid0.setColumnStretch(0, 0)
grid0.setColumnStretch(1, 1)
self.tools_box.addLayout(grid0)
@@ -3706,7 +3706,7 @@ class MillingUI:
self.add_tool_frame = QtWidgets.QFrame()
self.add_tool_frame.setContentsMargins(0, 0, 0, 0)
grid0.addWidget(self.add_tool_frame, 14, 0, 1, 2)
grid_tool = QtWidgets.QGridLayout()
grid_tool = FCGridLayout(v_spacing=3)
grid_tool.setColumnStretch(0, 0)
grid_tool.setColumnStretch(1, 1)
grid_tool.setContentsMargins(0, 0, 0, 0)
@@ -3731,7 +3731,7 @@ class MillingUI:
# #############################################################################################################
# ################################ Button Grid ###########################################################
# #############################################################################################################
button_grid = QtWidgets.QGridLayout()
button_grid = FCGridLayout(v_spacing=3)
button_grid.setColumnStretch(0, 1)
button_grid.setColumnStretch(1, 0)
grid_tool.addLayout(button_grid, 5, 0, 1, 2)
@@ -3802,7 +3802,7 @@ class MillingUI:
# ################# GRID LAYOUT 3 ###############################
# #################################################################
self.grid1 = QtWidgets.QGridLayout()
self.grid1 = FCGridLayout(v_spacing=3)
self.grid1.setColumnStretch(0, 0)
self.grid1.setColumnStretch(1, 1)
self.exc_tools_box.addLayout(self.grid1)
@@ -4230,7 +4230,7 @@ class MillingUI:
# #################################################################
# ################# COMMON PARAMETERS #############################
self.grid3 = QtWidgets.QGridLayout()
self.grid3 = FCGridLayout(v_spacing=3)
self.grid3.setColumnStretch(0, 0)
self.grid3.setColumnStretch(1, 1)
self.exc_tools_box.addLayout(self.grid3)
@@ -4426,7 +4426,7 @@ class MillingUI:
self.exclusion_table.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectionBehavior.SelectRows)
grid_a1 = QtWidgets.QGridLayout()
grid_a1 = FCGridLayout(v_spacing=3)
grid_a1.setColumnStretch(0, 0)
grid_a1.setColumnStretch(1, 1)
self.exclusion_box.addLayout(grid_a1)
@@ -4497,7 +4497,7 @@ class MillingUI:
# #################################################################
# ################# GRID LAYOUT 6 ###############################
# #################################################################
self.grid4 = QtWidgets.QGridLayout()
self.grid4 = FCGridLayout(v_spacing=3)
self.grid4.setColumnStretch(0, 0)
self.grid4.setColumnStretch(1, 1)
self.tools_box.addLayout(self.grid4)