diff options
| author | Peter Penz <[email protected]> | 2008-02-17 15:50:06 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2008-02-17 15:50:06 +0000 |
| commit | 51cbeaf512da9ebaefb0bfcaa21cca0f47d1b79d (patch) | |
| tree | edc8cfe7ed230f4b017560efff561f6626bb9e91 /src/dolphindetailsview.cpp | |
| parent | 98497a639a8ddba1bbe52ea96f54c5d40e53eef9 (diff) | |
* if the system font is changed during Dolphin is open, take care to update the used font of all views too (assuming that the user selected "system font" as font)
* store the font weight instead of a bool property "isBold"
Thanks to Rafael for the patch!
CCMAIL: [email protected]
svn path=/trunk/KDE/kdebase/apps/; revision=776188
Diffstat (limited to 'src/dolphindetailsview.cpp')
| -rw-r--r-- | src/dolphindetailsview.cpp | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/dolphindetailsview.cpp b/src/dolphindetailsview.cpp index ff4ce540f..75481fb36 100644 --- a/src/dolphindetailsview.cpp +++ b/src/dolphindetailsview.cpp @@ -120,7 +120,14 @@ DolphinDetailsView::DolphinDetailsView(QWidget* parent, DolphinController* contr connect(controller->dolphinView(), SIGNAL(additionalInfoChanged()), this, SLOT(updateColumnVisibility())); - m_font = QFont(settings->fontFamily(), settings->fontSize()); + if (settings->useSystemFont()) { + m_font = KGlobalSettings::generalFont(); + } else { + m_font = QFont(settings->fontFamily(), + settings->fontSize(), + settings->fontWeight(), + settings->italicFont()); + } // TODO: Remove this check when 4.3.2 is released and KDE requires it... this // check avoids a division by zero happening on versions before 4.3.1. @@ -134,6 +141,9 @@ DolphinDetailsView::DolphinDetailsView(QWidget* parent, DolphinController* contr updateDecorationSize(); setFocus(); + + connect(KGlobalSettings::self(), SIGNAL(kdisplayFontChanged()), + this, SLOT(updateFont())); } DolphinDetailsView::~DolphinDetailsView() @@ -549,6 +559,16 @@ void DolphinDetailsView::requestActivation() m_controller->requestActivation(); } +void DolphinDetailsView::updateFont() +{ + const DetailsModeSettings* settings = DolphinSettings::instance().detailsModeSettings(); + Q_ASSERT(settings != 0); + + if (settings->useSystemFont()) { + m_font = KGlobalSettings::generalFont(); + } +} + bool DolphinDetailsView::isZoomInPossible() const { DetailsModeSettings* settings = DolphinSettings::instance().detailsModeSettings(); |
