┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphindetailsview.cpp
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2008-02-17 15:50:06 +0000
committerPeter Penz <[email protected]>2008-02-17 15:50:06 +0000
commit51cbeaf512da9ebaefb0bfcaa21cca0f47d1b79d (patch)
treeedc8cfe7ed230f4b017560efff561f6626bb9e91 /src/dolphindetailsview.cpp
parent98497a639a8ddba1bbe52ea96f54c5d40e53eef9 (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.cpp22
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();