-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Add File Browser Styling #4085
Add File Browser Styling #4085
Conversation
@Mark-Agent003, thanks for this feature. Please fixup the description to describe the enhancement a bit better. I've tested this and there seems to be some strange behavior when navigating between folders, the old one doesn't seem to get unselected. I've attached a GIF. Note, I'd also like @Umcaruje to approve the theme/css side of this, since he's the remaining half of the 1.2.0 theme while Rebecca is away. At a glance, the colors look great. |
Yes, if a directory is open, it will always have that background. |
A background will change to green if
|
Can you please offer another application that behaves this way for comparison? This seems incorrect to me. |
I don't think it's a matter of what's correct as much as it's a matter of what's useful. If it doesn't seem useful to anybody or if it's distracting, it can definitely be removed. |
Although I agree -- usefulness must prevail -- file browsing is something computer users are already familiar with; do often enough. Correctness must weigh in to the decision. So in this case, ignoring defacto standards must be justified, not the other way around. |
Sorry, there is some confusion confusion. The open directory highlighting is fine, you are correct. What I was illustrating in my screenshot is a bug with the implementation where the previous folder was not deselected. |
So, what you’re saying is: you’ve opened two folders and when you click an item in one, you don’t want the other folder to still be highlighted green? |
Okay, right now, any open folder is highlighted. Otherwise it can’t be done with just css. |
aren't the arrow in front of the folder name that points right or down, as well as the next level of that folder being indented, enough indication that it's currently open/expanded? In this comment's screenshot: #4085 (comment), I would personally prefer the right. Just looking at a random image from google of the windows explorer, this seems to be the default behavior at least under windows: |
@Mark-Agent003 if you're interested in touching the C++ code, you should be able to recursively force the style upon its parents. If not, we seem to have hit a CSS limitation inside of Qt. The browser allows this through the @teeberg this seems consistent with Mac as well. |
@tresf, unfortunately, I am very unfamiliar with the lmms code |
No worries. Let's just do child highlighting for now. It solves the original bug report without custom code. |
Ok, what do you think about the extended hightlights? |
Covering up the carets is a non-starter. |
That seems like overkill. Frankly I feel this PR should have been a few CSS lines, merged, and on to the next enhancement. I have no investment one style over the other. @Umcaruje please make a decision here. |
Option one is simpler and is CSS-only, simply highlighting and selecting. |
@Mark-Agent003 although it's a noble effort to get consensus, I'll ask one final time to please execute the first option, we'll merge, we can close out #4070. |
I find the 2nd option aesthetically pleasing and I don't see it as too much CSS. I have some inputs on the CSS though. I don't know why you changed the font size, I feel this should be a part of a seperate issue, and not in this pull request. QTreeWidget::item:selected,
QTreeWidget::branch:selected {
background-color: #17793b;
} The indentation before the curly brackets should be one space, not two. In the end the changes should look like this: QTreeView {
outline: none;
selection-background-color: transparent;
selection-color: #d1d8e4;
}
QTreeWidget::item {
padding: 0px;
}
QTreeWidget::item:hover,
QTreeWidget::branch:hover {
background-color: #3C444E;
}
QTreeWidget::item:selected,
QTreeWidget::branch:selected {
background-color: #17793b;
}
QTreeView::branch:has-children:open {
border-image: url("resources:open_branch.png") 0;
}
QTreeView::branch:has-children:closed {
border-image: url("resources:closed_branch.png") 0;
} Also, I'm not entirely sure what |
@Umcaruje , I added the (set to blue) |
Ah, thanks for explaining, do you know why the icons change their color from white to grey when they are clicked on? Is this some kind of weird Qt behaviour? |
A picture for reference of @Umcaruje's question: |
@Umcaruje , any reason you didn't include |
The font color doesn't change as is evident by my test results, so I see no point in setting it. Did you run into some issues? |
Ah, I see. This has my approval. 👍 |
Use CSS to style the selected and hovered items in the File Browser
This is the Pull Request for #4070 .
The file browser will be more responsive to hovering and clicking with this, but still styled in the default theme.
What it adds:
I removed the indenting when selecting file items.