Add basic color scheme handling

Fix #59
This commit is contained in:
Rasmus Karlsson
2017-07-02 14:28:37 +02:00
parent c5c2718dc0
commit ddf886eaf1
13 changed files with 83 additions and 39 deletions
+9 -4
View File
@@ -43,9 +43,7 @@ MainWindow::MainWindow(ChannelManager &_channelManager, ColorScheme &_colorSchem
layout->setMargin(0);
// }
QPalette palette;
palette.setColor(QPalette::Background, this->colorScheme.TabPanelBackground);
setPalette(palette);
this->refreshTheme();
if (this->windowGeometry->isFilled()) {
// Load geometry from settings file
@@ -160,11 +158,18 @@ Notebook &MainWindow::getNotebook()
return this->notebook;
}
void MainWindow::closeEvent(QCloseEvent *event)
void MainWindow::closeEvent(QCloseEvent *)
{
// Save closing window position
this->windowGeometry = this->geometry();
}
void MainWindow::refreshTheme()
{
QPalette palette;
palette.setColor(QPalette::Background, this->colorScheme.TabPanelBackground);
this->setPalette(palette);
}
} // namespace widgets
} // namespace chatterino