Skip to content

Commit

Permalink
apply stylesheets to children
Browse files Browse the repository at this point in the history
  • Loading branch information
Allie Crevier committed Apr 22, 2020
1 parent 4903236 commit 22e1b34
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions securedrop_client/gui/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -3034,15 +3034,15 @@ class ConversationView(QWidget):
Renders a conversation.
"""

CSS = '''
#container {
background: #f3f5f9;
}
#scroll {
border: 0;
background: #f3f5f9;
CSS = {
'container': '''
background: #f3f5f9;
''',
'scroll': '''
border: 0;
background: #f3f5f9;
'''
}
'''

conversation_updated = pyqtSignal()

Expand All @@ -3059,9 +3059,6 @@ def __init__(self, source_db_object: Source, controller: Controller):
# To hold currently displayed messages.
self.current_messages = {} # type: Dict[str, QWidget]

# Set styles
# self.setStyleSheet(self.CSS)

# Set layout
main_layout = QVBoxLayout()
self.setLayout(main_layout)
Expand All @@ -3077,12 +3074,14 @@ def __init__(self, source_db_object: Source, controller: Controller):
self.conversation_layout.setContentsMargins(self.MARGIN_LEFT, 0, self.MARGIN_RIGHT, 0)
self.conversation_layout.setSpacing(0)
self.container.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed)
self.container.setStyleSheet(self.CSS['container'])

self.scroll = QScrollArea()
self.scroll.setObjectName('scroll')
self.scroll.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
self.scroll.setWidget(self.container)
self.scroll.setWidgetResizable(True)
self.scroll.setStyleSheet(self.CSS['scroll'])

# Flag to show if the current user has sent a reply. See issue #61.
self.reply_flag = False
Expand Down

0 comments on commit 22e1b34

Please sign in to comment.