skin: change H/W key button from text button to image button
authorjihye <jihye424.kim@samsung.com>
Thu, 17 Nov 2016 09:29:07 +0000 (18:29 +0900)
committerjihye <jihye424.kim@samsung.com>
Wed, 1 Feb 2017 10:41:11 +0000 (19:41 +0900)
- remove scroll bar

Change-Id: I5541caf83662895750651e5512b890334345c31c
Signed-off-by: jihye <jihye424.kim@samsung.com>
60 files changed:
tizen/src/ui/controller/dockingconview.cpp
tizen/src/ui/controller/floatingconview.cpp
tizen/src/ui/controller/generalpurposecon.cpp
tizen/src/ui/controller/generalpurposecon.h
tizen/src/ui/controller/hwkeybutton.cpp
tizen/src/ui/controller/hwkeybutton.h
tizen/src/ui/resource/images/controller-skin/BC.png [deleted file]
tizen/src/ui/resource/images/controller-skin/Back_hover.png [new file with mode: 0644]
tizen/src/ui/resource/images/controller-skin/Back_normal.png [new file with mode: 0644]
tizen/src/ui/resource/images/controller-skin/Back_pushed.png [new file with mode: 0644]
tizen/src/ui/resource/images/controller-skin/Control Panel_hover.png [new file with mode: 0644]
tizen/src/ui/resource/images/controller-skin/Control Panel_normal.png [new file with mode: 0644]
tizen/src/ui/resource/images/controller-skin/Control Panel_pushed.png [new file with mode: 0644]
tizen/src/ui/resource/images/controller-skin/Home_hover.png [new file with mode: 0644]
tizen/src/ui/resource/images/controller-skin/Home_normal.png [new file with mode: 0644]
tizen/src/ui/resource/images/controller-skin/Home_pushed.png [new file with mode: 0644]
tizen/src/ui/resource/images/controller-skin/LB.png [deleted file]
tizen/src/ui/resource/images/controller-skin/LC.png [deleted file]
tizen/src/ui/resource/images/controller-skin/LT.png [deleted file]
tizen/src/ui/resource/images/controller-skin/Menu_hover.png [new file with mode: 0644]
tizen/src/ui/resource/images/controller-skin/Menu_normal.png [new file with mode: 0644]
tizen/src/ui/resource/images/controller-skin/Menu_pushed.png [new file with mode: 0644]
tizen/src/ui/resource/images/controller-skin/Power_hover.png [new file with mode: 0644]
tizen/src/ui/resource/images/controller-skin/Power_normal.png [new file with mode: 0644]
tizen/src/ui/resource/images/controller-skin/Power_pushed.png [new file with mode: 0644]
tizen/src/ui/resource/images/controller-skin/RB.png [deleted file]
tizen/src/ui/resource/images/controller-skin/RC.png [deleted file]
tizen/src/ui/resource/images/controller-skin/RT.png [deleted file]
tizen/src/ui/resource/images/controller-skin/Rotate_hover.png [new file with mode: 0644]
tizen/src/ui/resource/images/controller-skin/Rotate_normal.png [new file with mode: 0644]
tizen/src/ui/resource/images/controller-skin/Rotate_pushed.png [new file with mode: 0644]
tizen/src/ui/resource/images/controller-skin/Screen Shot_hover.png [new file with mode: 0644]
tizen/src/ui/resource/images/controller-skin/Screen Shot_normal.png [new file with mode: 0644]
tizen/src/ui/resource/images/controller-skin/Screen Shot_pushed.png [new file with mode: 0644]
tizen/src/ui/resource/images/controller-skin/Shell_hover.png [new file with mode: 0644]
tizen/src/ui/resource/images/controller-skin/Shell_normal.png [new file with mode: 0644]
tizen/src/ui/resource/images/controller-skin/Shell_pushed.png [new file with mode: 0644]
tizen/src/ui/resource/images/controller-skin/TC.png [deleted file]
tizen/src/ui/resource/images/controller-skin/VolumeDown_hover.png [new file with mode: 0644]
tizen/src/ui/resource/images/controller-skin/VolumeDown_normal.png [new file with mode: 0644]
tizen/src/ui/resource/images/controller-skin/VolumeDown_pushed.png [new file with mode: 0644]
tizen/src/ui/resource/images/controller-skin/VolumeUp_hover.png [new file with mode: 0644]
tizen/src/ui/resource/images/controller-skin/VolumeUp_normal.png [new file with mode: 0644]
tizen/src/ui/resource/images/controller-skin/VolumeUp_pushed.png [new file with mode: 0644]
tizen/src/ui/resource/images/controller-skin/keybutton_hover.png
tizen/src/ui/resource/images/controller-skin/keybutton_normal.png
tizen/src/ui/resource/images/controller-skin/keybutton_pushed.png
tizen/src/ui/resource/images/controller-skin/scroll_back.png [deleted file]
tizen/src/ui/resource/images/controller-skin/scroll_button_down_hover.png [deleted file]
tizen/src/ui/resource/images/controller-skin/scroll_button_down_normal.png [deleted file]
tizen/src/ui/resource/images/controller-skin/scroll_button_down_pushed.png [deleted file]
tizen/src/ui/resource/images/controller-skin/scroll_button_up_hover.png [deleted file]
tizen/src/ui/resource/images/controller-skin/scroll_button_up_normal.png [deleted file]
tizen/src/ui/resource/images/controller-skin/scroll_button_up_pushed.png [deleted file]
tizen/src/ui/resource/images/controller-skin/scroll_thumb.png [deleted file]
tizen/src/ui/resource/resource.qrc
tizen/src/ui/resource/skins/mobile/mobile-general-3btn/controller/key-window/layout.xml
tizen/src/ui/skinpainter.cpp
tizen/src/ui/skinpainter.h
tizen/src/ui/xmllayoutparser.cpp

index 9953eda..98a0328 100644 (file)
@@ -55,10 +55,9 @@ void DockingConView::createItems(ControllerForm *conForm)
     bezelItem = createBezelItem(NULL, conForm);
     scene()->addItem(bezelItem);
 
-    /* HW keys */
-    QList<HardwareKey *> &keyList = conForm->getKeyList();
-
     if (conForm->isGeneralPurpose() == false) {
+        /* HW keys */
+        QList<HardwareKey *> &keyList = conForm->getKeyList();
         HardwareKey *hwKey = NULL;
         for (int i = 0; i < keyList.count(); i++) {
             hwKey = keyList.at(i);
@@ -67,12 +66,9 @@ void DockingConView::createItems(ControllerForm *conForm)
             }
         }
     } else {
-        GeneralPurposeCon *generalCon = new GeneralPurposeCon(parentWidget(), keyList,
-            QSize(conForm->getCenteralRect().width(),
-                conForm->getCenteralRect().height() - GPC_HEAD_SPACING));
-
-        QPoint topLeft = conForm->getCenteralRect().topLeft();
-        generalCon->move(topLeft.x(), topLeft.y() + GPC_HEAD_SPACING);
+        GeneralPurposeCon *generalCon = new GeneralPurposeCon();
+        QList<HWKeyButton *> buttons
+                    = generalCon->createButtons(parentWidget(), conForm);
     }
 }
 
index 8e093ab..bf38d32 100644 (file)
@@ -55,10 +55,9 @@ void FloatingConView::createItems(ControllerForm *conForm)
     bezelItem = createBezelItem(NULL, conForm);
     scene()->addItem(bezelItem);
 
-    /* HW keys */
-    QList<HardwareKey *> &keyList = conForm->getKeyList();
-
     if (conForm->isGeneralPurpose() == false) {
+        /* HW keys */
+        QList<HardwareKey *> &keyList = conForm->getKeyList();
         HardwareKey *hwKey = NULL;
         for (int i = 0; i < keyList.count(); i++) {
             hwKey = keyList.at(i);
@@ -67,15 +66,9 @@ void FloatingConView::createItems(ControllerForm *conForm)
             }
         }
     } else {
-        QSize conSize(conForm->getCenteralRect().width(),
-            conForm->getCenteralRect().height() - (GPC_HEAD_SPACING + GPC_TAIL_SPACING));
-
-        GeneralPurposeCon *generalCon =
-            new GeneralPurposeCon(parentWidget(), keyList, conSize);
-
-        generalCon->resize(conSize);
-        const QPoint topLeft = conForm->getCenteralRect().topLeft();
-        generalCon->move(topLeft.x(), topLeft.y() + GPC_HEAD_SPACING);
+        GeneralPurposeCon *generalCon = new GeneralPurposeCon();
+        QList<HWKeyButton *> buttons
+                    = generalCon->createButtons(parentWidget(), conForm);
     }
 }
 
index aa155de..aacb467 100644 (file)
 #include "config-host.h"
 
 #include "generalpurposecon.h"
-#include "hwkeybutton.h"
 #include "resource/ui_strings.h"
 
-GeneralPurposeCon::GeneralPurposeCon(QWidget *parent,
-    QList<HardwareKey *> keyList, QSize size) : QWidget(parent)
+GeneralPurposeCon::GeneralPurposeCon()
 {
-    setStyleSheet("background-color: rgb(38, 38, 38)");
-
-    createItems(keyList, size);
+    qDebug("create general purpose controller");
 }
 
-void GeneralPurposeCon::createItems(QList<HardwareKey *> keyList, QSize size)
+QList<HWKeyButton *> GeneralPurposeCon::createButtons(QWidget *parent, ControllerForm *form)
 {
-    QWidget *buttonGroup = new QWidget(this);
-    buttonGroup->setStyleSheet(STYLE_TOOLTIP);
+    QPoint topLeft = form->getCenteralRect().topLeft();
+    topLeft.setX(topLeft.x() + GPC_LEFT_SPACING);
+    topLeft.setY(topLeft.y() + GPC_HEAD_SPACING);
 
-    QVBoxLayout *layout = new QVBoxLayout(buttonGroup);
-    layout->setMargin(0);
+    QList<HWKeyButton *> buttonList;
+    // H/W key list
+    createKeyList(parent, form->getKeyList(), topLeft, buttonList);
 
-    layout->setSpacing(GPC_KEYBUTTON_VSPACING);
+    return buttonList;
+}
 
+void GeneralPurposeCon::createKeyList(QWidget *parent, QList<HardwareKey *> keyList, QPoint topLeft, QList<HWKeyButton *> &buttonList)
+{
     HardwareKey *hwKey = NULL;
     HWKeyButton *keyButton = NULL;
+
     for (int i = 0; i < keyList.count(); i++) {
         hwKey = keyList.at(i);
         if (hwKey != NULL) {
-            keyButton = new HWKeyButton(buttonGroup, hwKey,
-                QSize(GPC_KEYBUTTON_WIDTH, GPC_KEYBUTTON_HEIGHT));
-
+            keyButton = new HWKeyButton(parent, hwKey,
+                    QSize(GPC_KEYBUTTON_WIDTH, GPC_KEYBUTTON_HEIGHT));
             QString tooltip = hwKey->getTooltip();
             if (tooltip.isEmpty() == true) {
                 if (hwKey->getKeySequence().isEmpty() == false) {
                     tooltip = hwKey->getKeySequence().toString();
-#ifdef CONFIG_DARWIN
+                #ifdef CONFIG_DARWIN
                     tooltip.replace(XML_QT_METAKEY_STRING, XML_QT_CTRLKEY_STRING);
-#endif
+                #endif
                 }
             }
-            keyButton->setToolTip(tooltip);
 
-            layout->addWidget(keyButton);
+            keyButton->setToolTip(hwKey->getName() + "  " + tooltip);
+            keyButton->move(topLeft.x(), topLeft.y()
+                   + (GPC_KEYBUTTON_VSPACING + GPC_KEYBUTTON_HEIGHT) * i);
+            buttonList.append(keyButton);
         }
     }
-
-    QScrollArea *scrollArea = new QScrollArea(this);
-    scrollArea->setFocusPolicy(Qt::NoFocus);
-    scrollArea->setFrameShape(QFrame::NoFrame);
-    scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
-
-    scrollArea->verticalScrollBar()->setStyleSheet(
-        "QScrollBar:vertical {"
-            "width: " + QString::number(GPC_SCROLLBAR_WIDTH) + ";" +
-            "margin: 14px 0px 14px 0px;"
-            "background-color: black;"
-        "}"
-        "QScrollBar::handle:vertical {"
-            "min-height: 24px;"
-            "margin: 0px 2px 0px 2px;"
-            "background-color: QLinearGradient(x1: 1, y1: 0, x2: 0, y2: 0," +
-            "stop: 0 #3C3C3C, stop: 1 #737373);"
-            "border-radius: 3px;"
-        "}"
-        "QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {"
-            "background: none;"
-        "}"
-        "QScrollBar::add-line:vertical {"
-            "background-color: black;"
-            "subcontrol-position: bottom;"
-            "subcontrol-origin: margin;"
-            "height: 14px;"
-        "}"
-        "QScrollBar::sub-line:vertical {"
-            "background-color: black;"
-            "subcontrol-position: top;"
-            "subcontrol-origin: margin;"
-            "height: 14px;"
-        "}"
-        "QScrollBar::up-arrow:vertical {"
-            "image: url(\":images/controller-skin/scroll_button_up_normal.png\");"
-            "border-width: 0px;"
-        "}"
-        "QScrollBar::up-arrow:vertical:hover {"
-            "image: url(\":images/controller-skin/scroll_button_up_hover.png\");"
-        "}"
-        "QScrollBar::up-arrow:vertical:pressed {"
-            "image: url(\":images/controller-skin/scroll_button_up_pushed.png\");"
-        "}"
-        "QScrollBar::down-arrow:vertical {"
-            "image: url(\":images/controller-skin/scroll_button_down_normal.png\");"
-        "}"
-        "QScrollBar::down-arrow:vertical:hover {"
-            "image: url(\":images/controller-skin/scroll_button_down_hover.png\");"
-        "}"
-        "QScrollBar::down-arrow:vertical:pressed {"
-            "image: url(\":images/controller-skin/scroll_button_down_pushed.png\");"
-        "}"
-        );
-
-    scrollArea->setWidget(buttonGroup);
-    scrollArea->resize(size);
 }
 
 GeneralPurposeCon::~GeneralPurposeCon()
index 2df81af..44b263d 100644 (file)
 #ifndef GENERALPURPOSECON_H
 #define GENERALPURPOSECON_H
 
-#include <QVBoxLayout>
-#include <QScrollArea>
-#include <QScrollBar>
-
 #include "layout/hardwarekey.h"
+#include "controller/hwkeybutton.h"
+#include "layout/controllerform.h"
 
-#define GPC_HEAD_SPACING (14)
-#define GPC_TAIL_SPACING (3)
-#define GPC_KEYBUTTON_WIDTH (104)
-#define GPC_KEYBUTTON_HEIGHT (29)
-#define GPC_KEYBUTTON_VSPACING (7)
-#define GPC_KEYBUTTON_DEFAULT_CNT (6)
-#define GPC_SCROLLBAR_WIDTH (0)
-#define GPC_SCROLLBAR_HSPACING (4)
+#define GPC_HEAD_SPACING (8)
+#define GPC_LEFT_SPACING (8)
+#define GPC_TAIL_SPACING (8)
+#define GPC_KEYBUTTON_WIDTH (35)
+#define GPC_KEYBUTTON_HEIGHT (35)
+#define GPC_KEYBUTTON_VSPACING (15)
+#define GPC_KEYBUTTON_HSPACING (15)
 
-class GeneralPurposeCon : public QWidget
+class GeneralPurposeCon
 {
+
 public:
-    GeneralPurposeCon(QWidget *parent,
-        QList<HardwareKey *> keyList, QSize size);
+    GeneralPurposeCon();
     ~GeneralPurposeCon();
+    QList<HWKeyButton *> createButtons(QWidget *parent, ControllerForm *form);
 
 private:
-    void createItems(QList<HardwareKey *> keyList, QSize size);
+    void createKeyList(QWidget *parent, QList<HardwareKey *> keyList, QPoint topLeft, QList<HWKeyButton *> &buttonList);
 };
 
 #endif // GENERALPURPOSECON_H
index d9f2b43..5b81849 100644 (file)
@@ -41,31 +41,28 @@ HWKeyButton::HWKeyButton(QWidget *parent, HardwareKey *hwKey, QSize size) :
 {
     this->hwKey = hwKey;
 
+    setText("");
     setFocusPolicy(Qt::NoFocus);
     setStyleSheet(
         "QPushButton {"
             "width: " + QString::number(size.width()) + ";" +
             "height: " + QString::number(size.height()) + ";" +
             "border: none; color: white;"
-            "background: url(\":images/controller-skin/keybutton_normal.png\");"
+            "background: url(\":images/controller-skin/" + hwKey->getName() +"_normal.png\");"
         "}"
         "QPushButton:hover {"
-            "background: url(\":images/controller-skin/keybutton_hover.png\");"
+            "background: url(\":images/controller-skin/" + hwKey->getName() +"_hover.png\");"
         "}"
         "QPushButton:pressed {"
-            "background: url(\":images/controller-skin/keybutton_pushed.png\");"
+            "background: url(\":images/controller-skin/" + hwKey->getName() +"_pushed.png\");"
+        "}"
+        "QToolTip {"
+            "color:#2E2E2E; background-color:#CCCCCC;"
         "}"
     );
 }
 
 /* override */
-void HWKeyButton::showEvent(QShowEvent *event)
-{
-    // keep 10% space for margin
-    setText(fontMetrics().elidedText(text(), Qt::ElideRight, width() * 0.9));
-}
-
-/* override */
 void HWKeyButton::mousePressEvent(QMouseEvent *event)
 {
     const int keycode = hwKey->getKeycode();
index 790789f..b758c26 100644 (file)
@@ -42,7 +42,6 @@ public:
     ~HWKeyButton();
 
 protected:
-    void showEvent(QShowEvent *event);
     void mousePressEvent(QMouseEvent *event);
     void mouseReleaseEvent(QMouseEvent *event);
 
diff --git a/tizen/src/ui/resource/images/controller-skin/BC.png b/tizen/src/ui/resource/images/controller-skin/BC.png
deleted file mode 100644 (file)
index 7f79e11..0000000
Binary files a/tizen/src/ui/resource/images/controller-skin/BC.png and /dev/null differ
diff --git a/tizen/src/ui/resource/images/controller-skin/Back_hover.png b/tizen/src/ui/resource/images/controller-skin/Back_hover.png
new file mode 100644 (file)
index 0000000..bbaf37a
Binary files /dev/null and b/tizen/src/ui/resource/images/controller-skin/Back_hover.png differ
diff --git a/tizen/src/ui/resource/images/controller-skin/Back_normal.png b/tizen/src/ui/resource/images/controller-skin/Back_normal.png
new file mode 100644 (file)
index 0000000..a03f8ae
Binary files /dev/null and b/tizen/src/ui/resource/images/controller-skin/Back_normal.png differ
diff --git a/tizen/src/ui/resource/images/controller-skin/Back_pushed.png b/tizen/src/ui/resource/images/controller-skin/Back_pushed.png
new file mode 100644 (file)
index 0000000..4908336
Binary files /dev/null and b/tizen/src/ui/resource/images/controller-skin/Back_pushed.png differ
diff --git a/tizen/src/ui/resource/images/controller-skin/Control Panel_hover.png b/tizen/src/ui/resource/images/controller-skin/Control Panel_hover.png
new file mode 100644 (file)
index 0000000..f4e75b4
Binary files /dev/null and b/tizen/src/ui/resource/images/controller-skin/Control Panel_hover.png differ
diff --git a/tizen/src/ui/resource/images/controller-skin/Control Panel_normal.png b/tizen/src/ui/resource/images/controller-skin/Control Panel_normal.png
new file mode 100644 (file)
index 0000000..ef58d07
Binary files /dev/null and b/tizen/src/ui/resource/images/controller-skin/Control Panel_normal.png differ
diff --git a/tizen/src/ui/resource/images/controller-skin/Control Panel_pushed.png b/tizen/src/ui/resource/images/controller-skin/Control Panel_pushed.png
new file mode 100644 (file)
index 0000000..c1dcf37
Binary files /dev/null and b/tizen/src/ui/resource/images/controller-skin/Control Panel_pushed.png differ
diff --git a/tizen/src/ui/resource/images/controller-skin/Home_hover.png b/tizen/src/ui/resource/images/controller-skin/Home_hover.png
new file mode 100644 (file)
index 0000000..0ed1f11
Binary files /dev/null and b/tizen/src/ui/resource/images/controller-skin/Home_hover.png differ
diff --git a/tizen/src/ui/resource/images/controller-skin/Home_normal.png b/tizen/src/ui/resource/images/controller-skin/Home_normal.png
new file mode 100644 (file)
index 0000000..2c96f75
Binary files /dev/null and b/tizen/src/ui/resource/images/controller-skin/Home_normal.png differ
diff --git a/tizen/src/ui/resource/images/controller-skin/Home_pushed.png b/tizen/src/ui/resource/images/controller-skin/Home_pushed.png
new file mode 100644 (file)
index 0000000..9b8675c
Binary files /dev/null and b/tizen/src/ui/resource/images/controller-skin/Home_pushed.png differ
diff --git a/tizen/src/ui/resource/images/controller-skin/LB.png b/tizen/src/ui/resource/images/controller-skin/LB.png
deleted file mode 100644 (file)
index 89d0126..0000000
Binary files a/tizen/src/ui/resource/images/controller-skin/LB.png and /dev/null differ
diff --git a/tizen/src/ui/resource/images/controller-skin/LC.png b/tizen/src/ui/resource/images/controller-skin/LC.png
deleted file mode 100644 (file)
index 8dfa47a..0000000
Binary files a/tizen/src/ui/resource/images/controller-skin/LC.png and /dev/null differ
diff --git a/tizen/src/ui/resource/images/controller-skin/LT.png b/tizen/src/ui/resource/images/controller-skin/LT.png
deleted file mode 100644 (file)
index 3e0e9dc..0000000
Binary files a/tizen/src/ui/resource/images/controller-skin/LT.png and /dev/null differ
diff --git a/tizen/src/ui/resource/images/controller-skin/Menu_hover.png b/tizen/src/ui/resource/images/controller-skin/Menu_hover.png
new file mode 100644 (file)
index 0000000..8db0e0a
Binary files /dev/null and b/tizen/src/ui/resource/images/controller-skin/Menu_hover.png differ
diff --git a/tizen/src/ui/resource/images/controller-skin/Menu_normal.png b/tizen/src/ui/resource/images/controller-skin/Menu_normal.png
new file mode 100644 (file)
index 0000000..f421802
Binary files /dev/null and b/tizen/src/ui/resource/images/controller-skin/Menu_normal.png differ
diff --git a/tizen/src/ui/resource/images/controller-skin/Menu_pushed.png b/tizen/src/ui/resource/images/controller-skin/Menu_pushed.png
new file mode 100644 (file)
index 0000000..f7265ea
Binary files /dev/null and b/tizen/src/ui/resource/images/controller-skin/Menu_pushed.png differ
diff --git a/tizen/src/ui/resource/images/controller-skin/Power_hover.png b/tizen/src/ui/resource/images/controller-skin/Power_hover.png
new file mode 100644 (file)
index 0000000..cec87f4
Binary files /dev/null and b/tizen/src/ui/resource/images/controller-skin/Power_hover.png differ
diff --git a/tizen/src/ui/resource/images/controller-skin/Power_normal.png b/tizen/src/ui/resource/images/controller-skin/Power_normal.png
new file mode 100644 (file)
index 0000000..9cd0ddf
Binary files /dev/null and b/tizen/src/ui/resource/images/controller-skin/Power_normal.png differ
diff --git a/tizen/src/ui/resource/images/controller-skin/Power_pushed.png b/tizen/src/ui/resource/images/controller-skin/Power_pushed.png
new file mode 100644 (file)
index 0000000..85d1a98
Binary files /dev/null and b/tizen/src/ui/resource/images/controller-skin/Power_pushed.png differ
diff --git a/tizen/src/ui/resource/images/controller-skin/RB.png b/tizen/src/ui/resource/images/controller-skin/RB.png
deleted file mode 100644 (file)
index 526ecc2..0000000
Binary files a/tizen/src/ui/resource/images/controller-skin/RB.png and /dev/null differ
diff --git a/tizen/src/ui/resource/images/controller-skin/RC.png b/tizen/src/ui/resource/images/controller-skin/RC.png
deleted file mode 100644 (file)
index df904e0..0000000
Binary files a/tizen/src/ui/resource/images/controller-skin/RC.png and /dev/null differ
diff --git a/tizen/src/ui/resource/images/controller-skin/RT.png b/tizen/src/ui/resource/images/controller-skin/RT.png
deleted file mode 100644 (file)
index 45b3049..0000000
Binary files a/tizen/src/ui/resource/images/controller-skin/RT.png and /dev/null differ
diff --git a/tizen/src/ui/resource/images/controller-skin/Rotate_hover.png b/tizen/src/ui/resource/images/controller-skin/Rotate_hover.png
new file mode 100644 (file)
index 0000000..fe25370
Binary files /dev/null and b/tizen/src/ui/resource/images/controller-skin/Rotate_hover.png differ
diff --git a/tizen/src/ui/resource/images/controller-skin/Rotate_normal.png b/tizen/src/ui/resource/images/controller-skin/Rotate_normal.png
new file mode 100644 (file)
index 0000000..a354065
Binary files /dev/null and b/tizen/src/ui/resource/images/controller-skin/Rotate_normal.png differ
diff --git a/tizen/src/ui/resource/images/controller-skin/Rotate_pushed.png b/tizen/src/ui/resource/images/controller-skin/Rotate_pushed.png
new file mode 100644 (file)
index 0000000..dd274db
Binary files /dev/null and b/tizen/src/ui/resource/images/controller-skin/Rotate_pushed.png differ
diff --git a/tizen/src/ui/resource/images/controller-skin/Screen Shot_hover.png b/tizen/src/ui/resource/images/controller-skin/Screen Shot_hover.png
new file mode 100644 (file)
index 0000000..6b75a5c
Binary files /dev/null and b/tizen/src/ui/resource/images/controller-skin/Screen Shot_hover.png differ
diff --git a/tizen/src/ui/resource/images/controller-skin/Screen Shot_normal.png b/tizen/src/ui/resource/images/controller-skin/Screen Shot_normal.png
new file mode 100644 (file)
index 0000000..d0a4e05
Binary files /dev/null and b/tizen/src/ui/resource/images/controller-skin/Screen Shot_normal.png differ
diff --git a/tizen/src/ui/resource/images/controller-skin/Screen Shot_pushed.png b/tizen/src/ui/resource/images/controller-skin/Screen Shot_pushed.png
new file mode 100644 (file)
index 0000000..2af1967
Binary files /dev/null and b/tizen/src/ui/resource/images/controller-skin/Screen Shot_pushed.png differ
diff --git a/tizen/src/ui/resource/images/controller-skin/Shell_hover.png b/tizen/src/ui/resource/images/controller-skin/Shell_hover.png
new file mode 100644 (file)
index 0000000..2da7f3b
Binary files /dev/null and b/tizen/src/ui/resource/images/controller-skin/Shell_hover.png differ
diff --git a/tizen/src/ui/resource/images/controller-skin/Shell_normal.png b/tizen/src/ui/resource/images/controller-skin/Shell_normal.png
new file mode 100644 (file)
index 0000000..3e71f7e
Binary files /dev/null and b/tizen/src/ui/resource/images/controller-skin/Shell_normal.png differ
diff --git a/tizen/src/ui/resource/images/controller-skin/Shell_pushed.png b/tizen/src/ui/resource/images/controller-skin/Shell_pushed.png
new file mode 100644 (file)
index 0000000..cca1493
Binary files /dev/null and b/tizen/src/ui/resource/images/controller-skin/Shell_pushed.png differ
diff --git a/tizen/src/ui/resource/images/controller-skin/TC.png b/tizen/src/ui/resource/images/controller-skin/TC.png
deleted file mode 100644 (file)
index 9efb7c6..0000000
Binary files a/tizen/src/ui/resource/images/controller-skin/TC.png and /dev/null differ
diff --git a/tizen/src/ui/resource/images/controller-skin/VolumeDown_hover.png b/tizen/src/ui/resource/images/controller-skin/VolumeDown_hover.png
new file mode 100644 (file)
index 0000000..b541e31
Binary files /dev/null and b/tizen/src/ui/resource/images/controller-skin/VolumeDown_hover.png differ
diff --git a/tizen/src/ui/resource/images/controller-skin/VolumeDown_normal.png b/tizen/src/ui/resource/images/controller-skin/VolumeDown_normal.png
new file mode 100644 (file)
index 0000000..bfaaefa
Binary files /dev/null and b/tizen/src/ui/resource/images/controller-skin/VolumeDown_normal.png differ
diff --git a/tizen/src/ui/resource/images/controller-skin/VolumeDown_pushed.png b/tizen/src/ui/resource/images/controller-skin/VolumeDown_pushed.png
new file mode 100644 (file)
index 0000000..e15b295
Binary files /dev/null and b/tizen/src/ui/resource/images/controller-skin/VolumeDown_pushed.png differ
diff --git a/tizen/src/ui/resource/images/controller-skin/VolumeUp_hover.png b/tizen/src/ui/resource/images/controller-skin/VolumeUp_hover.png
new file mode 100644 (file)
index 0000000..00ad22a
Binary files /dev/null and b/tizen/src/ui/resource/images/controller-skin/VolumeUp_hover.png differ
diff --git a/tizen/src/ui/resource/images/controller-skin/VolumeUp_normal.png b/tizen/src/ui/resource/images/controller-skin/VolumeUp_normal.png
new file mode 100644 (file)
index 0000000..b206b62
Binary files /dev/null and b/tizen/src/ui/resource/images/controller-skin/VolumeUp_normal.png differ
diff --git a/tizen/src/ui/resource/images/controller-skin/VolumeUp_pushed.png b/tizen/src/ui/resource/images/controller-skin/VolumeUp_pushed.png
new file mode 100644 (file)
index 0000000..15be956
Binary files /dev/null and b/tizen/src/ui/resource/images/controller-skin/VolumeUp_pushed.png differ
index fc341a1..8db0e0a 100644 (file)
Binary files a/tizen/src/ui/resource/images/controller-skin/keybutton_hover.png and b/tizen/src/ui/resource/images/controller-skin/keybutton_hover.png differ
index 06a0b40..f421802 100644 (file)
Binary files a/tizen/src/ui/resource/images/controller-skin/keybutton_normal.png and b/tizen/src/ui/resource/images/controller-skin/keybutton_normal.png differ
index e161dc7..f7265ea 100644 (file)
Binary files a/tizen/src/ui/resource/images/controller-skin/keybutton_pushed.png and b/tizen/src/ui/resource/images/controller-skin/keybutton_pushed.png differ
diff --git a/tizen/src/ui/resource/images/controller-skin/scroll_back.png b/tizen/src/ui/resource/images/controller-skin/scroll_back.png
deleted file mode 100644 (file)
index 5f8c377..0000000
Binary files a/tizen/src/ui/resource/images/controller-skin/scroll_back.png and /dev/null differ
diff --git a/tizen/src/ui/resource/images/controller-skin/scroll_button_down_hover.png b/tizen/src/ui/resource/images/controller-skin/scroll_button_down_hover.png
deleted file mode 100644 (file)
index 62f58d1..0000000
Binary files a/tizen/src/ui/resource/images/controller-skin/scroll_button_down_hover.png and /dev/null differ
diff --git a/tizen/src/ui/resource/images/controller-skin/scroll_button_down_normal.png b/tizen/src/ui/resource/images/controller-skin/scroll_button_down_normal.png
deleted file mode 100644 (file)
index 7ced278..0000000
Binary files a/tizen/src/ui/resource/images/controller-skin/scroll_button_down_normal.png and /dev/null differ
diff --git a/tizen/src/ui/resource/images/controller-skin/scroll_button_down_pushed.png b/tizen/src/ui/resource/images/controller-skin/scroll_button_down_pushed.png
deleted file mode 100644 (file)
index 68cc7f2..0000000
Binary files a/tizen/src/ui/resource/images/controller-skin/scroll_button_down_pushed.png and /dev/null differ
diff --git a/tizen/src/ui/resource/images/controller-skin/scroll_button_up_hover.png b/tizen/src/ui/resource/images/controller-skin/scroll_button_up_hover.png
deleted file mode 100644 (file)
index a362b4e..0000000
Binary files a/tizen/src/ui/resource/images/controller-skin/scroll_button_up_hover.png and /dev/null differ
diff --git a/tizen/src/ui/resource/images/controller-skin/scroll_button_up_normal.png b/tizen/src/ui/resource/images/controller-skin/scroll_button_up_normal.png
deleted file mode 100644 (file)
index 29882e0..0000000
Binary files a/tizen/src/ui/resource/images/controller-skin/scroll_button_up_normal.png and /dev/null differ
diff --git a/tizen/src/ui/resource/images/controller-skin/scroll_button_up_pushed.png b/tizen/src/ui/resource/images/controller-skin/scroll_button_up_pushed.png
deleted file mode 100644 (file)
index 6c510c1..0000000
Binary files a/tizen/src/ui/resource/images/controller-skin/scroll_button_up_pushed.png and /dev/null differ
diff --git a/tizen/src/ui/resource/images/controller-skin/scroll_thumb.png b/tizen/src/ui/resource/images/controller-skin/scroll_thumb.png
deleted file mode 100644 (file)
index b33ca1f..0000000
Binary files a/tizen/src/ui/resource/images/controller-skin/scroll_thumb.png and /dev/null differ
index c5d26ec..b888348 100644 (file)
         <file>images/main-skin/RC.png</file>
         <file>images/main-skin/RB.png</file>
 
-        <file>images/controller-skin/scroll_button_up_normal.png</file>
-        <file>images/controller-skin/scroll_button_up_hover.png</file>
-        <file>images/controller-skin/scroll_button_up_pushed.png</file>
-        <file>images/controller-skin/scroll_button_down_normal.png</file>
-        <file>images/controller-skin/scroll_button_down_hover.png</file>
-        <file>images/controller-skin/scroll_button_down_pushed.png</file>
         <file>images/controller-skin/keybutton_normal.png</file>
         <file>images/controller-skin/keybutton_hover.png</file>
         <file>images/controller-skin/keybutton_pushed.png</file>
-        <file>images/controller-skin/LT.png</file>
-        <file>images/controller-skin/LC.png</file>
-        <file>images/controller-skin/LB.png</file>
-        <file>images/controller-skin/TC.png</file>
-        <file>images/controller-skin/BC.png</file>
-        <file>images/controller-skin/RT.png</file>
-        <file>images/controller-skin/RC.png</file>
-        <file>images/controller-skin/RB.png</file>
+        <file>images/controller-skin/Back_hover.png</file>
+        <file>images/controller-skin/Back_normal.png</file>
+        <file>images/controller-skin/Back_pushed.png</file>
+        <file>images/controller-skin/Home_hover.png</file>
+        <file>images/controller-skin/Home_normal.png</file>
+        <file>images/controller-skin/Home_pushed.png</file>
+        <file>images/controller-skin/Menu_hover.png</file>
+        <file>images/controller-skin/Menu_normal.png</file>
+        <file>images/controller-skin/Menu_pushed.png</file>
+        <file>images/controller-skin/Power_hover.png</file>
+        <file>images/controller-skin/Power_normal.png</file>
+        <file>images/controller-skin/Power_pushed.png</file>
+        <file>images/controller-skin/VolumeDown_hover.png</file>
+        <file>images/controller-skin/VolumeDown_normal.png</file>
+        <file>images/controller-skin/VolumeDown_pushed.png</file>
+        <file>images/controller-skin/VolumeUp_hover.png</file>
+        <file>images/controller-skin/VolumeUp_normal.png</file>
+        <file>images/controller-skin/VolumeUp_pushed.png</file>
 
         <file>icons/emulator_icon.ico</file>
         <file>icons/shell.png</file>
index f65a9e8..e49c6ff 100644 (file)
                 <keycode>116</keycode>
                 <shortcut>Ctrl+Shift+F8</shortcut>
             </key>
-            <key name="Volume +">
+            <key name="VolumeUp">
                 <keycode>115</keycode>
                 <shortcut>Ctrl+Shift+]</shortcut>
             </key>
-            <key name="Volume -">
+            <key name="VolumeDown">
                 <keycode>114</keycode>
                 <shortcut>Ctrl+Shift+[</shortcut>
             </key>
index 2c2bb3d..e55d3a2 100644 (file)
@@ -43,6 +43,29 @@ SkinPainter::SkinPainter(const QString &patchPath,
     drawSkin(path, centerPatch, degree, tagLeftTop, tagColor);
 }
 
+SkinPainter::SkinPainter(QSize centerPatch, int degree)
+{
+    drawSkin(centerPatch, degree);
+}
+
+void SkinPainter::drawSkin(QSize center, int degree) {
+    qDebug() << "draw skin surface";
+
+    QRect centeralRect(0, 0, center.width(), center.height());
+    QPixmap image(center.width(), center.height());
+    image.fill(Qt::transparent);
+
+    QPainter painter(&image);
+    painter.fillRect(centeralRect, QBrush(QColor(244, 244, 244)));
+
+    /* rotate */
+    QTransform transform;
+    skin = new QPixmap(image.transformed(transform.rotate(degree)));
+
+    this->centeralRect = QRect(centeralRect.topLeft(),
+            transform.mapRect(centeralRect).size());
+}
+
 void SkinPainter::drawSkin(QString patchPath, QSize center, int degree,
     QPoint tagLeftTop, QColor tagColor)
 {
index ad9be00..8adde2d 100644 (file)
@@ -39,6 +39,7 @@ class SkinPainter
 public:
     SkinPainter(const QString &patchPath, QSize centerPatch, int degree,
         QPoint tagLeftTop, QColor tagColor);
+    SkinPainter(QSize centerPatch, int degree);
     ~SkinPainter();
 
     QImage getSkinImage() const;
@@ -47,6 +48,7 @@ public:
 private:
     void drawSkin(QString patchPath, QSize center, int degree,
         QPoint tagLeftTop, QColor tagColor);
+    void drawSkin(QSize center, int degree);
 
     QPixmap *skin;
     QRect centeralRect;
index 4daed9b..d7e82ce 100644 (file)
@@ -790,21 +790,12 @@ void XmlLayoutParser::makeGeneralCon(ControllerForm *form)
 {
     const int keyCount = form->getKeyList().count();
 
-    int width = GPC_KEYBUTTON_WIDTH;
+    int width = GPC_KEYBUTTON_WIDTH + GPC_KEYBUTTON_HSPACING;
     int height = GPC_HEAD_SPACING;
-    if (keyCount < GPC_KEYBUTTON_DEFAULT_CNT) {
-        height += (GPC_KEYBUTTON_HEIGHT * keyCount) +
-            (GPC_KEYBUTTON_VSPACING * (keyCount - 1)) + GPC_TAIL_SPACING;
-    } else {
-        width += (GPC_SCROLLBAR_WIDTH + GPC_SCROLLBAR_HSPACING);
-        height += (GPC_KEYBUTTON_HEIGHT * GPC_KEYBUTTON_DEFAULT_CNT)
-            + (GPC_KEYBUTTON_VSPACING * (GPC_KEYBUTTON_DEFAULT_CNT - 1)) +
-            GPC_TAIL_SPACING;
-    }
+    height += (GPC_KEYBUTTON_HEIGHT * keyCount) +
+                (GPC_KEYBUTTON_VSPACING * (keyCount - 1)) + GPC_TAIL_SPACING;
 
-    SkinPainter painter("controller-skin",
-        QSize(width, qMax(height, QT_LAYOUT_MINIMUM - 20)), 0,
-        QPoint(14, GPC_HEAD_SPACING - 1), uiInfo->getVMColor());
+    SkinPainter painter(QSize(width, qMax(height, QT_LAYOUT_MINIMUM - 20)), 0);
 
     form->skinImg[LayoutForm::normal] = painter.getSkinImage();
     form->setCenteralRect(painter.getCenteralRect());