equal
deleted
inserted
replaced
1 /**************************************************************************** |
1 /**************************************************************************** |
2 ** |
2 ** |
3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). |
3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
4 ** All rights reserved. |
4 ** All rights reserved. |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
6 ** |
6 ** |
7 ** This file is part of the QtGui module of the Qt Toolkit. |
7 ** This file is part of the QtGui module of the Qt Toolkit. |
8 ** |
8 ** |
2067 // font may not have any "hard" flags set. We override |
2067 // font may not have any "hard" flags set. We override |
2068 // the point size so that when it is resolved against the device, this font will win. |
2068 // the point size so that when it is resolved against the device, this font will win. |
2069 // This is mainly to handle cases where someone sets the font on the window |
2069 // This is mainly to handle cases where someone sets the font on the window |
2070 // and then the combo inherits it and passes it onward. At that point the resolve mask |
2070 // and then the combo inherits it and passes it onward. At that point the resolve mask |
2071 // is very, very weak. This makes it stonger. |
2071 // is very, very weak. This makes it stonger. |
2072 font.setPointSizeF(menuItem->font.pointSizeF()); |
2072 font.setPointSizeF(QFontInfo(menuItem->font).pointSizeF()); |
2073 |
2073 |
2074 if (menuitem->menuItemType == QStyleOptionMenuItem::DefaultItem) |
2074 if (menuitem->menuItemType == QStyleOptionMenuItem::DefaultItem) |
2075 font.setBold(true); |
2075 font.setBold(true); |
2076 |
2076 |
2077 p->setFont(font); |
2077 p->setFont(font); |