From fa9e6369c0da31c4f92847a63af0da8dcb08cb75 Mon Sep 17 00:00:00 2001 From: redshiftzero Date: Mon, 8 Jul 2019 12:07:39 -0700 Subject: [PATCH] app: fix message spacing issues also implemented some minor styling as speced in zeplin, e.g. all the message bubbles are 556px in width --- securedrop_client/gui/widgets.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/securedrop_client/gui/widgets.py b/securedrop_client/gui/widgets.py index fa3703281..ebc318958 100644 --- a/securedrop_client/gui/widgets.py +++ b/securedrop_client/gui/widgets.py @@ -1294,6 +1294,7 @@ class SpeechBubble(QWidget): #speech_bubble { padding: 8px; min-height: 32px; + min-width: 556px; border: 1px solid #999; border-bottom: 0; } @@ -1301,7 +1302,6 @@ class SpeechBubble(QWidget): padding: 0px; background-color: #102781; min-height: 5px; - max-height: 5px; border: 0px; } ''' @@ -1314,20 +1314,18 @@ def __init__(self, message_id: str, text: str, update_signal) -> None: self.setStyleSheet(self.CSS) layout = QVBoxLayout() + layout.setSpacing(0) + self.setLayout(layout) self.message = QLabel(html.escape(text, quote=False)) self.message.setObjectName('speech_bubble') self.message.setWordWrap(True) - self.message.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed) + self.message.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Minimum) layout.addWidget(self.message) - layout.insertStretch(0) self.color_bar = QWidget() self.color_bar.setObjectName('color_bar') - self.color_bar.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed) + self.color_bar.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Minimum) layout.addWidget(self.color_bar) - layout.setSpacing(0) - - self.setLayout(layout) update_signal.connect(self._update_text)