chat patch
This commit is contained in:
parent
d845b4b1f4
commit
cbbd531484
@ -72,9 +72,21 @@ class ChatListItemWidget(QWidget):
|
||||
time_row.addWidget(self.timestamp_label)
|
||||
time_row.addStretch()
|
||||
meta_layout.addLayout(time_row)
|
||||
# Keep unread badge pinned to the far right
|
||||
meta_layout.addWidget(self.unread_label, 0, Qt.AlignRight)
|
||||
meta_layout.addStretch()
|
||||
|
||||
# Offsets for unread badge anchoring (editable)
|
||||
self.unread_offset_right = 6
|
||||
self.unread_offset_bottom = 4
|
||||
|
||||
# Add stretch to push next row to the bottom
|
||||
meta_layout.addStretch(1)
|
||||
|
||||
# Bottom row: anchor unread badge to bottom-right with margins
|
||||
bottom_row = QHBoxLayout()
|
||||
bottom_row.setSpacing(0)
|
||||
bottom_row.setContentsMargins(0, 0, self.unread_offset_right, self.unread_offset_bottom)
|
||||
bottom_row.addStretch(1)
|
||||
bottom_row.addWidget(self.unread_label)
|
||||
meta_layout.addLayout(bottom_row)
|
||||
|
||||
main_layout.addLayout(info_layout)
|
||||
# Push metadata (time + unread) to the far right
|
||||
|
||||
Reference in New Issue
Block a user