-
-
Notifications
You must be signed in to change notification settings - Fork 458
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
Custom highlight color in tabs #5579
base: master
Are you sure you want to change the base?
Conversation
I put it there last night and I think I forgot about it :)
Moved the functionality to tabHighlightRequested instead of having two signals that modify similar things
The little bit that set the tab's highlight color never checked whether the tab was a nullptr or not i'm a little silly
This makes the color look almost identical in highlights, but completely identical in tab highlights
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
@@ -397,6 +398,15 @@ bool NotebookTab::hasHighlightsEnabled() const | |||
return this->highlightEnabled_; | |||
} | |||
|
|||
void NotebookTab::setHighlightColor(std::shared_ptr<QColor> color) |
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 'color' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param]
void NotebookTab::setHighlightColor(std::shared_ptr<QColor> color) | |
void NotebookTab::setHighlightColor(const std::shared_ptr<QColor>& color) |
src/widgets/helper/NotebookTab.hpp:67:
- void setHighlightColor(std::shared_ptr<QColor> color);
+ void setHighlightColor(const std::shared_ptr<QColor>& color);
}); | ||
conns.managedConnect( | ||
split->getChannelView().tabHighlightRequested, | ||
[this](HighlightState state, std::shared_ptr<QColor> color) { |
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 'color' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param]
[this](HighlightState state, std::shared_ptr<QColor> color) { | |
[this](HighlightState state, const std::shared_ptr<QColor>& color) { |
Original PR: #1557 authored by @2qar