mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
rename highlight style to highlight state
This commit is contained in:
parent
03962db367
commit
ebd682730a
|
@ -110,14 +110,9 @@ void NotebookTab::setSelected(bool value)
|
|||
this->update();
|
||||
}
|
||||
|
||||
NotebookTab::HighlightStyle NotebookTab::getHighlightStyle() const
|
||||
void NotebookTab::setHighlightState(HighlightState newHighlightStyle)
|
||||
{
|
||||
return this->highlightStyle;
|
||||
}
|
||||
|
||||
void NotebookTab::setHighlightStyle(HighlightStyle newHighlightStyle)
|
||||
{
|
||||
this->highlightStyle = newHighlightStyle;
|
||||
this->highlightState = newHighlightStyle;
|
||||
|
||||
this->update();
|
||||
}
|
||||
|
@ -174,10 +169,10 @@ void NotebookTab::paintEvent(QPaintEvent *)
|
|||
} else if (this->mouseOver) {
|
||||
painter.fillRect(rect(), this->colorScheme.TabHoverBackground);
|
||||
fg = this->colorScheme.TabHoverText;
|
||||
} else if (this->highlightStyle == HighlightHighlighted) {
|
||||
} else if (this->highlightState == HighlightState::Highlighted) {
|
||||
painter.fillRect(rect(), this->colorScheme.TabHighlightedBackground);
|
||||
fg = this->colorScheme.TabHighlightedText;
|
||||
} else if (this->highlightStyle == HighlightNewMessage) {
|
||||
} else if (this->highlightState == HighlightState::NewMessage) {
|
||||
painter.fillRect(rect(), this->colorScheme.TabNewMessageBackground);
|
||||
fg = this->colorScheme.TabHighlightedText;
|
||||
} else {
|
||||
|
|
|
@ -23,7 +23,11 @@ class NotebookTab : public BaseWidget
|
|||
std::string settingRoot;
|
||||
|
||||
public:
|
||||
enum HighlightStyle { HighlightNone, HighlightHighlighted, HighlightNewMessage };
|
||||
enum class HighlightState {
|
||||
None,
|
||||
Highlighted,
|
||||
NewMessage,
|
||||
};
|
||||
|
||||
explicit NotebookTab(Notebook *_notebook, const std::string &settingPrefix);
|
||||
|
||||
|
@ -36,8 +40,7 @@ public:
|
|||
bool isSelected() const;
|
||||
void setSelected(bool value);
|
||||
|
||||
HighlightStyle getHighlightStyle() const;
|
||||
void setHighlightStyle(HighlightStyle style);
|
||||
void setHighlightState(HighlightState style);
|
||||
|
||||
void moveAnimated(QPoint pos, bool animated = true);
|
||||
|
||||
|
@ -77,7 +80,7 @@ private:
|
|||
bool mouseOverX = false;
|
||||
bool mouseDownX = false;
|
||||
|
||||
HighlightStyle highlightStyle = HighlightStyle::HighlightNone;
|
||||
HighlightState highlightState = HighlightState::None;
|
||||
|
||||
QMenu menu;
|
||||
|
||||
|
|
Loading…
Reference in a new issue