From 4fed80ce97654adec3baf73d26c21b0967937e83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sami=20Meril=C3=A4?= Date: Mon, 25 May 2009 13:56:50 +0300 Subject: S60Style: Try to guesstime resolution, if no exact match is found. --- src/gui/styles/qs60style_symbian.cpp | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/src/gui/styles/qs60style_symbian.cpp b/src/gui/styles/qs60style_symbian.cpp index d29e678..48b759a 100644 --- a/src/gui/styles/qs60style_symbian.cpp +++ b/src/gui/styles/qs60style_symbian.cpp @@ -962,9 +962,8 @@ QFont QS60StylePrivate::s60Font_specific( #ifdef QT_S60STYLE_LAYOUTDATA_SIMULATED void QS60StylePrivate::setActiveLayout() { - //todo: how to find layouts that are of same size (QVGA1 vs. QVGA2) const QSize activeScreenSize(screenSize()); - int activeLayoutIndex = 0; + int activeLayoutIndex = -1; const bool mirrored = !QApplication::isLeftToRight(); const short screenHeight = (short)activeScreenSize.height(); const short screenWidth = (short)activeScreenSize.width(); @@ -976,6 +975,28 @@ void QS60StylePrivate::setActiveLayout() break; } } + + //not found, lets try without mirroring info + if (activeLayoutIndex==-1){ + for (int i=0; i