Assembly: Fix help text height in CreateBom
This commit is contained in:
@@ -357,6 +357,7 @@ class TaskAssemblyCreateBom(QtCore.QObject):
|
||||
help_dialog.setWindowFlags(QtCore.Qt.Popup)
|
||||
help_dialog.setWindowModality(QtCore.Qt.NonModal)
|
||||
help_dialog.setAttribute(QtCore.Qt.WA_DeleteOnClose)
|
||||
help_dialog.setFixedWidth(500)
|
||||
|
||||
layout = QtWidgets.QVBoxLayout()
|
||||
layout.setContentsMargins(10, 10, 10, 10)
|
||||
@@ -413,9 +414,14 @@ class TaskAssemblyCreateBom(QtCore.QObject):
|
||||
+ "\n"
|
||||
)
|
||||
|
||||
options_text.setWordWrap(True)
|
||||
columns_text.setWordWrap(True)
|
||||
export_text.setWordWrap(True)
|
||||
layout_width = (
|
||||
help_dialog.contentsRect().width()
|
||||
- layout.contentsMargins().left()
|
||||
- layout.contentsMargins().right()
|
||||
)
|
||||
for label in (options_text, columns_text, export_text):
|
||||
label.setWordWrap(True)
|
||||
label.setFixedWidth(layout_width)
|
||||
|
||||
layout.addWidget(options_title)
|
||||
layout.addWidget(options_text)
|
||||
@@ -425,7 +431,6 @@ class TaskAssemblyCreateBom(QtCore.QObject):
|
||||
layout.addWidget(export_text)
|
||||
|
||||
help_dialog.setLayout(layout)
|
||||
help_dialog.setFixedWidth(500)
|
||||
|
||||
help_dialog.show()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user