debugger/texteditor: Add font and size option to debugger panels, QTCREATORBUG-189

This commit is contained in:
hjk
2010-02-12 14:15:20 +01:00
parent 4f13bac035
commit 2ba777415b
3 changed files with 30 additions and 0 deletions

View File

@@ -68,6 +68,7 @@
#include <cplusplus/CppDocument.h>
#include <cpptools/cppmodelmanagerinterface.h>
#include <qt4projectmanager/qt4projectmanagerconstants.h>
#include <texteditor/fontsettings.h>
#include <texteditor/itexteditor.h>
#include <QtCore/QDebug>
@@ -1877,6 +1878,27 @@ QDebug operator<<(QDebug d, DebuggerState state)
return d << DebuggerManager::stateName(state) << '(' << int(state) << ')';
}
static void changeFontSize(QWidget *widget, int size)
{
QFont font = widget->font();
font.setPointSize(size);
widget->setFont(font);
}
void DebuggerManager::fontSettingsChanged(const TextEditor::FontSettings &settings)
{
int size = settings.fontZoom() * settings.fontSize() / 100;
changeFontSize(d->m_localsWindow, size);
changeFontSize(d->m_watchersWindow, size);
changeFontSize(d->m_breakWindow, size);
changeFontSize(d->m_modulesWindow, size);
changeFontSize(d->m_outputWindow, size);
changeFontSize(d->m_registerWindow, size);
changeFontSize(d->m_stackWindow, size);
changeFontSize(d->m_sourceFilesWindow, size);
changeFontSize(d->m_threadsWindow, size);
}
//////////////////////////////////////////////////////////////////////
//
// AbstractDebuggerEngine