Skip to content
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

Merged
merged 12 commits into from
Nov 20, 2023

Conversation

Murmele
Copy link
Owner

@Murmele Murmele commented Nov 12, 2023

Resolves Dense layout issue #547

This MR was created because #632 is force push protected and therefore no rebase can be made

@Murmele
Copy link
Owner Author

Murmele commented Nov 12, 2023

@gh-devnull can you have a look into it?

contextMenu->addAction(singleTree);
contextMenu->addAction(listView);
contextMenu->addAction(multiColumn);
Copy link
Contributor

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?

Copy link
Owner Author

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?

Copy link
Contributor

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:

  1. 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).
  2. 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,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this. :-)

@gh-devnull
Copy link
Contributor

@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.

@Murmele
Copy link
Owner Author

Murmele commented Nov 15, 2023

@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

Copy link
Contributor

@gh-devnull gh-devnull left a 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.

@Murmele
Copy link
Owner Author

Murmele commented Nov 17, 2023

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

@gh-devnull
Copy link
Contributor

Yeah, the qt ci problems are confounding to me.

I completely agree that it makes sense to resolve them though.

@Murmele Murmele merged commit 6984d51 into master Nov 20, 2023
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants