From 6c767761ae2389912d8bc6668caf253e0e6cc136 Mon Sep 17 00:00:00 2001 From: Rik Hemsley Date: Sat, 23 Sep 2000 19:58:45 +0000 Subject: [PATCH] pick fonts in the same way as kglobalsettings - this should fix letters being chopped at the bottom svn path=/trunk/kdebase/kwin/; revision=64838 --- options.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/options.cpp b/options.cpp index b8956dc53d..50a6965752 100644 --- a/options.cpp +++ b/options.cpp @@ -9,6 +9,7 @@ Copyright (C) 1999, 2000 Matthias Ettrich #include #include #include +#include Options::Options() : QObject( 0, 0) @@ -118,11 +119,16 @@ void Options::reload() colors[Font+KWINCOLORS] = config->readColorEntry("inactiveForeground", &colors[Font+KWINCOLORS]); - activeFont = QFont("Helvetica", 12, QFont::Bold); - activeFont = config->readFontEntry("activeFont", &activeFont); - inactiveFont = config->readFontEntry("inactiveFont", &activeFont); + // Keep in sync with kglobalsettings. - activeFontSmall = QFont("Helvetica", 10, QFont::Bold); + QFont activeFontGuess("helvetica", 12, QFont::SansSerif, true); + activeFontGuess.setPixelSize(12); + + activeFont = config->readFontEntry("activeFont", &activeFontGuess); + inactiveFont = config->readFontEntry("inactiveFont", &activeFontGuess); + + activeFontSmall = activeFont; + activeFontSmall.setPointSize(activeFont.pointSize() - 2); activeFontSmall = config->readFontEntry("activeFontSmall", &activeFontSmall); inactiveFontSmall = config->readFontEntry("inactiveFontSmall", &activeFontSmall);