# HG changeset patch # User Chris Cannam # Date 1197385109 0 # Node ID 1d3b27e69bf061ef02320b3e37938aab134c4976 # Parent 813170c57b13fcc4871845a85e15aa561cc527ac * Make font size in panes configurable, with a smaller default * Add [ and ] to select prev/next pane diff -r 813170c57b13 -r 1d3b27e69bf0 view/Pane.cpp --- a/view/Pane.cpp Thu Nov 29 10:43:54 2007 +0000 +++ b/view/Pane.cpp Tue Dec 11 14:58:29 2007 +0000 @@ -22,6 +22,7 @@ #include "ViewManager.h" #include "base/CommandHistory.h" #include "base/TextAbbrev.h" +#include "base/Preferences.h" #include "layer/WaveformLayer.h" //!!! ugh @@ -389,6 +390,10 @@ paint.begin(this); + QFont font(paint.font()); + font.setPointSize(Preferences::getInstance()->getViewFontSize()); + paint.setFont(font); + if (e) paint.setClipRect(r); ViewManager::ToolMode toolMode = m_manager->getToolMode(); diff -r 813170c57b13 -r 1d3b27e69bf0 view/View.cpp --- a/view/View.cpp Thu Nov 29 10:43:54 2007 +0000 +++ b/view/View.cpp Tue Dec 11 14:58:29 2007 +0000 @@ -19,6 +19,7 @@ #include "base/ZoomConstraint.h" #include "base/Profiler.h" #include "base/Pitch.h" +#include "base/Preferences.h" #include "layer/TimeRulerLayer.h" #include "layer/SingleColourLayer.h" @@ -31,6 +32,7 @@ #include #include #include +#include #include #include @@ -503,9 +505,6 @@ View::LayerProgressBar::LayerProgressBar(QWidget *parent) : QProgressBar(parent) { - QFont f(font()); - f.setPointSize(f.pointSize() * 8 / 10); - setFont(f); } void @@ -523,6 +522,9 @@ m_progressBars[layer]->setMinimum(0); m_progressBars[layer]->setMaximum(100); m_progressBars[layer]->setMinimumWidth(80); + QFont f(m_progressBars[layer]->font()); + f.setPointSize(Preferences::getInstance()->getViewFontSize()); + m_progressBars[layer]->setFont(f); m_progressBars[layer]->hide(); connect(layer, SIGNAL(layerParametersChanged()), @@ -1584,6 +1586,10 @@ if (repaintCache) paint.begin(m_cache); else paint.begin(this); + QFont font(paint.font()); + font.setPointSize(Preferences::getInstance()->getViewFontSize()); + paint.setFont(font); + paint.setClipRect(cacheRect); paint.setPen(getBackground()); @@ -1625,6 +1631,10 @@ paint.begin(this); paint.setClipRect(nonCacheRect); + QFont font(paint.font()); + font.setPointSize(Preferences::getInstance()->getViewFontSize()); + paint.setFont(font); + if (scrollables.empty()) { paint.setPen(getBackground()); paint.setBrush(getBackground());