added settingssnapshot

This commit is contained in:
fourtf
2017-01-24 20:15:12 +01:00
parent de8f6d1e82
commit 3d6b9f7645
15 changed files with 38 additions and 34 deletions
+1 -1
View File
@@ -78,7 +78,7 @@ ChatWidget::paintEvent(QPaintEvent *)
{
QPainter painter(this);
painter.fillRect(this->rect(), ColorScheme::instance().ChatBackground);
painter.fillRect(this->rect(), ColorScheme::getInstance().ChatBackground);
}
}
}
+3 -3
View File
@@ -79,7 +79,7 @@ void
ChatWidgetHeader::updateColors()
{
QPalette palette;
palette.setColor(QPalette::Foreground, ColorScheme::instance().Text);
palette.setColor(QPalette::Foreground, ColorScheme::getInstance().Text);
this->leftLabel.setPalette(palette);
this->middleLabel.setPalette(palette);
@@ -99,8 +99,8 @@ ChatWidgetHeader::paintEvent(QPaintEvent *)
{
QPainter painter(this);
painter.fillRect(rect(), ColorScheme::instance().ChatHeaderBackground);
painter.setPen(ColorScheme::instance().ChatHeaderBorder);
painter.fillRect(rect(), ColorScheme::getInstance().ChatHeaderBackground);
painter.setPen(ColorScheme::getInstance().ChatHeaderBorder);
painter.drawRect(0, 0, width() - 1, height() - 1);
}
+1 -1
View File
@@ -34,7 +34,7 @@ ChatWidgetHeaderButton::paintEvent(QPaintEvent *)
{
QPainter painter(this);
QBrush brush(ColorScheme::instance().IsLightTheme
QBrush brush(ColorScheme::getInstance().IsLightTheme
? QColor(0, 0, 0, 32)
: QColor(255, 255, 255, 32));
+4 -4
View File
@@ -65,11 +65,11 @@ ChatWidgetInput::refreshTheme()
{
QPalette palette;
palette.setColor(QPalette::Foreground, ColorScheme::instance().Text);
palette.setColor(QPalette::Foreground, ColorScheme::getInstance().Text);
this->textLengthLabel.setPalette(palette);
edit.setStyleSheet(ColorScheme::instance().InputStyleSheet);
edit.setStyleSheet(ColorScheme::getInstance().InputStyleSheet);
}
void
@@ -77,8 +77,8 @@ ChatWidgetInput::paintEvent(QPaintEvent *)
{
QPainter painter(this);
painter.fillRect(rect(), ColorScheme::instance().ChatInputBackground);
painter.setPen(ColorScheme::instance().ChatInputBorder);
painter.fillRect(rect(), ColorScheme::getInstance().ChatInputBackground);
painter.setPen(ColorScheme::getInstance().ChatInputBorder);
painter.drawRect(0, 0, width() - 1, height() - 1);
}
+1 -1
View File
@@ -73,7 +73,7 @@ ChatWidgetView::paintEvent(QPaintEvent *)
QColor color;
ColorScheme &scheme = ColorScheme::instance();
ColorScheme &scheme = ColorScheme::getInstance();
// code for tesing colors
/*
+1 -1
View File
@@ -16,7 +16,7 @@ MainWindow::MainWindow(QWidget *parent)
QPalette palette;
palette.setColor(QPalette::Background,
ColorScheme::instance().TabPanelBackground);
ColorScheme::getInstance().TabPanelBackground);
setPalette(palette);
resize(1280, 800);
+1 -1
View File
@@ -21,7 +21,7 @@ NotebookButton::paintEvent(QPaintEvent *)
QColor background;
QColor foreground;
auto colorScheme = ColorScheme::instance();
auto colorScheme = ColorScheme::getInstance();
if (mouseDown) {
background = colorScheme.TabSelectedBackground;
+6 -5
View File
@@ -224,18 +224,19 @@ NotebookPage::paintEvent(QPaintEvent *)
QPainter painter(this);
if (this->hbox.count() == 0) {
painter.fillRect(rect(), ColorScheme::instance().ChatBackground);
painter.fillRect(rect(), ColorScheme::getInstance().ChatBackground);
painter.fillRect(0, 0, width(), 2,
ColorScheme::instance().TabSelectedBackground);
ColorScheme::getInstance().TabSelectedBackground);
painter.setPen(ColorScheme::instance().Text);
painter.setPen(ColorScheme::getInstance().Text);
painter.drawText(rect(), "Add Chat", QTextOption(Qt::AlignCenter));
} else {
painter.fillRect(rect(), ColorScheme::instance().TabSelectedBackground);
painter.fillRect(rect(),
ColorScheme::getInstance().TabSelectedBackground);
painter.fillRect(0, 0, width(), 2,
ColorScheme::instance().TabSelectedBackground);
ColorScheme::getInstance().TabSelectedBackground);
}
}
}
+1 -1
View File
@@ -20,7 +20,7 @@ NotebookPageDropPreview::paintEvent(QPaintEvent *)
QPainter painter(this);
painter.fillRect(8, 8, width() - 17, height() - 17,
ColorScheme::instance().DropPreviewBackground);
ColorScheme::getInstance().DropPreviewBackground);
}
void
+1 -1
View File
@@ -82,7 +82,7 @@ NotebookTab::paintEvent(QPaintEvent *)
QColor fg = QColor(0, 0, 0);
auto colorScheme = ColorScheme::instance();
auto colorScheme = ColorScheme::getInstance();
if (this->selected) {
painter.fillRect(rect(), colorScheme.TabSelectedBackground);
+1 -1
View File
@@ -80,7 +80,7 @@ void
ScrollBar::paintEvent(QPaintEvent *)
{
QPainter painter(this);
painter.fillRect(rect(), ColorScheme::instance().ScrollbarBG);
painter.fillRect(rect(), ColorScheme::getInstance().ScrollbarBG);
painter.fillRect(QRect(0, 0, width(), this->buttonHeight),
QColor(255, 0, 0));
+1 -1
View File
@@ -8,7 +8,7 @@ ScrollBarHighlight::ScrollBarHighlight(float position, int colorIndex,
Style style, QString tag)
: position(position)
, colorIndex(std::max(
0, std::min(ColorScheme::instance().HighlightColorCount, colorIndex)))
0, std::min(ColorScheme::getInstance().HighlightColorCount, colorIndex)))
, style(style)
, tag(tag)
, next(NULL)