src/hbinput/inputwidgets/hbinputbuttongroup.cpp
changeset 23 e6ad4ef83b23
parent 21 4633027730f5
child 30 80e4d18b72f5
--- a/src/hbinput/inputwidgets/hbinputbuttongroup.cpp	Wed Aug 18 10:05:37 2010 +0300
+++ b/src/hbinput/inputwidgets/hbinputbuttongroup.cpp	Thu Sep 02 20:44:51 2010 +0300
@@ -42,6 +42,7 @@
 #include <hbwidgetfeedback.h>
 #include <hbdeviceprofile.h>
 #include <hbinputregioncollector_p.h>
+#include <hbinputsettingproxy.h>
 #include "hbframedrawerpool_p.h"
 
 #include "hbinputbutton.h"
@@ -72,6 +73,7 @@
 
 const QString HbButtonPreviewColor("qtc_input_preview_normal");
 const QString HbCharacterSelectionPreviewColor("qtc_input_button_accented_normal");
+const QString HbHwrSctKeyboard("hwr_symbol_keypad");
 
 const int HbLongPressTimeout = 600;
 const int HbAutoRepeatTimeout = 100;
@@ -347,6 +349,11 @@
         qreal cellWidth = q->boundingRect().width() / mGridSize.width();
         qreal cellHeight = q->boundingRect().height() / mGridSize.height();
 
+        Qt::Orientation orientation = Qt::Horizontal;
+        if (q->mainWindow()) {
+            orientation = q->mainWindow()->orientation();
+        }
+
         // Calculate text size
         QFont font = HbFontSpec(HbFontSpec::Primary).font();
         font.setPixelSize(int(group->fontSize(HbInputButtonGroup::ButtonTextTypeLabel)));
@@ -368,6 +375,11 @@
             x = q->boundingRect().width() - width;
         }
         qreal y = item->position().y() * cellHeight - height;
+        if (y < 0 && 
+            orientation == Qt::Horizontal &&
+            q->objectName() == HbHwrSctKeyboard) {
+            y = (item->position().y() + 1)* cellHeight;
+        }
         group->setGeometry(QRectF(q->mapToScene(x, y), QSizeF(width, height)));
         if (q->parentItem()) {
             group->setZValue(q->parentItem()->zValue() + 1);
@@ -1140,9 +1152,6 @@
     resetFontSizes();
 
     setAcceptedMouseButtons(Qt::LeftButton);
-    
-    setFlag(QGraphicsItem::ItemIsPanel, true);
-    setActive(false);
 }
 
 /*!