-
-
Notifications
You must be signed in to change notification settings - Fork 114
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
Use columns for file name, directory, and state when files are shown as a list in TreeViews. #664
Conversation
…as a list in TreeViews. Resolves Dense layout issue #547
…we gain more control
… used, no restore is possible with the collapse counter we use
…lapse counter is wrong and an assert will be triggered
@gh-devnull can you have a look into it? |
contextMenu->addAction(singleTree); | ||
contextMenu->addAction(listView); | ||
contextMenu->addAction(multiColumn); |
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.
Isn't this just an option when the list view is active?
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.
Yes this is true, not sure how to handle it. Shall we mark it as this?
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.
I can think of 2 possibilities to resolve this:
- When turning multi-column mode on, turn on the list view too (it may already be on of course). Also, when turning list view off, turn multi-column off as well (it may already be off of course).
- Remove multi-column as a context menu option and, instead, add it as an application option under Tools>Options...>Window (or some more appropriate spot).
The first possibility keeps the UI as you have it and just enforces the semantics. The second restores the original context menu options and makes the multi-column setting be a "meta" setting for the list view - i.e. the user has to decide which kind of list view is desired and be willing to use it consistently.
It would be nice to resolve this somehow now but it could be cleaned up with a later submission too. I'm OK with either.
@@ -91,7 +111,22 @@ int DiffTreeModel::rowCount(const QModelIndex &parent) const { | |||
return mDiff ? node(parent)->children().size() : 0; | |||
} | |||
|
|||
int DiffTreeModel::columnCount(const QModelIndex &parent) const { return 1; } | |||
QVariant DiffTreeModel::headerData(int section, Qt::Orientation orientation, |
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.
Thanks for this. :-)
@Murmele, this looks good! Thanks for reviewing my changes and fixing up some of the ugliness that crept in. :-) I left just one comment about how to handle multi-column mode since it affects only the list view but can still be toggled even when list view is off. |
Thanks for your contribution and having to wait so long. Just have to check why the builds are failing because of timeout in fetching qt |
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.
Other than the more minor issue surrounding the multi-column option, this looks good to me. While I'm sure there's a good resolution to the multi-column question, I wouldn't want it to significantly hold back these very useful additions.
The only thing is this ci build stuff with qt. I have to check. Just wanna that the mac ci build euns also through, not having unexpected problems otherwise |
Yeah, the qt ci problems are confounding to me. I completely agree that it makes sense to resolve them though. |
Resolves Dense layout issue #547
This MR was created because #632 is force push protected and therefore no rebase can be made