From 50d5306afc17325f015db97ae09911445991b475 Mon Sep 17 00:00:00 2001 From: Jeremy Bullock Date: Oct 20 2016 14:04:05 +0000 Subject: Merge pull request #870 from shun-iwasawa/startup_mod Startup Popup: Highlight "Open Recent Scene" items on mouse hover --- diff --git a/stuff/config/qss/gray_048/gray_048.less b/stuff/config/qss/gray_048/gray_048.less index 9ed5281..c170ed2 100644 --- a/stuff/config/qss/gray_048/gray_048.less +++ b/stuff/config/qss/gray_048/gray_048.less @@ -1369,4 +1369,11 @@ QDialog #dialogButtonFrame { #GearButton { qproperty-icon: url("@{image_url}/gear.png"); +} + +#StartupLabel { + padding: 3px; + &:hover { + .baseBG(light, 10%); + } } \ No newline at end of file diff --git a/stuff/config/qss/gray_048/gray_048.qss b/stuff/config/qss/gray_048/gray_048.qss index 97438d3..0c17daf 100644 --- a/stuff/config/qss/gray_048/gray_048.qss +++ b/stuff/config/qss/gray_048/gray_048.qss @@ -764,7 +764,7 @@ DvDirTreeView { /*---------------------------------------------------------------------------*/ /* Cleanup Settings, LoadLevel, PsdSettingsPopup, FxSettingsPopup, RenameAsToonzPopup */ /*---------------------------------------------------------------------------*/ -#CleanupSettingsFrame, +#CleanupSettingsFrame, #LoadLevelFrame, #SolidLineFrame { border: 1px solid #e6e6e6; @@ -1372,5 +1372,11 @@ QDialog #dialogButtonFrame { #GearButton { qproperty-icon: url("../gray_072/imgs/gear.png"); } +#StartupLabel { + padding: 3px; +} +#StartupLabel:hover { + background-color: #4a4a4a; +} //# sourceMappingURL=gray_048.qss.map \ No newline at end of file diff --git a/stuff/config/qss/gray_048/gray_048_mac.qss b/stuff/config/qss/gray_048/gray_048_mac.qss index f731688..1217245 100644 --- a/stuff/config/qss/gray_048/gray_048_mac.qss +++ b/stuff/config/qss/gray_048/gray_048_mac.qss @@ -764,7 +764,7 @@ DvDirTreeView { /*---------------------------------------------------------------------------*/ /* Cleanup Settings, LoadLevel, PsdSettingsPopup, FxSettingsPopup, RenameAsToonzPopup */ /*---------------------------------------------------------------------------*/ -#CleanupSettingsFrame, +#CleanupSettingsFrame, #LoadLevelFrame, #SolidLineFrame { border: 1px solid #e6e6e6; @@ -1372,5 +1372,11 @@ QDialog #dialogButtonFrame { #GearButton { qproperty-icon: url("../gray_072/imgs/gear.png"); } +#StartupLabel { + padding: 3px; +} +#StartupLabel:hover { + background-color: #4a4a4a; +} //# sourceMappingURL=gray_048_mac.qss.map \ No newline at end of file diff --git a/stuff/config/qss/gray_072/gray_072.less b/stuff/config/qss/gray_072/gray_072.less index aedaa86..60044ee 100644 --- a/stuff/config/qss/gray_072/gray_072.less +++ b/stuff/config/qss/gray_072/gray_072.less @@ -1369,4 +1369,11 @@ QDialog #dialogButtonFrame { #GearButton { qproperty-icon: url("@{image_url}/gear.png"); +} + +#StartupLabel { + padding: 3px; + &:hover { + .baseBG(light, 10%); + } } \ No newline at end of file diff --git a/stuff/config/qss/gray_072/gray_072.qss b/stuff/config/qss/gray_072/gray_072.qss index 105fad9..824600c 100644 --- a/stuff/config/qss/gray_072/gray_072.qss +++ b/stuff/config/qss/gray_072/gray_072.qss @@ -764,7 +764,7 @@ DvDirTreeView { /*---------------------------------------------------------------------------*/ /* Cleanup Settings, LoadLevel, PsdSettingsPopup, FxSettingsPopup, RenameAsToonzPopup */ /*---------------------------------------------------------------------------*/ -#CleanupSettingsFrame, +#CleanupSettingsFrame, #LoadLevelFrame, #SolidLineFrame { border: 1px solid #e6e6e6; @@ -1372,5 +1372,11 @@ QDialog #dialogButtonFrame { #GearButton { qproperty-icon: url("imgs/gear.png"); } +#StartupLabel { + padding: 3px; +} +#StartupLabel:hover { + background-color: #626262; +} //# sourceMappingURL=gray_072.qss.map \ No newline at end of file diff --git a/stuff/config/qss/gray_072/gray_072_mac.qss b/stuff/config/qss/gray_072/gray_072_mac.qss index e49f359..3c89f26 100644 --- a/stuff/config/qss/gray_072/gray_072_mac.qss +++ b/stuff/config/qss/gray_072/gray_072_mac.qss @@ -764,7 +764,7 @@ DvDirTreeView { /*---------------------------------------------------------------------------*/ /* Cleanup Settings, LoadLevel, PsdSettingsPopup, FxSettingsPopup, RenameAsToonzPopup */ /*---------------------------------------------------------------------------*/ -#CleanupSettingsFrame, +#CleanupSettingsFrame, #LoadLevelFrame, #SolidLineFrame { border: 1px solid #e6e6e6; @@ -1372,5 +1372,11 @@ QDialog #dialogButtonFrame { #GearButton { qproperty-icon: url("imgs/gear.png"); } +#StartupLabel { + padding: 3px; +} +#StartupLabel:hover { + background-color: #626262; +} //# sourceMappingURL=gray_072_mac.qss.map \ No newline at end of file diff --git a/stuff/config/qss/gray_128/gray_128.less b/stuff/config/qss/gray_128/gray_128.less index 0d23384..168a281 100644 --- a/stuff/config/qss/gray_128/gray_128.less +++ b/stuff/config/qss/gray_128/gray_128.less @@ -1194,4 +1194,11 @@ QDialog #dialogButtonFrame { #GearButton { qproperty-icon: url("@{image_url}/gear.png"); +} + +#StartupLabel { + padding: 3px; + &:hover { + .baseBG(light, 10%); + } } \ No newline at end of file diff --git a/stuff/config/qss/gray_128/gray_128.qss b/stuff/config/qss/gray_128/gray_128.qss index 5e5eac7..ee88456 100644 --- a/stuff/config/qss/gray_128/gray_128.qss +++ b/stuff/config/qss/gray_128/gray_128.qss @@ -526,7 +526,7 @@ DvDirTreeView { /*---------------------------------------------------------------------------*/ /* Cleanup Settings, LoadLevel, PsdSettingsPopup, FxSettingsPopup, RenameAsToonzPopup */ /*---------------------------------------------------------------------------*/ -#CleanupSettingsFrame, +#CleanupSettingsFrame, #LoadLevelFrame, #SolidLineFrame { border: 1px solid #141414; @@ -1111,5 +1111,11 @@ QDialog #dialogButtonFrame { #GearButton { qproperty-icon: url("imgs/gear.png"); } +#StartupLabel { + padding: 3px; +} +#StartupLabel:hover { + background-color: #9a9a9a; +} //# sourceMappingURL=gray_128.qss.map \ No newline at end of file diff --git a/stuff/config/qss/gray_128/gray_128_mac.qss b/stuff/config/qss/gray_128/gray_128_mac.qss index 4093fe5..a7b90c2 100644 --- a/stuff/config/qss/gray_128/gray_128_mac.qss +++ b/stuff/config/qss/gray_128/gray_128_mac.qss @@ -526,7 +526,7 @@ DvDirTreeView { /*---------------------------------------------------------------------------*/ /* Cleanup Settings, LoadLevel, PsdSettingsPopup, FxSettingsPopup, RenameAsToonzPopup */ /*---------------------------------------------------------------------------*/ -#CleanupSettingsFrame, +#CleanupSettingsFrame, #LoadLevelFrame, #SolidLineFrame { border: 1px solid #141414; @@ -1111,5 +1111,11 @@ QDialog #dialogButtonFrame { #GearButton { qproperty-icon: url("imgs/gear.png"); } +#StartupLabel { + padding: 3px; +} +#StartupLabel:hover { + background-color: #9a9a9a; +} //# sourceMappingURL=gray_128_mac.qss.map \ No newline at end of file diff --git a/toonz/sources/toonz/startuppopup.cpp b/toonz/sources/toonz/startuppopup.cpp index 018198c..bf8c375 100644 --- a/toonz/sources/toonz/startuppopup.cpp +++ b/toonz/sources/toonz/startuppopup.cpp @@ -221,8 +221,8 @@ StartupPopup::StartupPopup() m_sceneBox->setLayout(newSceneLay); guiLay->addWidget(m_sceneBox, 2, 0, 4, 1, Qt::AlignLeft); - m_recentSceneLay->setMargin(8); - m_recentSceneLay->setSpacing(8); + m_recentSceneLay->setMargin(5); + m_recentSceneLay->setSpacing(2); { // Recent Scene List m_recentBox->setLayout(m_recentSceneLay); @@ -367,6 +367,8 @@ void StartupPopup::showEvent(QShowEvent *) { if (i > 9) break; // box can hold 10 scenes QString justName = QString::fromStdString(TFilePath(name).getName()); m_recentNamesLabels[i] = new StartupLabel(justName, this, i); + m_recentNamesLabels[i]->setToolTip( + name.remove(0, name.indexOf(" ") + 1)); // remove "#. " prefix m_recentSceneLay->addWidget(m_recentNamesLabels[i], i, Qt::AlignTop); i++; } @@ -901,6 +903,7 @@ void StartupPopup::updateSize() { StartupLabel::StartupLabel(const QString &text, QWidget *parent, int index) : QLabel(parent), m_index(index) { setText(text); + setObjectName("StartupLabel"); } StartupLabel::~StartupLabel() {}