Qt: set new menu icons of Always On Top and Move
authorJihye Won <jihye.won1@samsung.com>
Mon, 2 Nov 2015 09:28:47 +0000 (18:28 +0900)
committerSeokYeon Hwang <syeon.hwang@samsung.com>
Fri, 18 Dec 2015 07:08:36 +0000 (16:08 +0900)
As setting two icons of "Always On Top" and "Move" in emulator context menu,
the context menu will look nice.
Specifically, each indentation of the context menu becomes equal in MacOSX.
Also, new icons will help users recognize what does menu mean at a glance.

Change-Id: I0114f9f064f069c1553c0f59983cf8131a6133ad
Signed-off-by: Jihye Won <jihye.won1@samsung.com>
(cherry picked from commit f47701a21f06447096b09f9e05f7d43843a750ba)

tizen/src/ui/menu/contextmenu.cpp
tizen/src/ui/resource/icons/alwaysontop.png [new file with mode: 0644]
tizen/src/ui/resource/icons/move.png [new file with mode: 0644]
tizen/src/ui/resource/resource.qrc

index 4c939fc66675026ba9638ad803d914e51cc2fd01..de60814e3e0ff7e20dab4a949e13b1a072a58559 100644 (file)
@@ -216,6 +216,9 @@ void ContextMenu::createOnTopItem(QMenu *menu, MenuItem *item)
     QString menuName = item->getName();
     actionTopMost = menu->addAction(
         menuName.isEmpty() ? MENU_ONTOP_ITEM_TEXT : menuName);
+#ifdef CONFIG_DARWIN
+    actionTopMost->setIcon(QIcon(QPixmap(":/icons/alwaysontop.png")));
+#endif
     actionTopMost->setCheckable(true);
     connect(actionTopMost, SIGNAL(triggered(bool)), this, SLOT(slotTopMost(bool)));
 
@@ -238,6 +241,7 @@ void ContextMenu::createMoveItem(QMenu *menu, MenuItem *item)
     QString menuName = item->getName();
     actionMove = menu->addAction(
         menuName.isEmpty() ? MENU_MOVE_ITEM_TEXT : menuName);
+    actionMove->setIcon(QIcon(QPixmap(":/icons/move.png")));
     connect(actionMove, SIGNAL(triggered()), this, SLOT(slotMove()));
 
     /* shortcut */
diff --git a/tizen/src/ui/resource/icons/alwaysontop.png b/tizen/src/ui/resource/icons/alwaysontop.png
new file mode 100644 (file)
index 0000000..abbb29d
Binary files /dev/null and b/tizen/src/ui/resource/icons/alwaysontop.png differ
diff --git a/tizen/src/ui/resource/icons/move.png b/tizen/src/ui/resource/icons/move.png
new file mode 100644 (file)
index 0000000..1697b28
Binary files /dev/null and b/tizen/src/ui/resource/icons/move.png differ
index 1cf0b3178982309163a6042fd1eefbb5054880cf..7dce5894380a166caf751ac956a665523b1cd754 100644 (file)
@@ -49,5 +49,7 @@
         <file>icons/save_screenshot_dialog.png</file>
         <file>icons/copy_screenshot_dialog.png</file>
         <file>icons/refresh_screenshot_dialog.png</file>
+        <file>icons/alwaysontop.png</file>
+        <file>icons/move.png</file>
     </qresource>
 </RCC>