author | zecke <zecke> | 2004-02-29 15:40:12 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-02-29 15:40:12 (UTC) |
commit | f8e1f2c5201f7e86abaa7365040d919e2afcd2ae (patch) (unidiff) | |
tree | a0ef1ee60b28c4918d31d947c303103fc2a447b3 | |
parent | a731ace5bdbef2354209c655805ebac5298dc2df (diff) | |
download | opie-f8e1f2c5201f7e86abaa7365040d919e2afcd2ae.zip opie-f8e1f2c5201f7e86abaa7365040d919e2afcd2ae.tar.gz opie-f8e1f2c5201f7e86abaa7365040d919e2afcd2ae.tar.bz2 |
Hehe Fix the #ifdef properly.... gives me my fonts back
-rw-r--r-- | core/apps/embeddedkonsole/konsole.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/core/apps/embeddedkonsole/konsole.cpp b/core/apps/embeddedkonsole/konsole.cpp index 2c0001f..eafc12e 100644 --- a/core/apps/embeddedkonsole/konsole.cpp +++ b/core/apps/embeddedkonsole/konsole.cpp | |||
@@ -417,34 +417,32 @@ void Konsole::init(const char* _pgm, QStrList & _args) | |||
417 | for(uint i = 0; i < (uint)sizes.count() + 4; i++) | 417 | for(uint i = 0; i < (uint)sizes.count() + 4; i++) |
418 | { | 418 | { |
419 | // printf("family %s size %d ", familyNames[j].latin1(), sizes[i]); | 419 | // printf("family %s size %d ", familyNames[j].latin1(), sizes[i]); |
420 | // need to divide by 10 on the Z, but not otherwise | 420 | // need to divide by 10 on the Z, but not otherwise |
421 | int size; | 421 | int size; |
422 | 422 | ||
423 | if (i >= (uint)sizes.count()) | 423 | if (i >= (uint)sizes.count()) |
424 | { | 424 | { |
425 | // try for expandable fonts | 425 | // try for expandable fonts |
426 | size = sizes[sizes.count()-1] + 2 * (i - sizes.count() + 1); | 426 | size = sizes[sizes.count()-1] + 2 * (i - sizes.count() + 1); |
427 | } | 427 | } |
428 | else | 428 | else |
429 | { | 429 | { |
430 | printf("sizes[%d] = %d\n", i, sizes[i]); | 430 | printf("sizes[%d] = %d\n", i, sizes[i]); |
431 | size = sizes[i]; | 431 | size = sizes[i]; |
432 | } | 432 | } |
433 | // a hack, sizes on Z seem to be points*10 | ||
434 | size /= 10; | ||
435 | 433 | ||
436 | f = QFont(familyNames[j], size); | 434 | f = QFont(familyNames[j], size); |
437 | f.setFixedPitch(true); | 435 | f.setFixedPitch(true); |
438 | QFontMetrics fm(f); | 436 | QFontMetrics fm(f); |
439 | // don't trust f.fixedPitch() or f.exactMatch(), they lie!! | 437 | // don't trust f.fixedPitch() or f.exactMatch(), they lie!! |
440 | if (fm.width("l") == fm.width("m") | 438 | if (fm.width("l") == fm.width("m") |
441 | && (i < (uint)sizes.count() | 439 | && (i < (uint)sizes.count() |
442 | || fm.width("m") > last_width)) | 440 | || fm.width("m") > last_width)) |
443 | { | 441 | { |
444 | if (i < (uint)sizes.count()) | 442 | if (i < (uint)sizes.count()) |
445 | { | 443 | { |
446 | last_width = fm.width("m"); | 444 | last_width = fm.width("m"); |
447 | } | 445 | } |
448 | if (sizeMenu == NULL) | 446 | if (sizeMenu == NULL) |
449 | { | 447 | { |
450 | sizeMenu = new QPopupMenu(); | 448 | sizeMenu = new QPopupMenu(); |