summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaj Grönholm <kaj.gronholm@qt.io>2018-11-30 07:58:17 +0200
committerKaj Grönholm <kaj.gronholm@qt.io>2018-11-30 09:06:27 +0000
commit580f0715ee1c292bf3c5104905187ecf11c82659 (patch)
tree455dd8aaa8c44a63fbe8ff26c7750144c5e84d84
parent29eeaf92ee83cb5c4711a145be7ce2480fe32bde (diff)
Update timeline time bar texts icon
Separate icons for active and inactive. Task-number: QT3DS-2772 Change-Id: I9fadff21405237db16dc8c9ec779dfee6547cef7 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
-rw-r--r--src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/TimelineToolbar.cpp8
-rw-r--r--src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/TimelineToolbar.h2
-rw-r--r--src/Authoring/Studio/images.qrc4
-rw-r--r--src/Authoring/Studio/images/timeline_text_hidden.pngbin0 -> 183 bytes
-rw-r--r--src/Authoring/Studio/images/timeline_text_hidden@2x.pngbin0 -> 260 bytes
-rw-r--r--src/Authoring/Studio/images/timeline_text_shown.pngbin0 -> 186 bytes
-rw-r--r--src/Authoring/Studio/images/timeline_text_shown@2x.pngbin0 -> 262 bytes
7 files changed, 12 insertions, 2 deletions
diff --git a/src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/TimelineToolbar.cpp b/src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/TimelineToolbar.cpp
index c774c474..6a1988af 100644
--- a/src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/TimelineToolbar.cpp
+++ b/src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/TimelineToolbar.cpp
@@ -58,7 +58,8 @@ TimelineToolbar::TimelineToolbar() : QToolBar()
static const QIcon iconLast = QIcon(":/images/playback_tools_low-04.png");
static const QIcon iconZoomIn = QIcon(":/images/zoom_in.png");
static const QIcon iconZoomOut = QIcon(":/images/zoom_out.png");
- static const QIcon iconTimebarTexts = QIcon(":/images/Action-Action.png");
+ m_iconTimebarTextsActive = QIcon(":/images/timeline_text_shown.png");
+ m_iconTimebarTextsInactive = QIcon(":/images/timeline_text_hidden.png");
m_iconDiActive = QIcon(":/images/Objects-DataInput-Active.png");
m_iconDiInactive = QIcon(":/images/Objects-DataInput-Inactive.png");
m_iconStop = QIcon(":/images/playback_tools_low-01.png");
@@ -102,7 +103,8 @@ TimelineToolbar::TimelineToolbar() : QToolBar()
+ QString(CStudioPreferences::dataInputColor().name()) + "; }";
m_diLabel->setStyleSheet(styleString);
- m_actionShowRowTexts = new QAction(iconTimebarTexts, tr("Show All Time Bar Texts"), this);
+ m_actionShowRowTexts = new QAction(m_iconTimebarTextsInactive,
+ tr("Show All Time Bar Texts"), this);
m_actionShowRowTexts->setCheckable(true);
updatePlayButtonState(false);
@@ -267,6 +269,8 @@ void TimelineToolbar::onDiButtonClicked()
void TimelineToolbar::onShowRowTextsToggled()
{
bool isChecked = m_actionShowRowTexts->isChecked();
+ m_actionShowRowTexts->setIcon(isChecked ? m_iconTimebarTextsActive
+ : m_iconTimebarTextsInactive);
QString text = tr("%1 All Time Bar Texts").arg(isChecked ? tr("Hide") : tr("Show"));
m_actionShowRowTexts->setText(text);
emit showRowTextsToggled(isChecked);
diff --git a/src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/TimelineToolbar.h b/src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/TimelineToolbar.h
index 74bd6030..4a3a0439 100644
--- a/src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/TimelineToolbar.h
+++ b/src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/TimelineToolbar.h
@@ -107,6 +107,8 @@ private:
QIcon m_iconPlay;
QIcon m_iconDiActive;
QIcon m_iconDiInactive;
+ QIcon m_iconTimebarTextsActive;
+ QIcon m_iconTimebarTextsInactive;
QString m_currController;
diff --git a/src/Authoring/Studio/images.qrc b/src/Authoring/Studio/images.qrc
index 75c54a86..28dab9a5 100644
--- a/src/Authoring/Studio/images.qrc
+++ b/src/Authoring/Studio/images.qrc
@@ -278,6 +278,10 @@
<file>images/initial_used@2x.png</file>
<file>images/warning.png</file>
<file>images/warning2x.png</file>
+ <file>images/timeline_text_shown.png</file>
+ <file>images/timeline_text_shown@2x.png</file>
+ <file>images/timeline_text_hidden.png</file>
+ <file>images/timeline_text_hidden@2x.png</file>
</qresource>
<qresource prefix="/startup">
<file alias="open_dialog.png">images/open_dialog.png</file>
diff --git a/src/Authoring/Studio/images/timeline_text_hidden.png b/src/Authoring/Studio/images/timeline_text_hidden.png
new file mode 100644
index 00000000..68b62fd9
--- /dev/null
+++ b/src/Authoring/Studio/images/timeline_text_hidden.png
Binary files differ
diff --git a/src/Authoring/Studio/images/timeline_text_hidden@2x.png b/src/Authoring/Studio/images/timeline_text_hidden@2x.png
new file mode 100644
index 00000000..b2794e17
--- /dev/null
+++ b/src/Authoring/Studio/images/timeline_text_hidden@2x.png
Binary files differ
diff --git a/src/Authoring/Studio/images/timeline_text_shown.png b/src/Authoring/Studio/images/timeline_text_shown.png
new file mode 100644
index 00000000..6f3bf557
--- /dev/null
+++ b/src/Authoring/Studio/images/timeline_text_shown.png
Binary files differ
diff --git a/src/Authoring/Studio/images/timeline_text_shown@2x.png b/src/Authoring/Studio/images/timeline_text_shown@2x.png
new file mode 100644
index 00000000..53d4b212
--- /dev/null
+++ b/src/Authoring/Studio/images/timeline_text_shown@2x.png
Binary files differ