[Kde-cygwin-cvs] CVS: qt-3/src/kernel qapplication_win.cpp,1.1.2.30.2.96,1.1.2.30.2.97 qfont_win.cpp
Status: Inactive
Brought to you by:
habacker
From: Christian E. <che...@us...> - 2005-10-27 19:15:39
|
Update of /cvsroot/kde-cygwin/qt-3/src/kernel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14344/src/kernel Modified Files: Tag: QT_WIN32_3_3_BRANCH qapplication_win.cpp qfont_win.cpp qfontdatabase_win.cpp Log Message: small fixes - standard font should now choosed correct Index: qapplication_win.cpp =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/src/kernel/Attic/qapplication_win.cpp,v retrieving revision 1.1.2.30.2.96 retrieving revision 1.1.2.30.2.97 diff -u -r1.1.2.30.2.96 -r1.1.2.30.2.97 --- qapplication_win.cpp 26 Oct 2005 20:36:56 -0000 1.1.2.30.2.96 +++ qapplication_win.cpp 27 Oct 2005 19:15:29 -0000 1.1.2.30.2.97 @@ -509,16 +509,14 @@ smallTitleFont = qt_LOGFONTtoQFont((LOGFONT&)ncm.lfSmCaptionFont,true); }); - QApplication::setFont(menuFont, true, "QMenuBar"); - QApplication::setFont(menuFont, true, "QMenuData"); -// QApplication::setFont(menuFont, true, "QPopupMenu"); -// QApplication::setFont(menuFont, true, "QPushButton"); - QApplication::setFont(messageFont, true, "QMessageBox"); -// QApplication::setFont(messageFont, true, "QMessageBoxLabel"); - QApplication::setFont(statusFont, true, "QTipLabel"); - QApplication::setFont(statusFont, true, "QStatusBar"); - QApplication::setFont(titleFont, true, "QTitleBar"); - QApplication::setFont(smallTitleFont, true, "QDockWidgetTitle"); + QApplication::setFont(menuFont, true, "QMenuBar"); // ok + QApplication::setFont(menuFont, true, "QMenuData"); // ok (win2k only?) + QApplication::setFont(menuFont, true, "QPopupMenu"); // ok (winxp) + QApplication::setFont(messageFont, true, "QMessageBox"); // ok + QApplication::setFont(statusFont, true, "QTipLabel"); // ok + QApplication::setFont(statusFont, true, "QStatusBar"); // ?? + QApplication::setFont(titleFont, true, "QTitleBar"); // ok + QApplication::setFont(smallTitleFont, true, "QDockWindowTitleBar"); // I think ok #else LOGFONT lf; HGDIOBJ stockFont = GetStockObject(SYSTEM_FONT); @@ -583,6 +581,8 @@ if (GetObjectA(hfont, sizeof(lf), &lf)) f = qt_LOGFONTtoQFont((LOGFONT&)lf,true); }); + // lf.familyName is MS Shell Dlg which is somewhat wrong ... + f.setFamily("MS Sans Serif"); QApplication::setFont(f); } qt_set_windows_resources(); @@ -2881,11 +2881,15 @@ QApplication::postEvent( widget, new QEvent( QEvent::LocaleChange ) ); } if (QApplication::desktopSettingsAware() && wParam != SPI_SETWORKAREA) { - if (widget) { - widget->markFrameStrutDirty(); - if (!widget->parentWidget()) - qt_set_windows_resources(); - } + widget->markFrameStrutDirty(); + if (!widget->parentWidget()) + qt_set_windows_resources(); + } + break; + case WM_SYSCOLORCHANGE: + if (QApplication::desktopSettingsAware()) { + if (!widget->parentWidget()) + qt_set_windows_resources(); } break; Index: qfont_win.cpp =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/src/kernel/Attic/qfont_win.cpp,v retrieving revision 1.1.2.16.2.13 retrieving revision 1.1.2.16.2.14 diff -u -r1.1.2.16.2.13 -r1.1.2.16.2.14 --- qfont_win.cpp 25 Oct 2005 19:42:13 -0000 1.1.2.16.2.13 +++ qfont_win.cpp 27 Oct 2005 19:15:29 -0000 1.1.2.16.2.14 @@ -293,7 +293,7 @@ QStringList::ConstIterator it = family_list.begin(), end = family_list.end(); for ( ; ! engine && it != end; ++it ) { req.family = *it; - qDebug("calling findFont with %s for %d",req.family.latin1(),script); + //qDebug("calling findFont with %s for %d",req.family.latin1(),script); engine = QFontDatabase::findFont( script, this, req ); if ( engine ) { if ( engine->type() != QFontEngine::Box ) Index: qfontdatabase_win.cpp =================================================================== RCS file: /cvsroot/kde-cygwin/qt-3/src/kernel/Attic/qfontdatabase_win.cpp,v retrieving revision 1.1.2.6.2.23 retrieving revision 1.1.2.6.2.24 diff -u -r1.1.2.6.2.23 -r1.1.2.6.2.24 --- qfontdatabase_win.cpp 25 Oct 2005 19:42:14 -0000 1.1.2.6.2.23 +++ qfontdatabase_win.cpp 27 Oct 2005 19:15:29 -0000 1.1.2.6.2.24 @@ -9,7 +9,7 @@ ** Copyright (C) 2003 Ivan de Jesus Deras Tabora ** Copyright (C) 2004 Ralf Habacker ** Copyright (C) 2004 Peter Kuemmel -** Copyright (C) 2004 Christian Ehrlicher +** Copyright (C) 2004, 2005 Christian Ehrlicher ** ** This file is part of the kernel module of the Qt GUI Toolkit. ** @@ -550,7 +550,9 @@ if (!hasScript) family->scripts[QFont::UnknownScript] = QtFontFamily::Supported; // qDebug("usb=%08x %08x csb=%08x for %s", signature.fsUsb[0], signature.fsUsb[1], signature.fsCsb[0], familyName.latin1()); - } + } else { + family->scripts[QFont::UnknownScript] = QtFontFamily::Supported; + } } return 1; } @@ -610,6 +612,7 @@ populate_database(QString()); // don't know why I have to do this... + // but when I don't, the fonts set with QApplication::setFont() don't work for (int f = 0; f < db->count; f++) { QtFontFamily *family = db->families[f]; populate_database(family->name); |