Skip to content

Commit

Permalink
Alternative approach
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Nov 15, 2023
1 parent 85493fa commit 0cadb03
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions koordinates/gui/dataset_browser_items.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,15 +458,16 @@ def __init__(self,
self.column_count = None
self._mode = mode

style_sheet = """DatasetItemWidgetBase {{
border-radius: {}px; background: white;
}}""".format(self.THUMBNAIL_CORNER_RADIUS)
item_style_sheet = "border-radius: {}px; background: white;".format(
self.THUMBNAIL_CORNER_RADIUS)

if self._mode == StandardExploreModes.Browse:
style_sheet += """
DatasetItemWidgetBase {{
border: 1px solid #dddddd;
}}"""
item_style_sheet += "\nborder: 1px solid #dddddd;"

style_sheet = f"""DatasetItemWidgetBase
{{
{item_style_sheet}
}}"""

self.setStyleSheet(style_sheet)
self.setSizePolicy(QSizePolicy.Preferred, QSizePolicy.Fixed)
Expand Down

0 comments on commit 0cadb03

Please sign in to comment.