Index: /trunk/src/VBox/Debugger/VBoxDbgConsole.cpp
===================================================================
--- /trunk/src/VBox/Debugger/VBoxDbgConsole.cpp	(revision 52001)
+++ /trunk/src/VBox/Debugger/VBoxDbgConsole.cpp	(revision 52002)
@@ -30,4 +30,5 @@
 #include <QAction>
 #include <QContextMenuEvent>
+#include <QMenu>
 
 #include <VBox/dbg.h>
@@ -68,4 +69,107 @@
     setAcceptRichText(false);
 
+    /*
+     * Font.
+     * Create actions for font menu items.
+     */
+    m_pCourierFontAction = new QAction(tr("Courier"), this);
+    m_pCourierFontAction->setCheckable(true);
+    m_pCourierFontAction->setShortcut(Qt::ControlModifier + Qt::Key_D);
+    connect(m_pCourierFontAction, SIGNAL(triggered()), this, SLOT(setFontCourier()));
+
+    m_pMonospaceFontAction = new QAction(tr("Monospace"), this);
+    m_pMonospaceFontAction->setCheckable(true);
+    m_pMonospaceFontAction->setShortcut(Qt::ControlModifier + Qt::Key_M);
+    connect(m_pMonospaceFontAction, SIGNAL(triggered()), this, SLOT(setFontMonospace()));
+
+    /* Create action group for grouping of exclusive font menu items. */
+    QActionGroup *pActionFontGroup = new QActionGroup(this);
+    pActionFontGroup->addAction(m_pCourierFontAction);
+    pActionFontGroup->addAction(m_pMonospaceFontAction);
+    pActionFontGroup->setExclusive(true);
+
+    /*
+     * Color scheme.
+     * Create actions for color-scheme menu items.
+     */
+    m_pGreenOnBlackAction = new QAction(tr("Green On Black"), this);
+    m_pGreenOnBlackAction->setCheckable(true);
+    m_pGreenOnBlackAction->setShortcut(Qt::ControlModifier + Qt::Key_1);
+    connect(m_pGreenOnBlackAction, SIGNAL(triggered()), this, SLOT(setColorGreenOnBlack()));
+
+    m_pBlackOnWhiteAction = new QAction(tr("Black On White"), this);
+    m_pBlackOnWhiteAction->setCheckable(true);
+    m_pBlackOnWhiteAction->setShortcut(Qt::ControlModifier + Qt::Key_2);
+    connect(m_pBlackOnWhiteAction, SIGNAL(triggered()), this, SLOT(setColorBlackOnWhite()));
+
+    /* Create action group for grouping of exclusive color-scheme menu items. */
+    QActionGroup *pActionColorGroup = new QActionGroup(this);
+    pActionColorGroup->addAction(m_pGreenOnBlackAction);
+    pActionColorGroup->addAction(m_pBlackOnWhiteAction);
+    pActionColorGroup->setExclusive(true);
+
+    /*
+     * Set the defaults (which syncs with the menu item checked state).
+     */
+    setFontCourier();
+    setColorGreenOnBlack();
+
+    NOREF(pszName);
+}
+
+
+VBoxDbgConsoleOutput::~VBoxDbgConsoleOutput()
+{
+    Assert(m_hGUIThread == RTThreadNativeSelf());
+}
+
+
+void
+VBoxDbgConsoleOutput::contextMenuEvent(QContextMenuEvent *pEvent)
+{
+    /*
+     * Create the context menu and add the menu items.
+     */
+    QMenu *pMenu = createStandardContextMenu();
+    QMenu *pColorMenu = pMenu->addMenu(tr("Co&lor Scheme"));
+    pColorMenu->addAction(m_pGreenOnBlackAction);
+    pColorMenu->addAction(m_pBlackOnWhiteAction);
+
+    QMenu *pFontMenu = pMenu->addMenu(tr("&Font Family"));
+    pFontMenu->addAction(m_pCourierFontAction);
+    pFontMenu->addAction(m_pMonospaceFontAction);
+
+    pMenu->exec(pEvent->globalPos());
+    delete pMenu;
+}
+
+
+void
+VBoxDbgConsoleOutput::setColorGreenOnBlack()
+{
+    setStyleSheet("QTextEdit { background-color: black; color: rgb(0, 224, 0) }");
+    m_enmColorScheme = kGreenOnBlack;
+
+    /* This is used both as a trigger as well as called independently from code.
+       When used as a trigger, the checked is done automatically by Qt. */
+    if (!m_pGreenOnBlackAction->isChecked())
+        m_pGreenOnBlackAction->setChecked(true);
+}
+
+
+void
+VBoxDbgConsoleOutput::setColorBlackOnWhite()
+{
+    setStyleSheet("QTextEdit { background-color: white; color: black }");
+    m_enmColorScheme = kBlackOnWhite;
+
+    if (!m_pBlackOnWhiteAction->isChecked())
+        m_pBlackOnWhiteAction->setChecked(true);
+}
+
+
+void
+VBoxDbgConsoleOutput::setFontCourier()
+{
 #ifdef Q_WS_MAC
     QFont Font("Monaco", 10, QFont::Normal, FALSE);
@@ -78,28 +182,20 @@
     setFont(Font);
 
-    /* green on black */
-    QPalette Pal(palette());
-    Pal.setColor(QPalette::All, QPalette::Base, QColor(Qt::black));
-    setPalette(Pal);
-    setTextColor(QColor(qRgb(0, 0xe0, 0)));
-
-#ifdef DEBUG_ramshankar
-    /* Solaris host (esp. S10) has illegible Courier font (bad aliasing). */
+    if (!m_pCourierFontAction->isChecked())
+        m_pCourierFontAction->setChecked(true);
+}
+
+
+void
+VBoxDbgConsoleOutput::setFontMonospace()
+{
+    QFont Font = font();
+    Font.setStyleHint(QFont::TypeWriter);
+    Font.setStyleStrategy(QFont::PreferAntialias);
     Font.setFamily("Monospace [Monotype]");
     setFont(Font);
 
-    /* White on black while I'm at it. */
-    Pal.setColor(QPalette::All, QPalette::Base, QColor(Qt::white));
-    setPalette(Pal);
-    setTextColor(QColor(qRgb(0, 0, 0)));
-#endif
-
-    NOREF(pszName);
-}
-
-
-VBoxDbgConsoleOutput::~VBoxDbgConsoleOutput()
-{
-    Assert(m_hGUIThread == RTThreadNativeSelf());
+    if (!m_pMonospaceFontAction->isChecked())
+        m_pMonospaceFontAction->setChecked(true);
 }
 
@@ -366,4 +462,9 @@
     addAction(m_pFocusToOutput);
     connect(m_pFocusToOutput, SIGNAL(triggered(bool)), this, SLOT(actFocusToOutput()));
+
+    addAction(m_pOutput->m_pBlackOnWhiteAction);
+    addAction(m_pOutput->m_pGreenOnBlackAction);
+    addAction(m_pOutput->m_pCourierFontAction);
+    addAction(m_pOutput->m_pMonospaceFontAction);
 }
 
Index: /trunk/src/VBox/Debugger/VBoxDbgConsole.h
===================================================================
--- /trunk/src/VBox/Debugger/VBoxDbgConsole.h	(revision 52001)
+++ /trunk/src/VBox/Debugger/VBoxDbgConsole.h	(revision 52002)
@@ -61,5 +61,25 @@
     virtual void appendText(const QString &rStr, bool fClearSelection);
 
-protected:
+    /** The action to switch to black-on-white color scheme. */
+    QAction *m_pBlackOnWhiteAction;
+    /** The action to switch to green-on-black color scheme. */
+    QAction *m_pGreenOnBlackAction;
+
+    /** The action to switch to Courier font. */
+    QAction *m_pCourierFontAction;
+    /** The action to switch to Monospace font. */
+    QAction *m_pMonospaceFontAction;
+
+protected:
+    typedef enum  { kGreenOnBlack, kBlackOnWhite } VBoxDbgConsoleColor;
+
+    /**
+     * Context menu event.
+     * This adds custom menu items for the output view.
+     *
+     * @param pEvent   Pointer to the event.
+     */
+    virtual void contextMenuEvent(QContextMenuEvent *pEvent);
+
     /** The current line (paragraph) number. */
     unsigned m_uCurLine;
@@ -68,4 +88,27 @@
     /** The handle to the GUI thread. */
     RTNATIVETHREAD m_hGUIThread;
+    /** The current color scheme (foreground on background). */
+    VBoxDbgConsoleColor m_enmColorScheme;
+
+private slots:
+    /**
+     * The green-on-black color scheme context-menu item was triggered.
+     */
+    void        setColorGreenOnBlack();
+
+    /**
+     * The black-on-white color scheme context-menu item was triggered.
+     */
+    void        setColorBlackOnWhite();
+
+    /**
+     * The courier font family context-menu item was triggered.
+     */
+    void        setFontCourier();
+
+    /**
+     * The monospace font family context-menu item was triggered.
+     */
+    void        setFontMonospace();
 };
 
