From: GiWoong Kim Date: Fri, 2 Oct 2015 01:58:53 +0000 (+0900) Subject: gui: standardize tooltip style X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.2~40^2~104 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dbfbcae252626dacecd6109b2e5e3a7f0818f44d;p=sdk%2Femulator%2Fqemu.git gui: standardize tooltip style black font, white background, black 1px border Change-Id: Ied412879f7ee7b4e6b672828dabdedda59c9a903 Signed-off-by: GiWoong Kim --- diff --git a/tizen/src/ui/controller/generalpurposecon.cpp b/tizen/src/ui/controller/generalpurposecon.cpp index 7eb99a6123..042268a799 100644 --- a/tizen/src/ui/controller/generalpurposecon.cpp +++ b/tizen/src/ui/controller/generalpurposecon.cpp @@ -31,6 +31,7 @@ #include "generalpurposecon.h" #include "hwkeybutton.h" +#include "resource/ui_strings.h" GeneralPurposeCon::GeneralPurposeCon(QWidget *parent, QList keyList, QSize size) : QWidget(parent) @@ -43,6 +44,7 @@ GeneralPurposeCon::GeneralPurposeCon(QWidget *parent, void GeneralPurposeCon::createItems(QList keyList, QSize size) { QWidget *buttonGroup = new QWidget(this); + buttonGroup->setStyleSheet(STYLE_TOOLTIP); QVBoxLayout *layout = new QVBoxLayout(buttonGroup); layout->setMargin(0); diff --git a/tizen/src/ui/menu/detailedinfodialog.cpp b/tizen/src/ui/menu/detailedinfodialog.cpp index b0f0504db6..4a68db279d 100644 --- a/tizen/src/ui/menu/detailedinfodialog.cpp +++ b/tizen/src/ui/menu/detailedinfodialog.cpp @@ -102,6 +102,7 @@ DetailedInfoDialog::DetailedInfoDialog(QWidget *parent) : QTableWidget *DetailedInfoDialog::createVmInfoTable() { QTableWidget *vmInfo = new QTableWidget(); + vmInfo->setStyleSheet(STYLE_TOOLTIP); /* horizontal headers */ QStringList headers; @@ -347,6 +348,7 @@ void DetailedInfoDialog::insertTableRow(QTableWidget *table, table->insertRow(row); table->setItem(row, 0, new QTableWidgetItem(key)); QTableWidgetItem *item = new QTableWidgetItem(value); + table->setItem(row, 1, item); if (!tooltip.isNull() && !tooltip.isEmpty()) { diff --git a/tizen/src/ui/menu/screenshotdialog.cpp b/tizen/src/ui/menu/screenshotdialog.cpp index 6a70125a26..b261981e3d 100644 --- a/tizen/src/ui/menu/screenshotdialog.cpp +++ b/tizen/src/ui/menu/screenshotdialog.cpp @@ -73,6 +73,7 @@ void ScreenShotDialog::createItems(QGridLayout *layout) { /* === tool bar === */ toolBar = new QToolBar(this); + toolBar->setStyleSheet(STYLE_TOOLTIP); /* Save */ actionSave = new QAction(SCREENSHOT_SAVE_TEXT, this); diff --git a/tizen/src/ui/resource/ui_strings.h b/tizen/src/ui/resource/ui_strings.h index e90e7a0397..ee64927598 100644 --- a/tizen/src/ui/resource/ui_strings.h +++ b/tizen/src/ui/resource/ui_strings.h @@ -127,6 +127,10 @@ #define ABOUT_BUILD_DATE_TEXT "Build Date" #define ABOUT_VISIT_TEXT "Visit" +/* style sheet*/ +#define STYLE_TOOLTIP "QToolTip {"\ + "color: black; background-color: white; border: 1px solid black; }" + /* messages */ #define MSG_SDB_NOT_READY "SDB is not ready.\nPlease wait until the emulator is completely boot up." #define MSG_SDB_NOT_EXIST "SDB file does not exist in the following path.\n" diff --git a/tizen/src/ui/skinkeyitem.cpp b/tizen/src/ui/skinkeyitem.cpp index 5cc4d44f11..3204eb6379 100644 --- a/tizen/src/ui/skinkeyitem.cpp +++ b/tizen/src/ui/skinkeyitem.cpp @@ -61,8 +61,7 @@ SkinKeyItem::SkinKeyItem(QGraphicsItem *parent, HardwareKey *hwKey, longPressTimer->setSingleShot(true); connect(longPressTimer, SIGNAL(timeout()), this, SLOT(longPressHook())); - setToolTip("" - + hwKey->getTooltip() + ""); + setToolTip(hwKey->getTooltip()); setAcceptHoverEvents(true); } diff --git a/tizen/src/ui/skinview.cpp b/tizen/src/ui/skinview.cpp index 9030163031..7a5e5d81a1 100644 --- a/tizen/src/ui/skinview.cpp +++ b/tizen/src/ui/skinview.cpp @@ -30,6 +30,7 @@ #include #include "skinview.h" +#include "resource/ui_strings.h" SkinView::SkinView(QWidget *parent, QGraphicsScene *scene) : QGraphicsView(scene, parent) @@ -37,6 +38,8 @@ SkinView::SkinView(QWidget *parent, QGraphicsScene *scene) : this->grabPos = QPoint(-1, -1); setStyleSheet("border-style: none"); + setStyleSheet(STYLE_TOOLTIP); + setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); setAlignment(Qt::AlignLeft | Qt::AlignTop);