Daniel Brötzmann pushed to branch master at gajim / gajim


Commits:
00b27bf9 by wurstsalat at 2024-07-02T23:37:52+02:00
imprv: MessageRowActions: Adjust floating offset for merged messages

Fixes #11897

- - - - -


2 changed files:

- gajim/gtk/conversation/rows/message.py
- gajim/gtk/conversation/rows/widgets.py


Changes:

=====================================
gajim/gtk/conversation/rows/message.py
=====================================
@@ -117,6 +117,10 @@ def message_id(self) -> str | None:
     def has_receipt(self) -> bool:
         return self._has_receipt
 
+    @property
+    def is_merged(self) -> bool:
+        return self._merged
+
     def refresh(self, *, complete: bool = True) -> None:
         original_message = app.storage.archive.get_message_with_pk(
             self.orig_pk)


=====================================
gajim/gtk/conversation/rows/widgets.py
=====================================
@@ -118,8 +118,12 @@ def update(self, y_coord: int, message_row: MessageRow) -> 
None:
         if y_coord < self_height:
             y_coord = self_height
 
-        # Subtract 12 to let MessageRowActions 'flow' above the row
-        adjusted_y_coord = y_coord - 12
+        # Subtract some space to let MessageRowActions 'flow' above the row
+        offset = 12
+        if self._message_row.is_merged:
+            offset = 24
+
+        adjusted_y_coord = y_coord - offset
         if adjusted_y_coord < 0:
             adjusted_y_coord = 0
 



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/00b27bf92094b4011b66c951ad76da0abad8737e

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/00b27bf92094b4011b66c951ad76da0abad8737e
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to