Add debug menu entry for reloading the stylesheets
authorManuel Nickschas <sputnick@quassel-irc.org>
Thu, 25 Jun 2009 19:22:09 +0000 (21:22 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Thu, 6 Aug 2009 18:25:05 +0000 (20:25 +0200)
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

index f405388..0bd221d 100644 (file)
@@ -72,6 +72,7 @@
 #include "qtuiapplication.h"
 #include "qtuimessageprocessor.h"
 #include "qtuisettings.h"
 #include "qtuiapplication.h"
 #include "qtuimessageprocessor.h"
 #include "qtuisettings.h"
+#include "qtuistyle.h"
 #include "settingsdlg.h"
 #include "settingspagedlg.h"
 #include "systemtray.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())));
                                        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,
 
   // 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->addAction(coll->action("DebugMessageModel"));
   _helpDebugMenu->addAction(coll->action("DebugHotList"));
   _helpDebugMenu->addAction(coll->action("DebugLog"));
+  _helpDebugMenu->addSeparator();
+  _helpDebugMenu->addAction(coll->action("ReloadStyle"));
 }
 
 void MainWin::setupBufferWidget() {
 }
 
 void MainWin::setupBufferWidget() {