Changeset 642


Ignore:
Timestamp:
Mar 6, 2010, 12:32:46 AM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

gui: Use native file icons in standard Qt file dialogs.

Location:
trunk/src/gui
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gui/itemviews/qfileiconprovider.cpp

    r620 r642  
    9999#ifdef Q_WS_WIN
    100100    QIcon getWinIcon(const QFileInfo &fi) const;
     101
     102
    101103#elif defined(Q_WS_MAC)
    102104    QIcon getMacIcon(const QFileInfo &fi) const;
     
    319321}
    320322
     323
     324
     325
     326
     327
     328
     329
     330
     331
     332
     333
     334
     335
     336
     337
     338
     339
     340
     341
     342
     343
     344
     345
     346
     347
     348
     349
     350
     351
     352
     353
     354
     355
     356
     357
     358
     359
     360
     361
     362
     363
     364
     365
     366
     367
     368
    321369#elif defined(Q_WS_MAC)
    322370QIcon QFileIconProviderPrivate::getMacIcon(const QFileInfo &fi) const
     
    410458    if (!icon.isNull())
    411459        return icon;
     460
     461
     462
     463
     464
     465
    412466#endif
    413467    if (info.isRoot())
  • trunk/src/gui/styles/qcommonstyle.cpp

    r561 r642  
    8989#endif
    9090
     91
     92
     93
     94
    9195QT_BEGIN_NAMESPACE
    9296
     
    30383042        if (const QStyleOptionToolBar *tbopt = qstyleoption_cast<const QStyleOptionToolBar *>(opt)) {
    30393043            if (tbopt->features & QStyleOptionToolBar::Movable) {
    3040                 ///we need to access the widget here because the style option doesn't 
     3044                ///we need to access the widget here because the style option doesn't
    30413045                //have all the information we need (ie. the layout's margin)
    30423046                const QToolBar *tb = qobject_cast<const QToolBar*>(widget);
     
    46684672        break;
    46694673
     4674
     4675
     4676
     4677
     4678
     4679
     4680
     4681
     4682
     4683
    46704684    case PM_ButtonIconSize:
    46714685    case PM_SmallIconSize:
    46724686        ret = int(QStyleHelper::dpiScaled(16.));
    46734687        break;
     4688
    46744689    case PM_IconViewIconSize:
    46754690        ret = proxy()->pixelMetric(PM_LargeIconSize, opt, widget);
     
    46774692
    46784693    case PM_LargeIconSize:
     4694
     4695
     4696
     4697
     4698
     4699
    46794700        ret = int(QStyleHelper::dpiScaled(32.));
     4701
    46804702        break;
    46814703
     
    59545976        break;
    59555977    }
     5978
     5979
     5980
     5981
     5982
     5983
     5984
     5985
     5986
     5987
     5988
     5989
     5990
     5991
     5992
     5993
     5994
     5995
     5996
     5997
     5998
     5999
     6000
     6001
     6002
     6003
     6004
     6005
     6006
     6007
     6008
     6009
     6010
     6011
     6012
     6013
     6014
     6015
     6016
     6017
     6018
     6019
     6020
     6021
     6022
     6023
     6024
     6025
     6026
     6027
     6028
     6029
     6030
     6031
     6032
     6033
     6034
     6035
     6036
     6037
     6038
     6039
     6040
     6041
     6042
     6043
     6044
     6045
     6046
     6047
     6048
     6049
    59566050    return icon;
    59576051}
  • trunk/src/gui/styles/qwindowsstyle.cpp

    r561 r642  
    438438
    439439    case PM_SmallIconSize:
     440
     441
     442
     443
    440444        ret = int(QStyleHelper::dpiScaled(16.));
    441445        break;
    442446
    443447    case PM_LargeIconSize:
     448
     449
     450
     451
    444452        ret = int(QStyleHelper::dpiScaled(32.));
    445453        break;
     
    13901398            QPixmap pixmap;
    13911399            QString pixmapName = QStyleHelper::uniqueName(QLatin1String("$qt_ia-") + QLatin1String(metaObject()->className()), opt, QSize(size, size))
    1392                   + QLatin1Char('-') + QString::number(pe);                               
     1400                  + QLatin1Char('-') + QString::number(pe);
    13931401            if (!QPixmapCache::find(pixmapName, pixmap)) {
    13941402                int border = size/5;
Note: See TracChangeset for help on using the changeset viewer.