Summary: | Konsole should use KGlobalSettings::fixedFont(); instead of "fixed" | ||
---|---|---|---|
Product: | [Applications] konsole | Reporter: | Heinrich Wendel <heinrich.wendel> |
Component: | general | Assignee: | Konsole Developer <konsole-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Heinrich Wendel
2005-02-08 18:12:13 UTC
Perhaps this is a bug? I wonder if unicode should be changed... Index: konsole.cpp =================================================================== RCS file: /home/kde/kdebase/konsole/konsole/konsole.cpp,v retrieving revision 1.505 diff -u -p -r1.505 konsole.cpp --- konsole.cpp 2 Feb 2005 07:03:49 -0000 1.505 +++ konsole.cpp 8 Feb 2005 17:56:26 -0000 @@ -1534,9 +1534,7 @@ void Konsole::readProperties(KConfig* co // Options that should be applied to all sessions ///////////// // (1) set menu items and Konsole members - QFont tmpFont("fixed"); - tmpFont.setFixedPitch(true); - tmpFont.setStyleHint(QFont::TypeWriter); + QFont tmpFont = KGlobalSettings::fixedFont(); defaultFont = config->readFontEntry("defaultfont", &tmpFont); //set the schema @@ -1804,10 +1802,7 @@ void Konsole::setFont(int fontno) } else { - QFont f; - f.setFamily("fixed"); - f.setFixedPitch(true); - f.setStyleHint(QFont::TypeWriter); + QFont f = KGlobalSettings::fixedFont(); f.setPixelSize(QString(fonts[fontno]).toInt()); te->setVTFont(f); } This patch works fine for the font. But what about the size. Maybe medium,small,big... should be relative to the default setting like in konqueror? Ahh yea, I see what you mean. Hmmm.... if the user had 'Cursor 15' as the Fixed font, the 15 is ignored by Konsole. I think removing the Font's submenu ("normal, tiny, ..., linux, unicode, custom") completly and opening the customs menu when clicking on Fonts would be the cleanest solution. and what about konsole_part.cpp? The redesigning of the Font submenus will have to be KDE4.0 thing. I agree that having a 'smaller' and 'larger' items make sense. Should this above patch be applied for 3.4? and also konsole_part? Yeah, the patch is fine for me. Redesigning the Font submenu (i.e. removing it) wouldn't require String changes, so maybe it's still possible. CVS commit by hindenburg: Use KGlobalSettings::fixedFont(); note that the size is currently ignored. CCBUGS: 98865 M +3 -7 konsole.cpp 1.506 M +3 -7 konsole_part.cpp 1.102 --- kdebase/konsole/konsole/konsole.cpp #1.505:1.506 @@ -1535,7 +1535,6 @@ void Konsole::readProperties(KConfig* co // (1) set menu items and Konsole members - QFont tmpFont("fixed"); - tmpFont.setFixedPitch(true); - tmpFont.setStyleHint(QFont::TypeWriter); + // TODO: Use font size in fixedFont() + QFont tmpFont = KGlobalSettings::fixedFont(); defaultFont = config->readFontEntry("defaultfont", &tmpFont); @@ -1805,8 +1804,5 @@ void Konsole::setFont(int fontno) else { - QFont f; - f.setFamily("fixed"); - f.setFixedPitch(true); - f.setStyleHint(QFont::TypeWriter); + QFont f = KGlobalSettings::fixedFont(); f.setPixelSize(QString(fonts[fontno]).toInt()); te->setVTFont(f); --- kdebase/konsole/konsole/konsole_part.cpp #1.101:1.102 @@ -562,7 +562,6 @@ void konsolePart::readProperties() n_encoding = config->readNumEntry("encoding",0); - QFont tmpFont("fixed"); - tmpFont.setFixedPitch(true); - tmpFont.setStyleHint(QFont::TypeWriter); + // TODO: Use font size in fixedFont() + QFont tmpFont = KGlobalSettings::fixedFont(); defaultFont = config->readFontEntry("defaultfont", &tmpFont); setFont(QMIN(config->readUnsignedNumEntry("font",3),TOPFONT)); @@ -703,8 +702,5 @@ void konsolePart::setFont(int fontno) else { - QFont f; - f.setFamily("fixed"); - f.setFixedPitch(true); - f.setStyleHint(QFont::TypeWriter); + QFont f = KGlobalSettings::fixedFont(); f.setPixelSize(QString(fonts[fontno]).toInt()); te->setVTFont(f); ok, after the big freeze... What about my Proposal to remove the Font's SubmenuItems and just open the Custom dialog when clicking on it? Check out http://bugs.kde.org/show_bug.cgi?id=100930. ok, please mark this one as duplicate then Fixed as far as using fixedFont(). see #100930. |