Skip to content

Commit 4a9353f

Browse files
JesseEmondJesseEmond
JesseEmond
authored and
JesseEmond
committed
Remove unused highlight styling
1 parent b3fcde7 commit 4a9353f

File tree

1 file changed

+5
-21
lines changed

1 file changed

+5
-21
lines changed

python/app/widget_list_item.py

+5-21
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,8 @@ def __init__(self, parent):
3535
self.ui.setupUi(self)
3636

3737
# keep predefined classes for each state of the widget
38-
self._css_decorated = """
39-
#box { border-width: 2px;
40-
border-radius: 4px;
41-
border-color: rgb(48, 167, 227);
42-
border-style: solid;
43-
}
44-
"""
4538

39+
# style when the widget is selected
4640
self._css_selected = """
4741
#box { border-width: 2px;
4842
border-radius: 4px;
@@ -52,7 +46,8 @@ def __init__(self, parent):
5246
}
5347
"""
5448

55-
self._no_style = """
49+
# style when the widget is passive (not selected)
50+
self._css_passive = """
5651
#box { border-width: 2px;
5752
border-radius: 4px;
5853
border-color: rgba(0, 0, 0, 0%);
@@ -68,19 +63,8 @@ def set_selected(self, selected):
6863
6964
:param selected: True if selected, false if not
7065
"""
71-
if selected:
72-
self.ui.box.setStyleSheet(self._css_selected)
73-
74-
def set_highlighted(self, highlighted):
75-
"""
76-
Adjust the style sheet to indicate that an object is highlighted
77-
78-
:param selected: True if selected, false if not
79-
"""
80-
if highlighted:
81-
self.ui.box.setStyleSheet(self._css_decorated)
82-
else:
83-
self.ui.box.setStyleSheet(self._no_style)
66+
css = self._css_selected if selected else self._css_passive
67+
self.ui.box.setStyleSheet(css)
8468

8569
def set_thumbnail(self, pixmap):
8670
"""

0 commit comments

Comments
 (0)