Skip to content

Commit

Permalink
re #10767 add stylesheet settings for non vista styles
Browse files Browse the repository at this point in the history
  • Loading branch information
NickDraper committed Dec 11, 2014
1 parent 0cc3fc0 commit a78a690
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
16 changes: 16 additions & 0 deletions Code/Mantid/MantidPlot/src/Mantid/FirstTimeSetup.cpp
Expand Up @@ -60,6 +60,22 @@ void FirstTimeSetup::initLayout()
m_uiForm.cbInstrument->setCurrentIndex(m_uiForm.cbInstrument->findText(
QString::fromStdString(instrument)));
connect(m_uiForm.cbFacility, SIGNAL(currentIndexChanged(const QString&)), this, SLOT(facilitySelected(const QString &)));

QString stlyeName = QApplication::style()->metaObject()->className();
if(stlyeName!="QWindowsVistaStyle")
{
//add stylesheet formatting for other environemnts
QString ss = this->styleSheet();
ss += "\n"
"QDialog#FirstTimeSetup QCommandLinkButton {"
" background-color: rgba(255, 255, 255, 0);"
"}"
"\n"
"QDialog#FirstTimeSetup QCommandLinkButton:hover {"
" background-color: rgba(255, 255, 255, 128);"
"}";
this->setStyleSheet(ss);
}
}

void FirstTimeSetup::confirm()
Expand Down
4 changes: 2 additions & 2 deletions Code/Mantid/MantidPlot/src/Mantid/FirstTimeSetup.ui
Expand Up @@ -38,7 +38,7 @@
</property>
<property name="styleSheet">
<string notr="true">QDialog#FirstTimeSetup{background-image: url(:/First_use_Background.png);}
color: rgb(255, 255, 255);</string>
</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
Expand Down Expand Up @@ -208,7 +208,7 @@ color: rgb(0, 0, 0);</string>
<enum>Qt::LeftToRight</enum>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(0, 0, 0);</string>
<string notr="true"/>
</property>
<property name="text">
<string>Sample Datasets</string>
Expand Down

0 comments on commit a78a690

Please sign in to comment.