From ef316d0db50a39efe45d71fe2eb4ea880724526b Mon Sep 17 00:00:00 2001 From: Manuel Nickschas Date: Thu, 25 Jun 2009 21:22:09 +0200 Subject: [PATCH] Add debug menu entry for reloading the stylesheets Hitting the Refresh key (commonly F5) will now reload the stylesheets and repaint ChatViews. Use this to test color combination without restarting the client all the time. --- src/qtui/mainwin.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/qtui/mainwin.cpp b/src/qtui/mainwin.cpp index f405388b..0bd221d4 100644 --- a/src/qtui/mainwin.cpp +++ b/src/qtui/mainwin.cpp @@ -72,6 +72,7 @@ #include "qtuiapplication.h" #include "qtuimessageprocessor.h" #include "qtuisettings.h" +#include "qtuistyle.h" #include "settingsdlg.h" #include "settingspagedlg.h" #include "systemtray.h" @@ -318,6 +319,8 @@ void MainWin::setupActions() { this, SLOT(on_actionDebugHotList_triggered()))); coll->addAction("DebugLog", new Action(SmallIcon("tools-report-bug"), tr("Debug &Log"), coll, this, SLOT(on_actionDebugLog_triggered()))); + coll->addAction("ReloadStyle", new Action(SmallIcon("view-refresh"), tr("Reload Stylesheet"), coll, + QtUi::style(), SLOT(loadStyleSheet()), QKeySequence::Refresh)); // Navigation coll->addAction("JumpHotBuffer", new Action(tr("Jump to hot buffer"), coll, @@ -382,6 +385,8 @@ void MainWin::setupMenus() { _helpDebugMenu->addAction(coll->action("DebugMessageModel")); _helpDebugMenu->addAction(coll->action("DebugHotList")); _helpDebugMenu->addAction(coll->action("DebugLog")); + _helpDebugMenu->addSeparator(); + _helpDebugMenu->addAction(coll->action("ReloadStyle")); } void MainWin::setupBufferWidget() { -- 2.20.1