fix(ui): correct suggest box content padding

This commit is contained in:
Travis Abendshien
2026-08-12 23:14:31 -07:00
parent b29e612e7f
commit dc31605c8f
2 changed files with 2 additions and 5 deletions
+1 -1
View File
@@ -187,7 +187,7 @@ class SuggestBox[T](QWidget):
self.layout().search_field.setStyleSheet(autofill_line_edit_style())
else:
self.layout().scroll_area.setHidden(False)
self.layout().content_layout.setContentsMargins(6, 6, 6, 6)
self.layout().content_layout.setContentsMargins(4, 6, 4, 6)
self.layout().search_field.setStyleSheet(autofill_line_edit_top_style())
def _search_items(self, query: str) -> tuple[list[T], list[T]]: # pyright: ignore[reportUnusedParameter]
+1 -4
View File
@@ -26,10 +26,6 @@ class SuggestBoxView(QVBoxLayout):
scroll_area_style = """
QScrollArea{
background: transparent;
border: solid;
border-color: transparent;
border-width: 0px 2px;
padding-left: -2px;
}
QScrollArea > QWidget > QWidget{
background: transparent;
@@ -50,6 +46,7 @@ class SuggestBoxView(QVBoxLayout):
scroll_area_container.setStyleSheet(autofill_scroll_top_style("container"))
self.scroll_area = QScrollArea()
self.scroll_area.setStyleSheet(scroll_area_style)
self.scroll_area.setViewportMargins(2, 0, 2, 0)
scroll_area_container_layout.addWidget(self.scroll_area)
self.scroll_area.setWidget(contents)
search_bar_height = 28