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

Fix CloseTab related weakness #981

Merged
merged 2 commits into from
Aug 10, 2023
Merged

Fix CloseTab related weakness #981

merged 2 commits into from
Aug 10, 2023

Conversation

juuz0
Copy link
Collaborator

@juuz0 juuz0 commented Aug 8, 2023

Fixes #968

@kelson42
Copy link
Collaborator

kelson42 commented Aug 8, 2023

@juuz0 IMO, it should mot be "in place", but "in addition".

@juuz0
Copy link
Collaborator Author

juuz0 commented Aug 8, 2023

IMO, it should mot be "in place", but "in addition".

Do you mean the shortcuts?
Sadly if I use QKeySequence::close in addition to these two, QT consider that an ambiguity so i explicitly mentioned both shortcuts.

juuz0 added 2 commits August 9, 2023 20:33
Earlier, we used the Qt::Close key sequence but it's not following what other browswers do
On windows, Close button was mapped to Ctrl+f4 and ctrl+W
but on Gnome and KDE, it was only mapped to Ctrl+W
This change puts Ctrl+F4 and Ctrl+W explicitly as shortcuts to close tab.
Earlier, we got the index from cursor's position this led to the close functionality to only work when cursor is hovered over tab title
We get the index straight from the stacked widget now.
Copy link
Collaborator

@kelson42 kelson42 left a comment

Choose a reason for hiding this comment

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

Seems to work properly now and principle LGTM. I would still put a comment explaining about the usage of CREATE_ACTION_ICON_SHORTCUTS why we don't use anymore QKeySequence::Close.

@mgautierfr
Copy link
Member

why we don't use anymore QKeySequence::Close.

This is explain in the commit message.

@kelson42 kelson42 merged commit 95fd133 into main Aug 10, 2023
@kelson42 kelson42 deleted the ctrlW branch August 10, 2023 13:08
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.

Shortcuts ctrl+f4 and ctrl+w should close current tab
3 participants