-
-
Notifications
You must be signed in to change notification settings - Fork 449
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
Improve editing of hotkeys #4628
Conversation
- argument descriptions now use "Something:" format if there are possibleArguments - Change UI texts for some actions
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.
clang-tidy made some suggestions
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.
clang-tidy made some suggestions
@@ -66,6 +47,96 @@ EditHotkeyDialog::EditHotkeyDialog(const std::shared_ptr<Hotkey> hotkey, | |||
this->ui_->argumentsEdit->setPlainText(""); | |||
} | |||
} | |||
void EditHotkeyDialog::setFromHotkey(std::shared_ptr<Hotkey> hotkey) |
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.
warning: the parameter 'hotkey' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param]
void EditHotkeyDialog::setFromHotkey(std::shared_ptr<Hotkey> hotkey) | |
void EditHotkeyDialog::setFromHotkey(const std::shared_ptr<Hotkey>& hotkey) |
src/widgets/dialogs/EditHotkeyDialog.hpp:51:
- void setFromHotkey(std::shared_ptr<Hotkey> hotkey);
+ void setFromHotkey(const std::shared_ptr<Hotkey>& hotkey);
Description
The UI will now show a simple picker on what a hotkey can do when there is such an option available.
For example
HotkeyCategory::Split -> "focus"
action has only 4 directions available, so it's possible to add this. HoweverHotkeyCategory::Window -> "openTab"
can have a number, so this approach does not extend to it.Here is how the new UI looks for actions that support it:
For actions that don't support it, nothing will change.