-
Notifications
You must be signed in to change notification settings - Fork 42
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
shrinking size of window can cause sources in the source list to disappear #331
Comments
This bug is present for me too. |
I found the problem, but not a great solution. It might be an upstream issue... To remove Qt's list view item decoration, which shows a border and background color for the first item in the list (before it's been selected), you can use the following CSS:
This removes the unwanted behavior of always showing the first item in the list as decorated. When I change that back to 1 instead of 0, the issue goes away. But now we're stuck with the decoration before the item is selected, so no conversation is displayed, but it looks like there should be. It make the application appear broken. I've tried getting around this by setting For example, I've tried this, but the first item still shows unwanted decoration:
The only way it seems to get rid of the first item decoration is to do this, which causes the repainting bug (this really seems like a Qt upstream issue):
ProposalI'm running out different things to try, so I think the work-around for now should be to remove the References |
This bug is now back because I forgot that adding |
STR:
Expected: all sources in the list remain If this doesn't happen to you the first time you try, close the client and try again. Also make sure when you are trying to solve this bug and making code changes that you test a few times to make sure it's acutally gone. |
I may have found a solution but it's kind of like a hack. The odd-looking default style always shows up when QListView {
border: none;
show-decoration-selected: 1;
border-right: 3 px solid #f3f5f9;
}
QListView::item:selected {
border: 500 px solid qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0, stop: 0 #f8fefe, stop: 0.74 #f1eef7, stop: 1 #eef0f7);
} |
This change has some side-effects that I don't know exactly what they mean. Notice the tiny shadow there. I don't know what the purpose for that was, but with this change that disappeared. |
I'll apply your change and test so I can see the side effects better. Seems like a clever workaround to this strange Qt behavior, but I want to make sure we can still display preview text (on a feature branch) with a 500px mega border. |
hey @deeplow your change looks good to me, and it still works with preview text |
…list workaround: do styling on border instead of in the background and make border very large so that the default style is shrinked until it no longer exists. See freedomofpress#331 for discussion
workaround: do styling on border instead of in the background and make border very large so that the default style is shrinked until it no longer exists. See #331 for discussion
When resizing the client window a bunch I noticed that sometimes the sourcelist wouldn't fully repaint a source item. I need to investigate this further to create a follow-up STR.
The text was updated successfully, but these errors were encountered: