From cbbd531484a5af2e5d1a4bb883b348c16199d067 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 4 Oct 2025 01:29:08 +0300 Subject: [PATCH] chat patch --- app/ui/widgets/chat_list_item_widget.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/app/ui/widgets/chat_list_item_widget.py b/app/ui/widgets/chat_list_item_widget.py index acd222d..bb3eb15 100644 --- a/app/ui/widgets/chat_list_item_widget.py +++ b/app/ui/widgets/chat_list_item_widget.py @@ -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