Skip to content

Commit ce90b8d

Browse files
committed
enh: improve cosmetics
1 parent 99cb497 commit ce90b8d

3 files changed

Lines changed: 20 additions & 6 deletions

File tree

dcoraid/gui/dbview/filter_base.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def __init__(self, *args, **kwargs):
3636
self.lineEdit.setVisible(False)
3737

3838
# Disable custom tool button
39-
self.toolButton_custom.setVisible(False)
39+
self.pushButton_custom.setVisible(False)
4040

4141
# default drag&drop behavior is "off"
4242
self.tableWidget.setDropIndicatorShown(False) # don't show indicator
@@ -101,6 +101,7 @@ def set_entry(self, row, entry):
101101
tbact.setToolTip(action["tooltip"])
102102
tbact.clicked.connect(action["function"])
103103
horz_layout.addWidget(tbact)
104+
horz_layout.setAlignment(QtCore.Qt.AlignmentFlag.AlignRight)
104105
self.tableWidget.setCellWidget(row, 1, widact)
105106
return widact
106107

dcoraid/gui/dbview/filter_base.ui

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<number>0</number>
3131
</property>
3232
<item>
33-
<layout class="QHBoxLayout" name="horizontalLayout_8">
33+
<layout class="QHBoxLayout" name="horizontalLayout_8" stretch="0,0,99,1,0">
3434
<item>
3535
<widget class="QLabel" name="label">
3636
<property name="text">
@@ -61,6 +61,19 @@
6161
</property>
6262
</widget>
6363
</item>
64+
<item>
65+
<spacer name="horizontalSpacer_3">
66+
<property name="orientation">
67+
<enum>Qt::Orientation::Horizontal</enum>
68+
</property>
69+
<property name="sizeHint" stdset="0">
70+
<size>
71+
<width>0</width>
72+
<height>20</height>
73+
</size>
74+
</property>
75+
</spacer>
76+
</item>
6477
<item>
6578
<widget class="QCheckBox" name="checkBox">
6679
<property name="text">
@@ -138,7 +151,7 @@
138151
</spacer>
139152
</item>
140153
<item>
141-
<widget class="QToolButton" name="toolButton_custom">
154+
<widget class="QPushButton" name="pushButton_custom">
142155
<property name="text">
143156
<string>Custom tool</string>
144157
</property>

dcoraid/gui/dbview/filter_chain.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,10 @@ def __init__(self, *args, **kwargs):
135135
super(FilterChainUser, self).__init__(*args, **kwargs)
136136

137137
# Enable the "add to collection tool box"
138-
self.fw_datasets.toolButton_custom.setText(
138+
self.fw_datasets.pushButton_custom.setText(
139139
"Add selected datasets to a collection...")
140-
self.fw_datasets.toolButton_custom.setVisible(True)
141-
self.fw_datasets.toolButton_custom.clicked.connect(
140+
self.fw_datasets.pushButton_custom.setVisible(True)
141+
self.fw_datasets.pushButton_custom.clicked.connect(
142142
self.on_add_datasets_to_collection)
143143

144144
@QtCore.pyqtSlot()

0 commit comments

Comments
 (0)