48 |
48 |
49 // Version number for dynamic calculations. These are to be exported to static data, |
49 // Version number for dynamic calculations. These are to be exported to static data, |
50 // so that we can keep dynamic and static values inline. |
50 // so that we can keep dynamic and static values inline. |
51 // Please adjust version data if correcting dynamic PM calculations. |
51 // Please adjust version data if correcting dynamic PM calculations. |
52 const TInt KPMMajorVersion = 1; |
52 const TInt KPMMajorVersion = 1; |
53 const TInt KPMMinorVersion = 16; |
53 const TInt KPMMinorVersion = 17; |
54 |
54 |
55 TPixelMetricsVersion PixelMetrics::Version() |
55 TPixelMetricsVersion PixelMetrics::Version() |
56 { |
56 { |
57 TPixelMetricsVersion version; |
57 TPixelMetricsVersion version; |
58 version.majorVersion = KPMMajorVersion; |
58 version.majorVersion = KPMMajorVersion; |
867 highlightRect.LayoutRect(listSinglePane.Rect(), AknLayoutScalable_Avkon::list_highlight_pane_cp1().LayoutLine()); |
867 highlightRect.LayoutRect(listSinglePane.Rect(), AknLayoutScalable_Avkon::list_highlight_pane_cp1().LayoutLine()); |
868 |
868 |
869 // The difference of center piece from border tell the frame width. |
869 // The difference of center piece from border tell the frame width. |
870 if ( value == QStyle::PM_FocusFrameHMargin) |
870 if ( value == QStyle::PM_FocusFrameHMargin) |
871 { |
871 { |
872 //use topleft for horizontal as S60 uses different values for right and left borders |
872 //use topleft for horizontal as S60 uses different values for right and left borders |
873 value = listSinglePaneText.TextRect().iTl.iX - highlightRect.Rect().iTl.iX; |
873 value = listSinglePaneText.TextRect().iTl.iX - highlightRect.Rect().iTl.iX; |
874 } |
874 } |
875 else |
875 else |
876 { |
876 { |
877 value = highlightRect.Rect().iBr.iY - listSinglePaneText.TextRect().iBr.iY; |
877 value = highlightRect.Rect().iBr.iY - listSinglePaneText.TextRect().iBr.iY; |
1001 value = 3; |
1001 value = 3; |
1002 break; |
1002 break; |
1003 case QStyle::PM_Custom_ThinLineWidth: |
1003 case QStyle::PM_Custom_ThinLineWidth: |
1004 value = 1; |
1004 value = 1; |
1005 break; |
1005 break; |
|
1006 case QStyle::PM_Custom_MessageBoxHeight: |
|
1007 { |
|
1008 TAknLayoutRect popupRect; |
|
1009 popupRect.LayoutRect(mainPaneRect, AknLayoutScalable_Avkon::popup_window_general(0)); |
|
1010 value = popupRect.Rect().Height(); |
|
1011 } |
|
1012 break; |
1006 case QStyle::PM_ButtonShiftHorizontal: |
1013 case QStyle::PM_ButtonShiftHorizontal: |
1007 case QStyle::PM_ButtonShiftVertical: |
1014 case QStyle::PM_ButtonShiftVertical: |
1008 value = 0; |
1015 value = 0; |
1009 break; |
1016 break; |
1010 |
1017 |
1011 case QStyle::PM_ToolBarExtensionExtent: |
1018 case QStyle::PM_ToolBarExtensionExtent: |
1012 value = PixelMetricTabValue(QStyle::PM_TabBarScrollButtonWidth, appWindow.Rect(), landscape); |
1019 value = PixelMetricTabValue(QStyle::PM_TabBarScrollButtonWidth, appWindow.Rect(), landscape); |
|
1020 break; |
|
1021 |
|
1022 case QStyle::PM_MenuScrollerHeight: |
|
1023 value = 0; |
1013 break; |
1024 break; |
1014 |
1025 |
1015 // todo: re-check if these really are not available in s60 |
1026 // todo: re-check if these really are not available in s60 |
1016 case QStyle::PM_MenuDesktopFrameWidth: // not needed in S60 - dislocates Menu both horizontally and vertically |
1027 case QStyle::PM_MenuDesktopFrameWidth: // not needed in S60 - dislocates Menu both horizontally and vertically |
1017 case QStyle::PM_HeaderMarkSize: // The size of the sort indicator in a header. Not in S60 |
1028 case QStyle::PM_HeaderMarkSize: // The size of the sort indicator in a header. Not in S60 |
1018 case QStyle::PM_SpinBoxSliderHeight: // The height of the optional spin box slider. Not in S60 |
1029 case QStyle::PM_SpinBoxSliderHeight: // The height of the optional spin box slider. Not in S60 |
1019 case QStyle::PM_HeaderMargin: // not in S60 |
1030 case QStyle::PM_HeaderMargin: // not in S60 |
1020 case QStyle::PM_MenuScrollerHeight: // not in S60 |
|
1021 case QStyle::PM_MenuTearoffHeight: // not in S60 |
1031 case QStyle::PM_MenuTearoffHeight: // not in S60 |
1022 case QStyle::PM_DockWidgetFrameWidth: // not in S60 |
1032 case QStyle::PM_DockWidgetFrameWidth: // not in S60 |
1023 case QStyle::PM_DockWidgetSeparatorExtent: // not in S60 |
1033 case QStyle::PM_DockWidgetSeparatorExtent: // not in S60 |
1024 case QStyle::PM_MdiSubWindowMinimizedWidth: //no such thing in S60 |
1034 case QStyle::PM_MdiSubWindowMinimizedWidth: //no such thing in S60 |
1025 case QStyle::PM_HeaderGripMargin: // not in S60 |
1035 case QStyle::PM_HeaderGripMargin: // not in S60 |