From b1be4ec9def9fda88760367cc7be61248dc53d18 Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Thu, 6 May 2010 17:25:30 +0300 Subject: QS60Style: Sliders are too small Sometime back slider graphic in the QS60Style was changed to use the "new" slider graphic available in 5th Edition and newer SDKs (the old SDKs still use the slider graphic). However, at that time nobody noticed that the new slider has different size than the old one in the Nokia LAF document. To fix the sliders, updated the pixel metrics calculation rules to use the new slider LAF data. Also fixed a grpahic start and end part rounding to match native look. Task-number: QTBUG-10454 Reviewed-by: Alessandro Portale --- util/s60pixelmetrics/pixel_metrics.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'util') diff --git a/util/s60pixelmetrics/pixel_metrics.cpp b/util/s60pixelmetrics/pixel_metrics.cpp index 0fd650e5b6..42ae850aa1 100644 --- a/util/s60pixelmetrics/pixel_metrics.cpp +++ b/util/s60pixelmetrics/pixel_metrics.cpp @@ -50,7 +50,7 @@ // so that we can keep dynamic and static values inline. // Please adjust version data if correcting dynamic PM calculations. const TInt KPMMajorVersion = 1; -const TInt KPMMinorVersion = 18; +const TInt KPMMinorVersion = 19; TPixelMetricsVersion PixelMetrics::Version() { @@ -468,7 +468,7 @@ TInt PixelMetrics::PixelMetricValue(QStyle::PixelMetric metric) TAknLayoutRect sliderSettingRect; sliderSettingRect.LayoutRect( sliderRect.Rect(), AknLayoutScalable_Avkon::slider_set_pane_cp() ); TAknLayoutRect sliderGraph2Rect; - sliderGraph2Rect.LayoutRect( sliderSettingRect.Rect(), AknLayoutScalable_Avkon::slider_set_pane_g2() ); + sliderGraph2Rect.LayoutRect( sliderSettingRect.Rect(), AknLayoutScalable_Avkon::slider_set_pane_g6() ); value = sliderGraph2Rect.Rect().Width(); } break; @@ -483,7 +483,8 @@ TInt PixelMetrics::PixelMetricValue(QStyle::PixelMetric metric) TAknLayoutRect sliderSettingRect; sliderSettingRect.LayoutRect( sliderRect.Rect(), AknLayoutScalable_Avkon::slider_set_pane_cp() ); TAknLayoutRect sliderGraph2Rect; - sliderGraph2Rect.LayoutRect( sliderSettingRect.Rect(), AknLayoutScalable_Avkon::slider_set_pane_g2() ); + sliderGraph2Rect.LayoutRect( sliderSettingRect.Rect(), AknLayoutScalable_Avkon::slider_set_pane_g6() ); + //todo: make a proper calculation for tick marks value = (TInt)(sliderGraph2Rect.Rect().Height()*1.5); // add assumed tickmark height } break; @@ -498,7 +499,8 @@ TInt PixelMetrics::PixelMetricValue(QStyle::PixelMetric metric) TAknLayoutRect sliderSettingRect; sliderSettingRect.LayoutRect( sliderRect.Rect(), AknLayoutScalable_Avkon::slider_set_pane_cp() ); TAknLayoutRect sliderGraph2Rect; - sliderGraph2Rect.LayoutRect( sliderSettingRect.Rect(), AknLayoutScalable_Avkon::slider_set_pane_g2() ); + sliderGraph2Rect.LayoutRect( sliderSettingRect.Rect(), AknLayoutScalable_Avkon::slider_set_pane_g6() ); + //todo: make a proper calculation for tick marks value = (TInt)(sliderGraph2Rect.Rect().Height()*0.5); // no tickmarks in S60, lets assume they are half the size of slider indicator } break; @@ -513,7 +515,7 @@ TInt PixelMetrics::PixelMetricValue(QStyle::PixelMetric metric) TAknLayoutRect sliderSettingRect; sliderSettingRect.LayoutRect( sliderRect.Rect(), AknLayoutScalable_Avkon::slider_set_pane_cp() ); TAknLayoutRect sliderGraph2Rect; - sliderGraph2Rect.LayoutRect( sliderSettingRect.Rect(), AknLayoutScalable_Avkon::slider_set_pane_g2() ); + sliderGraph2Rect.LayoutRect( sliderSettingRect.Rect(), AknLayoutScalable_Avkon::slider_set_pane_g6() ); value = sliderGraph2Rect.Rect().Height(); } break; -- cgit v1.2.3