forked from trav/lintunes
v0.31.6: album art inside the playlists' frame; text and playhead lifted 2px
The playlist list and the album art under it share one frame (the list's own style, drawn around both), and the no-art placeholder is a shade lighter than that frame line so the line still reads around it. The playlist name, times and playhead sit 2px up (HeaderRow.LIFT), on the Library button's bottom line by eye.
This commit is contained in:
@@ -276,6 +276,10 @@ class HeaderRow(QWidget):
|
||||
# lists: every item in the row stands on one floor, BOTTOM px up.
|
||||
TOP_PAD = 2
|
||||
BOTTOM = 5
|
||||
# Text and the playhead have no hard bottom edge, so on the floor itself
|
||||
# they read as sitting lower than the Library button beside them; this
|
||||
# lifts them onto the button's bottom line by eye.
|
||||
LIFT = 2
|
||||
|
||||
def __init__(self, seek: QWidget, parent=None):
|
||||
super().__init__(parent)
|
||||
@@ -336,7 +340,7 @@ class HeaderRow(QWidget):
|
||||
self.seek.layout().invalidate()
|
||||
self.seek.setGeometry(seek_left, self.TOP_PAD,
|
||||
max(0, panel.right() + 1 - seek_left),
|
||||
box_h + drop)
|
||||
box_h + drop - self.LIFT)
|
||||
header = self.view_header
|
||||
if header is not None:
|
||||
width = max(0, seek_left - self.GAP - content_left)
|
||||
@@ -344,7 +348,7 @@ class HeaderRow(QWidget):
|
||||
header.setAlignment(Qt.AlignmentFlag.AlignLeft
|
||||
| Qt.AlignmentFlag.AlignBottom)
|
||||
header.setGeometry(content_left, self.TOP_PAD, width,
|
||||
box_h + self._drop(header))
|
||||
box_h + self._drop(header) - self.LIFT)
|
||||
else:
|
||||
header.setGeometry(content_left, self.TOP_PAD, width, box_h)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user