diff options
author | Sami Merila <sami.merila@nokia.com> | 2010-05-06 14:25:30 (GMT) |
---|---|---|
committer | Sami Merila <sami.merila@nokia.com> | 2010-05-06 14:25:30 (GMT) |
commit | b1be4ec9def9fda88760367cc7be61248dc53d18 (patch) | |
tree | 56e8576a06d510ad17b70ee92301f86d7c0a9f52 /util/s60pixelmetrics | |
parent | fb74c8dc2f240f9e2c4f64633917ca5bd43c22a1 (diff) | |
download | Qt-b1be4ec9def9fda88760367cc7be61248dc53d18.zip Qt-b1be4ec9def9fda88760367cc7be61248dc53d18.tar.gz Qt-b1be4ec9def9fda88760367cc7be61248dc53d18.tar.bz2 |
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
Diffstat (limited to 'util/s60pixelmetrics')
-rw-r--r-- | util/s60pixelmetrics/pixel_metrics.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/util/s60pixelmetrics/pixel_metrics.cpp b/util/s60pixelmetrics/pixel_metrics.cpp index 0fd650e..42ae850 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; |