Skip to content
Snippets Groups Projects
Commit 33c2bcda authored by Kien Le's avatar Kien Le
Browse files

Merge branch 'enhancement-make_content_fit_in_database_editor' into 'develop'

Make texts in database editor fit in cell

See merge request !309
parents a1f4dab8 363e7247
No related branches found
No related tags found
1 merge request!309Make texts in database editor fit in cell
Pipeline #3939 passed with stage
in 10 minutes and 18 seconds
...@@ -220,7 +220,7 @@ class UiDBInfoDialog(OneWindowAtATimeDialog): ...@@ -220,7 +220,7 @@ class UiDBInfoDialog(OneWindowAtATimeDialog):
self.setup_ui() self.setup_ui()
def setup_ui(self): def setup_ui(self):
self.setGeometry(100, 100, 900, 900) self.setGeometry(100, 100, 1100, 700)
main_layout = QtWidgets.QVBoxLayout() main_layout = QtWidgets.QVBoxLayout()
self.setLayout(main_layout) self.setLayout(main_layout)
...@@ -439,6 +439,9 @@ class UiDBInfoDialog(OneWindowAtATimeDialog): ...@@ -439,6 +439,9 @@ class UiDBInfoDialog(OneWindowAtATimeDialog):
) )
self.data_table_widget.verticalHeader().hide() self.data_table_widget.verticalHeader().hide()
self.data_table_widget.setColumnCount(self.total_col) self.data_table_widget.setColumnCount(self.total_col)
print(self.total_col, len(self.column_headers))
# Make the two last columns have an empty header.
self.column_headers.extend(['', ''])
self.data_table_widget.setHorizontalHeaderLabels(self.column_headers) self.data_table_widget.setHorizontalHeaderLabels(self.column_headers)
header = self.data_table_widget.horizontalHeader() header = self.data_table_widget.horizontalHeader()
header.setSectionResizeMode(QtWidgets.QHeaderView.ResizeMode.Stretch) header.setSectionResizeMode(QtWidgets.QHeaderView.ResizeMode.Stretch)
......
...@@ -37,7 +37,7 @@ class ParamDialog(UiDBInfoDialog): ...@@ -37,7 +37,7 @@ class ParamDialog(UiDBInfoDialog):
parent, parent,
['No.', 'Param', 'Plot Type', 'ValueColors', 'Height '], ['No.', 'Param', 'Plot Type', 'ValueColors', 'Height '],
'param', 'parameters', 'param', 'parameters',
resize_content_columns=[0, 3]) resize_content_columns=[0, 2, 3, 4])
value_colors_column = 'valueColors' + self.color_mode value_colors_column = 'valueColors' + self.color_mode
self.insert_sql_template = (f"INSERT INTO Parameters " self.insert_sql_template = (f"INSERT INTO Parameters "
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment