Skip to content

Commit

Permalink
stretch background of left pane
Browse files Browse the repository at this point in the history
  • Loading branch information
Allie Crevier committed Jan 29, 2021
1 parent 562bfaa commit db6b765
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
11 changes: 8 additions & 3 deletions securedrop_client/gui/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ class LeftPane(QWidget):
def __init__(self):
super().__init__()

self.setObjectName("LeftPane")

# Set layout
layout = QVBoxLayout(self)
self.setLayout(layout)
Expand All @@ -186,7 +188,6 @@ def __init__(self):
layout.setContentsMargins(0, 0, 0, 0)
layout.setSpacing(0)
layout.setAlignment(Qt.AlignBottom)
self.setFixedWidth(198)

# Set background image
self.logo = QWidget()
Expand All @@ -199,7 +200,6 @@ def __init__(self):
)
self.logo.setPalette(self.offline_palette)
self.logo.setAutoFillBackground(True)
self.logo.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
self.logo.setEnabled(False)

# User profile
Expand All @@ -208,9 +208,14 @@ def __init__(self):
# Hide user profile widget until user logs in
self.user_profile.hide()

spacer = QWidget()
spacer.setObjectName("LeftPane_spacer")
spacer.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)

# Add widgets to layout
layout.addWidget(self.user_profile)
layout.addWidget(self.logo)
layout.addWidget(spacer, stretch=1)
layout.addWidget(self.logo, stretch=5)

def setup(self, window, controller):
self.user_profile.setup(window, controller)
Expand Down
11 changes: 10 additions & 1 deletion securedrop_client/resources/css/sdclient.css
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,18 @@
color: #0c3e75;
}

#LeftPane {
min-width: 198;
max-width: 198;
}

#LeftPane_spacer {
background-color: #0096dc;
}

#UserProfile {
padding: 15px;
min-height: 200px
min-height: 60px
}

#UserProfile_icon {
Expand Down

0 comments on commit db6b765

Please sign in to comment.