some fixes for linux

This commit is contained in:
fourtf 2018-04-13 22:50:19 +02:00
parent 79b4511104
commit 2c5d05dfa1
3 changed files with 14 additions and 4 deletions

View file

@ -96,8 +96,6 @@ void runNativeMessagingHost()
_setmode(_fileno(stdout), _O_BINARY); _setmode(_fileno(stdout), _O_BINARY);
#endif #endif
std::ofstream xD("C:\Users\daniel\Desktop\1");
auto &nmm = chatterino::singletons::NativeMessagingManager::getInstance(); auto &nmm = chatterino::singletons::NativeMessagingManager::getInstance();
while (true) { while (true) {

View file

@ -69,7 +69,13 @@ void ThemeManager::actuallyUpdate(double hue, double multiplier)
/// WINDOW /// WINDOW
{ {
QColor bg = this->window.background = lightWin ? "#fff" : "#444"; QColor bg =
#ifdef Q_OS_LINUX
this->window.background = lightWin ? "#fff" : QColor(61, 60, 56);
#else
this->window.background = lightWin ? "#fff" : "#444";
#endif
QColor fg = this->window.text = lightWin ? "#000" : "#eee"; QColor fg = this->window.text = lightWin ? "#000" : "#eee";
this->window.borderFocused = lightWin ? "#ccc" : themeColor; this->window.borderFocused = lightWin ? "#ccc" : themeColor;
this->window.borderUnfocused = lightWin ? "#ccc" : themeColorNoSat; this->window.borderUnfocused = lightWin ? "#ccc" : themeColorNoSat;

View file

@ -168,7 +168,6 @@ void BaseWindow::themeRefreshEvent()
{ {
if (this->enableCustomFrame) { if (this->enableCustomFrame) {
QPalette palette; QPalette palette;
// palette.setColor(QPalette::Background, this->themeManager.window.background);
palette.setColor(QPalette::Background, QColor(0, 0, 0, 0)); palette.setColor(QPalette::Background, QColor(0, 0, 0, 0));
palette.setColor(QPalette::Foreground, this->themeManager.window.text); palette.setColor(QPalette::Foreground, this->themeManager.window.text);
this->setPalette(palette); this->setPalette(palette);
@ -177,6 +176,11 @@ void BaseWindow::themeRefreshEvent()
button->setMouseEffectColor(this->themeManager.window.text); button->setMouseEffectColor(this->themeManager.window.text);
} }
} }
QPalette palette;
palette.setColor(QPalette::Background, this->themeManager.window.background);
palette.setColor(QPalette::Foreground, this->themeManager.window.text);
this->setPalette(palette);
} }
void BaseWindow::addTitleBarButton(const TitleBarButton::Style &style, void BaseWindow::addTitleBarButton(const TitleBarButton::Style &style,
@ -216,6 +220,8 @@ void BaseWindow::changeEvent(QEvent *)
: TitleBarButton::Maximize); : TitleBarButton::Maximize);
} }
#endif #endif
this->update();
} }
void BaseWindow::leaveEvent(QEvent *) void BaseWindow::leaveEvent(QEvent *)