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 = 14; |
53 const TInt KPMMinorVersion = 15; |
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; |
724 case QStyle::PM_MaximumDragDistance: |
724 case QStyle::PM_MaximumDragDistance: |
725 { |
725 { |
726 value = -1; //disable - not in S60 |
726 value = -1; //disable - not in S60 |
727 } |
727 } |
728 break; |
728 break; |
|
729 case QStyle::PM_SplitterWidth: |
729 case QStyle::PM_ScrollBarExtent: |
730 case QStyle::PM_ScrollBarExtent: |
730 { |
731 { |
731 TAknLayoutRect miscGraphicsRect; |
732 TAknLayoutRect miscGraphicsRect; |
732 miscGraphicsRect.LayoutRect( screenRect, AknLayoutScalable_Avkon::misc_graphics()); |
733 miscGraphicsRect.LayoutRect( screenRect, AknLayoutScalable_Avkon::misc_graphics()); |
733 miscGraphicsRect.LayoutRect( miscGraphicsRect.Rect(), AknLayoutScalable_Avkon::misc_graphics()); |
734 miscGraphicsRect.LayoutRect( miscGraphicsRect.Rect(), AknLayoutScalable_Avkon::misc_graphics()); |
809 case QStyle::PM_MenuHMargin: |
810 case QStyle::PM_MenuHMargin: |
810 case QStyle::PM_MenuVMargin: |
811 case QStyle::PM_MenuVMargin: |
811 value = PixelMetricMenuValue(metric, mainPaneRect); |
812 value = PixelMetricMenuValue(metric, mainPaneRect); |
812 break; |
813 break; |
813 case QStyle::PM_ButtonIconSize: |
814 case QStyle::PM_ButtonIconSize: |
|
815 { |
814 //lets use voice recorder icons as a base |
816 //lets use voice recorder icons as a base |
815 //Unfortunately S60 graphics don't separate button bevel graphics from the actual icon. |
817 //Unfortunately S60 graphics don't separate button bevel graphics from the actual icon. |
816 //Se we have no means to query the margin from bevel border to "central icon" border. |
818 //Se we have no means to query the margin from bevel border to "central icon" border. |
817 //So, we need to make a estimate... |
819 //So, we need to make a estimate... |
818 |
820 |
819 const TInt varietyForButtons = !landscape ? 0 : 1; |
|
820 |
|
821 TAknLayoutRect vRMainRect; |
821 TAknLayoutRect vRMainRect; |
822 vRMainRect.LayoutRect( mainPaneRect, AknLayoutScalable_Apps::main_vorec_pane() ); |
822 vRMainRect.LayoutRect( mainPaneRect, AknLayoutScalable_Apps::main_vorec_pane() ); |
823 |
823 |
824 TAknLayoutRect vRButtonGridRect; |
824 TAknLayoutRect vRButtonGridRect; |
825 vRButtonGridRect.LayoutRect( vRMainRect.Rect(), AknLayoutScalable_Apps::grid_vorec_pane() ); |
825 vRButtonGridRect.LayoutRect( vRMainRect.Rect(), AknLayoutScalable_Apps::grid_vorec_pane() ); |
830 TAknLayoutRect vRButtonCellGraphicsRect; |
830 TAknLayoutRect vRButtonCellGraphicsRect; |
831 vRButtonCellGraphicsRect.LayoutRect( vRButtonCellRect.Rect(), AknLayoutScalable_Apps::cell_vorec_pane_g1() ); |
831 vRButtonCellGraphicsRect.LayoutRect( vRButtonCellRect.Rect(), AknLayoutScalable_Apps::cell_vorec_pane_g1() ); |
832 |
832 |
833 // 0.32 is the estimate how much the icon occupies of the button bevel area |
833 // 0.32 is the estimate how much the icon occupies of the button bevel area |
834 value = vRButtonCellGraphicsRect.Rect().Width() * 0.32; |
834 value = vRButtonCellGraphicsRect.Rect().Width() * 0.32; |
835 |
835 } |
836 break; |
836 break; |
837 case QStyle::PM_SmallIconSize: |
837 case QStyle::PM_SmallIconSize: |
838 { |
838 { |
839 // lets use AI2 icon as a base |
839 // lets use AI2 icon as a base |
840 TAknLayoutRect idlePaneRect; |
840 TAknLayoutRect idlePaneRect; |
998 break; |
998 break; |
999 case QStyle::PM_ButtonShiftHorizontal: |
999 case QStyle::PM_ButtonShiftHorizontal: |
1000 case QStyle::PM_ButtonShiftVertical: |
1000 case QStyle::PM_ButtonShiftVertical: |
1001 value = 0; |
1001 value = 0; |
1002 break; |
1002 break; |
1003 |
1003 |
1004 case QStyle::PM_ToolBarExtensionExtent: |
1004 case QStyle::PM_ToolBarExtensionExtent: |
1005 value = PixelMetricTabValue(QStyle::PM_TabBarScrollButtonWidth, appWindow.Rect(), landscape); |
1005 value = PixelMetricTabValue(QStyle::PM_TabBarScrollButtonWidth, appWindow.Rect(), landscape); |
1006 break; |
1006 break; |
1007 |
1007 |
1008 // todo: re-check if these really are not available in s60 |
1008 // todo: re-check if these really are not available in s60 |
1014 case QStyle::PM_MenuTearoffHeight: // not in S60 |
1014 case QStyle::PM_MenuTearoffHeight: // not in S60 |
1015 case QStyle::PM_DockWidgetFrameWidth: // not in S60 |
1015 case QStyle::PM_DockWidgetFrameWidth: // not in S60 |
1016 case QStyle::PM_DockWidgetSeparatorExtent: // not in S60 |
1016 case QStyle::PM_DockWidgetSeparatorExtent: // not in S60 |
1017 case QStyle::PM_MdiSubWindowMinimizedWidth: //no such thing in S60 |
1017 case QStyle::PM_MdiSubWindowMinimizedWidth: //no such thing in S60 |
1018 case QStyle::PM_HeaderGripMargin: // not in S60 |
1018 case QStyle::PM_HeaderGripMargin: // not in S60 |
1019 case QStyle::PM_SplitterWidth: // not in S60 |
|
1020 case QStyle::PM_ToolBarSeparatorExtent: // not in S60 |
1019 case QStyle::PM_ToolBarSeparatorExtent: // not in S60 |
1021 case QStyle::PM_ToolBarHandleExtent: // not in s60 |
1020 case QStyle::PM_ToolBarHandleExtent: // not in s60 |
1022 case QStyle::PM_MenuButtonIndicator: // none??? |
1021 case QStyle::PM_MenuButtonIndicator: // none??? |
1023 case QStyle::PM_TabBar_ScrollButtonOverlap: // not used in S60 - tab arrows are on left and right side of tab group - not together |
1022 case QStyle::PM_TabBar_ScrollButtonOverlap: // not used in S60 - tab arrows are on left and right side of tab group - not together |
1024 case QStyle::PM_SizeGripSize: // use default |
1023 case QStyle::PM_SizeGripSize: // use default |