A lot of changes

Remove unused constructor of messages::Message
Fixed LimitedQueueSnapshot _-prefixes
Changed LimitedQueueSnapshot's usage of int to std::size_t
ColorScheme is no longer a singleton
Created a "BaseWidget" class which is pretty much a QWidget except it
has a reference of ColorScheme since most widgets will need a reference
to the style they should use.
BaseWidget can be implemented either with a BaseWidget parent (which
will copy the ColorScheme reference from the parent) or with a
normal QWidget parent and an explicit ColorScheme reference.
Save main window geometry on close
Fix font changing in the Settings Dialog
Update settings library version
This commit is contained in:
Rasmus Karlsson
2017-06-26 16:41:20 +02:00
parent c2e67e4b90
commit 7df7da70cb
56 changed files with 933 additions and 650 deletions
+10 -12
View File
@@ -10,7 +10,7 @@
namespace chatterino {
namespace widgets {
NotebookButton::NotebookButton(QWidget *parent)
NotebookButton::NotebookButton(BaseWidget *parent)
: FancyButton(parent)
{
setMouseEffectColor(QColor(0, 0, 0));
@@ -23,17 +23,15 @@ void NotebookButton::paintEvent(QPaintEvent *)
QColor background;
QColor foreground;
auto &colorScheme = ColorScheme::getInstance();
if (_mouseDown) {
background = colorScheme.TabSelectedBackground;
foreground = colorScheme.TabSelectedText;
} else if (_mouseOver) {
background = colorScheme.TabHoverBackground;
foreground = colorScheme.TabSelectedBackground;
if (mouseDown) {
background = this->colorScheme.TabSelectedBackground;
foreground = this->colorScheme.TabSelectedText;
} else if (mouseOver) {
background = this->colorScheme.TabHoverBackground;
foreground = this->colorScheme.TabSelectedBackground;
} else {
background = colorScheme.TabPanelBackground;
// foreground = colorScheme.TabSelectedBackground;
background = this->colorScheme.TabPanelBackground;
// foreground = this->colorScheme.TabSelectedBackground;
foreground = QColor(230, 230, 230);
}
@@ -93,7 +91,7 @@ void NotebookButton::paintEvent(QPaintEvent *)
void NotebookButton::mouseReleaseEvent(QMouseEvent *event)
{
if (event->button() == Qt::LeftButton) {
_mouseDown = false;
mouseDown = false;
update();