src/hbcore/gui/hbwidget.cpp
changeset 30 80e4d18b72f5
parent 23 e6ad4ef83b23
equal deleted inserted replaced
28:b7da29130b0e 30:80e4d18b72f5
   659         case QEvent::KeyRelease:
   659         case QEvent::KeyRelease:
   660             keyReleaseEvent(static_cast<QKeyEvent *>(event));
   660             keyReleaseEvent(static_cast<QKeyEvent *>(event));
   661             return true;
   661             return true;
   662 
   662 
   663         case QEvent::DynamicPropertyChange:             
   663         case QEvent::DynamicPropertyChange:             
   664             if (!qstrcmp(static_cast<QDynamicPropertyChangeEvent *>(event)->propertyName(), "state")) {
   664             if (!qstrcmp(static_cast<QDynamicPropertyChangeEvent *>(event)->propertyName(), "state") ||
       
   665                 !qstrcmp(static_cast<QDynamicPropertyChangeEvent *>(event)->propertyName(), "toolbutton_extension_layout")) {
   665                 if(!d->themingPending){
   666                 if(!d->themingPending){
   666                     style()->updateThemedParams(this);                    
   667                     style()->updateThemedParams(this);                    
   667                 }
   668                 }
   668             }
   669             }
   669             return true;
   670             return true;
   695                 return true;
   696                 return true;
   696             } else if (event->type() == HbEvent::DeviceProfileChanged) {
   697             } else if (event->type() == HbEvent::DeviceProfileChanged) {
   697                 HbDeviceProfileChangedEvent* dpEvent = static_cast<HbDeviceProfileChangedEvent*>(event);
   698                 HbDeviceProfileChangedEvent* dpEvent = static_cast<HbDeviceProfileChangedEvent*>(event);
   698                 if ( dpEvent->profile().alternateProfileName() == dpEvent->oldProfile().name() ) {
   699                 if ( dpEvent->profile().alternateProfileName() == dpEvent->oldProfile().name() ) {
   699                     // This is an orientation change event.
   700                     // This is an orientation change event.
   700                     if (style()->hasOrientationSpecificStyleRules(this)) {
   701                     if (d->polished && style()->hasOrientationSpecificStyleRules(this)) {
   701                         polishEvent();
   702                         polishEvent();
   702                     }
   703                     }
   703                 } else {
   704                 } else {
   704                     // Some other device profile event (e.g. resolution change)
   705                     // Some other device profile event (e.g. resolution change)
   705                     polishEvent();
   706                     polishEvent();
   849     Override this method if you want to do something special in polish
   850     Override this method if you want to do something special in polish
   850     (e.g. fetch some custom style parameters to your widget from style
   851     (e.g. fetch some custom style parameters to your widget from style
   851     backend). When overriding, always call the base classes 
   852     backend). When overriding, always call the base classes 
   852     impelentation.
   853     impelentation.
   853 
   854 
   854     \param params, For querying (custom) style parameters from HbStyle.
   855     \param params For querying (custom) style parameters from HbStyle.
   855 
   856 
   856     \sa polish()
   857     \sa polish()
   857 */
   858 */
   858 void HbWidget::polish( HbStyleParameters& params )
   859 void HbWidget::polish( HbStyleParameters& params )
   859 {
   860 {