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();
|
this->update();
|
||||||
}
|
}
|
||||||
|
|
||||||
NotebookTab::HighlightStyle NotebookTab::getHighlightStyle() const
|
void NotebookTab::setHighlightState(HighlightState newHighlightStyle)
|
||||||
{
|
{
|
||||||
return this->highlightStyle;
|
this->highlightState = newHighlightStyle;
|
||||||
}
|
|
||||||
|
|
||||||
void NotebookTab::setHighlightStyle(HighlightStyle newHighlightStyle)
|
|
||||||
{
|
|
||||||
this->highlightStyle = newHighlightStyle;
|
|
||||||
|
|
||||||
this->update();
|
this->update();
|
||||||
}
|
}
|
||||||
|
@ -174,10 +169,10 @@ void NotebookTab::paintEvent(QPaintEvent *)
|
||||||
} else if (this->mouseOver) {
|
} else if (this->mouseOver) {
|
||||||
painter.fillRect(rect(), this->colorScheme.TabHoverBackground);
|
painter.fillRect(rect(), this->colorScheme.TabHoverBackground);
|
||||||
fg = this->colorScheme.TabHoverText;
|
fg = this->colorScheme.TabHoverText;
|
||||||
} else if (this->highlightStyle == HighlightHighlighted) {
|
} else if (this->highlightState == HighlightState::Highlighted) {
|
||||||
painter.fillRect(rect(), this->colorScheme.TabHighlightedBackground);
|
painter.fillRect(rect(), this->colorScheme.TabHighlightedBackground);
|
||||||
fg = this->colorScheme.TabHighlightedText;
|
fg = this->colorScheme.TabHighlightedText;
|
||||||
} else if (this->highlightStyle == HighlightNewMessage) {
|
} else if (this->highlightState == HighlightState::NewMessage) {
|
||||||
painter.fillRect(rect(), this->colorScheme.TabNewMessageBackground);
|
painter.fillRect(rect(), this->colorScheme.TabNewMessageBackground);
|
||||||
fg = this->colorScheme.TabHighlightedText;
|
fg = this->colorScheme.TabHighlightedText;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -23,7 +23,11 @@ class NotebookTab : public BaseWidget
|
||||||
std::string settingRoot;
|
std::string settingRoot;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum HighlightStyle { HighlightNone, HighlightHighlighted, HighlightNewMessage };
|
enum class HighlightState {
|
||||||
|
None,
|
||||||
|
Highlighted,
|
||||||
|
NewMessage,
|
||||||
|
};
|
||||||
|
|
||||||
explicit NotebookTab(Notebook *_notebook, const std::string &settingPrefix);
|
explicit NotebookTab(Notebook *_notebook, const std::string &settingPrefix);
|
||||||
|
|
||||||
|
@ -36,8 +40,7 @@ public:
|
||||||
bool isSelected() const;
|
bool isSelected() const;
|
||||||
void setSelected(bool value);
|
void setSelected(bool value);
|
||||||
|
|
||||||
HighlightStyle getHighlightStyle() const;
|
void setHighlightState(HighlightState style);
|
||||||
void setHighlightStyle(HighlightStyle style);
|
|
||||||
|
|
||||||
void moveAnimated(QPoint pos, bool animated = true);
|
void moveAnimated(QPoint pos, bool animated = true);
|
||||||
|
|
||||||
|
@ -77,7 +80,7 @@ private:
|
||||||
bool mouseOverX = false;
|
bool mouseOverX = false;
|
||||||
bool mouseDownX = false;
|
bool mouseDownX = false;
|
||||||
|
|
||||||
HighlightStyle highlightStyle = HighlightStyle::HighlightNone;
|
HighlightState highlightState = HighlightState::None;
|
||||||
|
|
||||||
QMenu menu;
|
QMenu menu;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue