@@ -1888,11 +1888,8 @@ class SpeechBubble(QWidget):
18881888 min-width: 540px;
18891889 max-width: 540px;
18901890 background-color: #fff;
1891- padding: 16px;
18921891 }
18931892 #message {
1894- min-width: 540px;
1895- max-width: 540px;
18961893 font-family: 'Source Sans Pro';
18971894 font-weight: 400;
18981895 font-size: 15px;
@@ -1904,11 +1901,10 @@ class SpeechBubble(QWidget):
19041901 max-height: 5px;
19051902 background-color: #102781;
19061903 border: 0px;
1907- min-width: 590px;
1908- max-width: 590px;
19091904 }
19101905 '''
19111906
1907+
19121908 TOP_MARGIN = 28
19131909 BOTTOM_MARGIN = 10
19141910
@@ -1918,7 +1914,6 @@ def __init__(self, message_uuid: str, text: str, update_signal, index: int) -> N
19181914 self .index = index
19191915
19201916 # Set styles
1921- self .setObjectName ('speech_bubble' )
19221917 self .setStyleSheet (self .CSS )
19231918 self .setSizePolicy (QSizePolicy .Fixed , QSizePolicy .Fixed )
19241919
@@ -1940,19 +1935,21 @@ def __init__(self, message_uuid: str, text: str, update_signal, index: int) -> N
19401935
19411936 # Speech bubble
19421937 speech_bubble = QWidget ()
1938+ speech_bubble .setObjectName ('speech_bubble' )
19431939 speech_bubble_layout = QVBoxLayout ()
19441940 speech_bubble .setLayout (speech_bubble_layout )
19451941 speech_bubble_layout .addWidget (self .message )
19461942 speech_bubble_layout .addWidget (self .color_bar )
1943+ speech_bubble_layout .setContentsMargins (0 , 0 , 0 , 0 )
19471944 speech_bubble_layout .setSpacing (0 )
19481945
19491946 # Bubble area includes speech bubble plus error message if there is an error
19501947 bubble_area = QWidget ()
19511948 bubble_area .setLayoutDirection (Qt .RightToLeft )
19521949 self .bubble_area_layout = QHBoxLayout ()
1953- self .bubble_area_layout .setContentsMargins (0 , self .TOP_MARGIN , 0 , self .BOTTOM_MARGIN )
19541950 bubble_area .setLayout (self .bubble_area_layout )
19551951 self .bubble_area_layout .addWidget (speech_bubble )
1952+ self .bubble_area_layout .setContentsMargins (0 , self .TOP_MARGIN , 0 , self .BOTTOM_MARGIN )
19561953
19571954 # Add widget to layout
19581955 layout .addWidget (bubble_area )
@@ -1985,8 +1982,6 @@ class ReplyWidget(SpeechBubble):
19851982 """
19861983
19871984 CSS_MESSAGE_REPLY_FAILED = '''
1988- min-width: 540px;
1989- max-width: 540px;
19901985 font-family: 'Source Sans Pro';
19911986 font-weight: 400;
19921987 font-size: 15px;
@@ -2010,8 +2005,6 @@ class ReplyWidget(SpeechBubble):
20102005 '''
20112006
20122007 CSS_MESSAGE_REPLY_SUCCEEDED = '''
2013- min-width: 540px;
2014- max-width: 540px;
20152008 font-family: 'Source Sans Pro';
20162009 font-weight: 400;
20172010 font-size: 15px;
@@ -2028,8 +2021,6 @@ class ReplyWidget(SpeechBubble):
20282021 '''
20292022
20302023 CSS_MESSAGE_REPLY_PENDING = '''
2031- min-width: 540px;
2032- max-width: 540px;
20332024 font-family: 'Source Sans Pro';
20342025 font-weight: 400;
20352026 font-size: 15px;
@@ -2123,7 +2114,6 @@ class FileWidget(QWidget):
21232114 #file_widget {
21242115 min-width: 540px;
21252116 max-width: 540px;
2126- padding: 16px;
21272117 }
21282118 #file_options {
21292119 min-width: 137px;
@@ -2194,7 +2184,6 @@ class FileWidget(QWidget):
21942184 }
21952185 """
21962186
2197- VERTICAL_MARGIN = 10
21982187 FILE_FONT_SPACING = 2
21992188 FILE_OPTIONS_FONT_SPACING = 1.6
22002189 FILENAME_WIDTH_PX = 360
@@ -2232,7 +2221,7 @@ def __init__(
22322221 self .setLayout (layout )
22332222
22342223 # Set margins and spacing
2235- layout .setContentsMargins (0 , self . VERTICAL_MARGIN , 0 , self . VERTICAL_MARGIN )
2224+ layout .setContentsMargins (0 , 0 , 0 , 0 )
22362225 layout .setSpacing (0 )
22372226
22382227 # File options: download, export, print
0 commit comments