-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added some changes to reduce the bubble size #218
Conversation
@eloquence Here's a small PR for reducing the bubble size . Feel free to suggest changes . |
I think this is something @ninavizz wouid need to comment on. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey @nightwarrior-xxx thanks for taking a look at this issue! I've dropped a comment inline for you to take a look at, let me know your thoughts
securedrop_client/gui/widgets.py
Outdated
@@ -481,7 +481,7 @@ def __init__(self, message, align): | |||
label.setStyleSheet(label.css + 'border-bottom-left-radius: 0px;') | |||
layout.setContentsMargins(0, 0, 0, 0) | |||
self.setLayout(layout) | |||
self.setContentsMargins(0, 0, 0, 0) | |||
self.setContentsMargins(38, 38, 38, 38) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The effect using setContentsMargins
has is to increase the spacing between the various UI elements, i.e. for two messages you can compare the view in the image in the issue here with the image below from me trying out this PR:
which is close, but not quite what we want. What we can do is use Qt's QSizePolicy, which you can read more about here. To fix this issue we'll then want to do two things:
- Specify a minimum height for each message bubble using CSS's min-height property.
- Set the size policies to indicate that we want messages to be able to expand vertically, but not horizontally.
Check out one way of doing this here: e0666c0. We should get something that looks like for conversations that fill and do not fill the view respectively:
Play around with this and let me know what you think!
@redshiftzero Please suggest changes. Here are some clips attached |
Apply the QSizePolicy to the conversation view, not the widget
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, thanks @nightwarrior-xxx! (I added a small commit, hope that's cool)
ideally we would squash commits together to make the git history a bit nicer. but i'll approve this one for merge and you can give the git history rewriting a whirl on your next patch :-)
No description provided.