search patch
This commit is contained in:
parent
79cb04d00e
commit
f6d0f8fcc0
@ -60,10 +60,19 @@ class SearchResultsView(QWidget):
|
||||
def _add_section_header(self, text: str):
|
||||
item = QListWidgetItem()
|
||||
item.setFlags(Qt.ItemIsEnabled)
|
||||
# Оборачиваем в контейнер, чтобы занять всю ширину и корректно задать высоту
|
||||
container = QWidget()
|
||||
lay = QVBoxLayout(container)
|
||||
lay.setContentsMargins(12, 6, 12, 6)
|
||||
lay.setSpacing(0)
|
||||
label = QLabel(text)
|
||||
label.setStyleSheet("padding: 8px 12px; color: #8e8e93; font-weight: 600;")
|
||||
label.setStyleSheet("color: #8e8e93; font-weight: 600;")
|
||||
label.setWordWrap(False)
|
||||
lay.addWidget(label)
|
||||
# Задать sizeHint, чтобы не обрезалось
|
||||
item.setSizeHint(container.sizeHint())
|
||||
self.list.addItem(item)
|
||||
self.list.setItemWidget(item, label)
|
||||
self.list.setItemWidget(item, container)
|
||||
|
||||
def _add_two_line_item(self, title: str, subtitle: str = "", payload=None):
|
||||
w = QWidget()
|
||||
|
||||
Reference in New Issue
Block a user