Summary: | size of country code string in flag is resolution dependant | ||
---|---|---|---|
Product: | kcontrol | Reporter: | Magnus Kessler <magnus.kessler> |
Component: | kcmkeyboard | Assignee: | Patrick Dowler <dowler> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 2.0 | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: | Patch for drawing the country code string with a fixed pixel size |
Description
Magnus Kessler
2002-11-20 02:23:37 UTC
Created attachment 489 [details]
Patch for drawing the country code string with a fixed pixel size
since the flag has a fixed pixel size, so should the string displayed on it
Subject: kdebase/kxkb CVS commit by danimo: Applying suggested fix for 50962 by Magnus Kessler Fixes "size of country code string in flag is resolution dependant" (kicker applet) CCMAIL:50962-done@bugs.kde.org M +8 -2 pixmap.cpp 1.27 --- kdebase/kxkb/pixmap.cpp #1.26:1.27 @@ -74,5 +74,8 @@ const QPixmap& findPixmap(const QString& || code_ == "dvorak" ) { code = code.left(3); - p.setFont(QFont("helvetica", 9, QFont::Bold)); + QFont font("sans"); + font.setPixelSize(10); + font.setWeight(QFont::Bold); + p.setFont(font); p.setPen(Qt::black); p.drawText(2, 1, pm->width(), pm->height()-2, Qt::AlignCenter, code); @@ -82,5 +85,8 @@ const QPixmap& findPixmap(const QString& else { code = code.left(pos).right(3); - p.setFont(QFont("helvetica", 10, QFont::Bold)); + QFont font("sans"); + font.setPixelSize(10); + font.setWeight(QFont::Bold); + p.setFont(font); p.setPen(Qt::black); p.drawText(1, 1, pm->width(), pm->height()-2, Qt::AlignCenter, code); |