Changeset 865 for trunk/src/gui/kernel/qwidget_s60.cpp
- Timestamp:
- May 16, 2011, 4:09:34 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.3 (added) merged: 864 /branches/vendor/nokia/qt/current merged: 863 /branches/vendor/nokia/qt/4.7.2 removed
- Property svn:mergeinfo changed
-
trunk/src/gui/kernel/qwidget_s60.cpp
r846 r865 1185 1185 1186 1186 #ifdef Q_WS_S60 1187 bool decorationsVisible(false); 1188 if (!parentWidget()) { // Only top level native windows have control over cba/status pane 1189 // Hide window decoration when switching to fullscreen / minimized otherwise show decoration. 1190 // The window decoration visibility has to be changed before doing actual window state 1191 // change since in that order the availableGeometry will return directly the right size and 1192 // we will avoid unnecessary redraws 1193 decorationsVisible = !(newstate & (Qt::WindowFullScreen | Qt::WindowMinimized)); 1194 const bool statusPaneVisibility = decorationsVisible; 1195 const bool buttonGroupVisibility = (decorationsVisible || (isFullscreen && cbaRequested)); 1196 S60->setStatusPaneAndButtonGroupVisibility(statusPaneVisibility, buttonGroupVisibility); 1197 } 1187 // Hide window decoration when switching to fullscreen / minimized otherwise show decoration. 1188 // The window decoration visibility has to be changed before doing actual window state 1189 // change since in that order the availableGeometry will return directly the right size and 1190 // we will avoid unnecessary redraws 1191 Qt::WindowStates comparisonState = newstate; 1192 QWidget *parentWindow = parentWidget(); 1193 if (parentWindow) { 1194 while (parentWindow->parentWidget()) 1195 parentWindow = parentWindow->parentWidget(); 1196 comparisonState = parentWindow->windowState(); 1197 } else { 1198 parentWindow = this; 1199 } 1200 1201 const bool decorationsVisible = !(comparisonState & (Qt::WindowFullScreen | Qt::WindowMinimized)); 1202 const bool parentIsFullscreen = comparisonState & Qt::WindowFullScreen; 1203 const bool parentCbaVisibilityHint = parentWindow->windowFlags() & Qt::WindowSoftkeysVisibleHint; 1204 bool buttonGroupVisibility = (decorationsVisible || (parentIsFullscreen && parentCbaVisibilityHint)); 1205 1206 // For non-toplevel normal and maximized windows, show cba if window has softkey 1207 // actions even if topmost parent is not showing cba. Do the same for fullscreen 1208 // windows that request it. 1209 if (!buttonGroupVisibility 1210 && parentWidget() 1211 && !(newstate & Qt::WindowMinimized) 1212 && ((windowFlags() & Qt::WindowSoftkeysVisibleHint) || !(newstate & Qt::WindowFullScreen))) { 1213 for (int i = 0; i < actions().size(); ++i) { 1214 if (actions().at(i)->softKeyRole() != QAction::NoSoftKey) { 1215 buttonGroupVisibility = true; 1216 break; 1217 } 1218 } 1219 } 1220 S60->setStatusPaneAndButtonGroupVisibility(decorationsVisible, buttonGroupVisibility); 1221 1198 1222 #endif // Q_WS_S60 1199 1223
Note:
See TracChangeset
for help on using the changeset viewer.