Skip to content

Commit 66f1c99

Browse files
committed
Merge pull request #784 from benjaminlarson/benStyleSheet
Ben style sheet
2 parents 07ab860 + c52417e commit 66f1c99

File tree

9 files changed

+71
-43
lines changed

9 files changed

+71
-43
lines changed

src/Interface/Application/SCIRunMainWindow.cc

Lines changed: 43 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -78,41 +78,40 @@ using namespace SCIRun::Core::Algorithms;
7878

7979
SCIRunMainWindow::SCIRunMainWindow() : firstTimePythonShown_(true)
8080
{
81-
setupUi(this);
82-
setAttribute(Qt::WA_DeleteOnClose);
83-
if (newInterface())
84-
setStyleSheet(
85-
"background-color: rgb(66,66,69);"
86-
"color: white;"
87-
"selection-color: yellow;"
88-
"selection-background-color: blue;"
89-
//"QMenuBar::item { background-color: rgb(66,66,69); color: black }"
90-
"QToolBar { background-color: rgb(66,66,69); border: 1px solid black; color: black }"
91-
"QProgressBar { background-color: rgb(66,66,69); border: 0px solid black; color: black }"
92-
"QDockWidget {background: rgb(66,66,69); background-color: rgb(66,66,69) }"
93-
94-
//"border: 1px solid white;"
95-
//"border-radius: 3px;"
96-
"QPushButton {"
97-
" border: 2px solid #8f8f91;"
98-
" border - radius: 6px;"
99-
" background - color: qlineargradient(x1 : 0, y1 : 0, x2 : 0, y2 : 1,"
100-
" stop : 0 #f6f7fa, stop: 1 #dadbde);"
101-
" min - width: 80px;"
102-
"}"
103-
"QPushButton:pressed{"
104-
"background - color: qlineargradient(x1 : 0, y1 : 0, x2 : 0, y2 : 1,"
105-
"stop : 0 #dadbde, stop: 1 #f6f7fa);"
106-
"}"
107-
"QPushButton:flat{"
108-
" border: none; /* no border for a flat push button */"
109-
"}"
110-
"QPushButton:default {"
111-
"border - color: navy; /* make the default button prominent */"
112-
"}"
113-
);
114-
115-
dialogErrorControl_.reset(new DialogErrorControl(this));
81+
setupUi(this);
82+
setAttribute(Qt::WA_DeleteOnClose);
83+
if (newInterface())
84+
setStyleSheet(
85+
"background-color: rgb(66,66,69);"
86+
"color: white;"
87+
"selection-color: yellow;"
88+
"selection-background-color: blue;"//336699 lighter blue
89+
"QToolBar { background-color: rgb(66,66,69); border: 1px solid black; color: black; }"
90+
"QProgressBar { background-color: rgb(66,66,69); border: 0px solid black; color: black ; }"
91+
"QDockWidget {background: rgb(66,66,69); background-color: rgb(66,66,69); }"
92+
//"border: 1px solid white;"
93+
//"border-radius: 3px;"
94+
95+
"QPushButton {"
96+
" border: 2px solid #8f8f91;"
97+
" border - radius: 6px;"
98+
" background - color: qlineargradient(x1 : 0, y1 : 0, x2 : 0, y2 : 1,"
99+
" stop : 0 #f6f7fa, stop: 1 #dadbde);"
100+
" min - width: 80px;"
101+
"}"
102+
"QPushButton:pressed{"
103+
"background - color: qlineargradient(x1 : 0, y1 : 0, x2 : 0, y2 : 1,"
104+
"stop : 0 #dadbde, stop: 1 #f6f7fa);"
105+
"}"
106+
"QPushButton:flat{"
107+
" border: none; /* no border for a flat push button */"
108+
"}"
109+
"QPushButton:default {"
110+
"border - color: navy; /* make the default button prominent */"
111+
"}"
112+
);
113+
menubar_->setStyleSheet("QMenuBar::item::selected{background-color : rgb(66, 66, 69); } QMenuBar::item::!selected{ background-color : rgb(66, 66, 69); } ");
114+
dialogErrorControl_.reset(new DialogErrorControl(this));
116115
setupNetworkEditor();
117116

118117
setTipsAndWhatsThis();
@@ -149,7 +148,8 @@ SCIRunMainWindow::SCIRunMainWindow() : firstTimePythonShown_(true)
149148
setActionIcons();
150149

151150
QToolBar* standardBar = addToolBar("Standard");
152-
standardBar->setStyleSheet("QToolBar { background-color: rgb(66,66,69); border: 1px solid black; color: black }");
151+
standardBar->setStyleSheet("QToolBar { background-color: rgb(66,66,69); border: 1px solid black; color: black }"
152+
"QToolTip { color: #ffffff; background - color: #2a82da; border: 1px solid white; }");
153153
standardBar->setObjectName("StandardToolBar");
154154
standardBar->addAction(actionNew_);
155155
standardBar->addAction(actionLoad_);
@@ -179,7 +179,9 @@ SCIRunMainWindow::SCIRunMainWindow() : firstTimePythonShown_(true)
179179

180180
networkProgressBar_.reset(new NetworkExecutionProgressBar(this));
181181
executeBar->addActions(networkProgressBar_->actions());
182-
executeBar->setStyleSheet("QToolBar { background-color: rgb(66,66,69); border: 1px solid black; color: black }");
182+
executeBar->setStyleSheet("QToolBar { background-color: rgb(66,66,69); border: 1px solid black; color: black }"
183+
"QToolTip { color: #ffffff; background - color: #2a82da; border: 1px solid white; }"
184+
);
183185
//executeBar->setStyleSheet(styleSheet());
184186
executeBar->setAutoFillBackground(true);
185187
connect(actionExecute_All_, SIGNAL(triggered()), networkProgressBar_.get(), SLOT(resetModulesDone()));
@@ -291,7 +293,10 @@ SCIRunMainWindow::SCIRunMainWindow() : firstTimePythonShown_(true)
291293
actionModule_Selector->setChecked(!moduleSelectorDockWidget_->isHidden());
292294
actionProvenance_->setChecked(!provenanceWindow_->isHidden());
293295

294-
moduleSelectorDockWidget_->setStyleSheet("QDockWidget {background: rgb(66,66,69); background-color: rgb(66,66,69) }");
296+
moduleSelectorDockWidget_->setStyleSheet("QDockWidget {background: rgb(66,66,69); background-color: rgb(66,66,69) }"
297+
"QToolTip { color: #ffffff; background - color: #2a82da; border: 1px solid white; }"
298+
"QHeaderView::section { background: rgb(66,66,69);} "
299+
);
295300

296301
provenanceWindow_->hide();
297302

src/Interface/Modules/Base/ModuleDialogGeneric.cc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -592,4 +592,20 @@ class RadioButtonGroupSlotManager : public WidgetSlotManager
592592
void ModuleDialogGeneric::addRadioButtonGroupManager(std::initializer_list<QRadioButton*> radioButtons, const AlgorithmParameterName& stateKey)
593593
{
594594
addWidgetSlotManager(boost::make_shared<RadioButtonGroupSlotManager>(state_, *this, stateKey, radioButtons));
595+
}
596+
597+
void ModuleDialogGeneric::tabStyle(QTabWidget* tabs)
598+
{
599+
tabs->setStyleSheet(
600+
"QTabBar::tab::selected, QTabBar::tab::hover {color:black; background-color: #F0F0F0; border: 1px solid rgb(66,66,69); min-width:2ex; padding: 5px 10px;} "
601+
"QTabBar::tab:!selected {color: white; background-color: rgb(66,66,69); border: 1px solid #FFFFFF; min-width:2ex; padding: 5px 10px; }"
602+
"QTabBar::tab:selected {color:black; background-color: #F0F0F0; border: 1px solid rgb(66,66,69); min-width:2ex; padding: 5px 10px;}"
603+
);
604+
}
605+
606+
void ModuleDialogGeneric::tableHeaderStyle(QTableWidget* tableHeader)
607+
{
608+
tableHeader->setStyleSheet(
609+
"QHeaderView::section {background: rgb(66,66,69);}"
610+
);
595611
}

src/Interface/Modules/Base/ModuleDialogGeneric.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ namespace Gui {
8585
~Pulling() { m_->pulling_ = false; }
8686
ModuleDialogGeneric* m_;
8787
};
88-
88+
void tabStyle(QTabWidget* tabs);
89+
void tableHeaderStyle(QTableWidget* tableHeader);
8990
void addComboBoxManager(QComboBox* comboBox, const Core::Algorithms::AlgorithmParameterName& stateKey);
9091
void addComboBoxManager(QComboBox* comboBox, const Core::Algorithms::AlgorithmParameterName& stateKey, const GuiStringTranslationMap& stringMap);
9192
void addTextEditManager(QTextEdit* textEdit, const Core::Algorithms::AlgorithmParameterName& stateKey);

src/Interface/Modules/BrainStimulator/ElectrodeCoilSetupDialog.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ ElectrodeCoilSetupDialog::ElectrodeCoilSetupDialog(const std::string& name, Modu
4848
setWindowTitle(QString::fromStdString(name));
4949
fixSize();
5050

51+
tableHeaderStyle(this->electrode_coil_tableWidget);
52+
tabStyle(this->tabWidget);
5153
electrode_coil_tableWidget->setRowCount(1);
5254
electrode_coil_tableWidget->setColumnCount(ElectrodeCoilSetupAlgorithm::number_of_columns);
5355
electrode_coil_tableWidget->setItem(0, 0, new QTableWidgetItem(" "));

src/Interface/Modules/BrainStimulator/GenerateROIStatisticsDialog.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ GenerateROIStatisticsDialog::GenerateROIStatisticsDialog(const std::string& name
4646
setupUi(this);
4747
setWindowTitle(QString::fromStdString(name));
4848
fixSize();
49+
tabStyle(this->tabWidget);
50+
tableHeaderStyle(this->SpecifyROI_tabWidget);
51+
tableHeaderStyle(this->StatisticsOutput_tableWidget);
4952

5053
QStringList tableHeader1; /// set default GUI parameter for upper table
5154
tableHeader1<<" ROI "<<" Avr. " << " Std. " << " Min. " << " Max. " << " # ";

src/Interface/Modules/BrainStimulator/SetConductivitiesToTetMeshDialog.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ SetConductivitiesToTetMeshDialog::SetConductivitiesToTetMeshDialog(const std::st
4242
setupUi(this);
4343
setWindowTitle(QString::fromStdString(name));
4444
fixSize();
45-
45+
tabStyle(this->tabWidget);
4646
using namespace Parameters;
4747
addDoubleSpinBoxManager(Skin_, Skin);
4848
addDoubleSpinBoxManager(SoftBone_, SoftBone);

src/Interface/Modules/BrainStimulator/SetupRHSforTDCSandTMSDialog.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ SetupRHSforTDCSandTMSDialog::SetupRHSforTDCSandTMSDialog(const std::string& name
3939
setupUi(this);
4040
setWindowTitle(QString::fromStdString(name));
4141
fixSize();
42-
42+
tabStyle(this->tabWidget);
43+
tableHeaderStyle(this->electrode_tableWidget);
4344
addSpinBoxManager(refnode_, Parameters::refnode);
4445
addDoubleSpinBoxManager(pointdistancebound_, Parameters::pointdistancebound);
4546
addDoubleSpinBoxManager(normal_dot_product_bound_, Parameters::normal_dot_product_bound);

src/Interface/Modules/Forward/BuildBEMatrixDialog.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ BuildBEMatrixDialog::BuildBEMatrixDialog(const std::string& name, ModuleStateHan
5454
setupUi(this);
5555
setWindowTitle(QString::fromStdString(name));
5656
fixSize();
57-
57+
tableHeaderStyle(this->tableWidget);
5858
tableWidget->resizeColumnsToContents();
5959

6060
connect(tableWidget, SIGNAL(cellChanged(int,int)), this, SLOT(pushTable(int,int)));

src/Interface/Modules/Visualization/ShowFieldDialog.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ ShowFieldDialog::ShowFieldDialog(const std::string& name, ModuleStateHandle stat
4545
setupUi(this);
4646
setWindowTitle(QString::fromStdString(name));
4747
fixSize();
48-
48+
tabStyle(this->displayOptionsTabs_);
4949
addCheckBoxManager(showNodesCheckBox_, ShowFieldModule::ShowNodes);
5050
addCheckBoxManager(showEdgesCheckBox_, ShowFieldModule::ShowEdges);
5151
addCheckBoxManager(showFacesCheckBox_, ShowFieldModule::ShowFaces);

0 commit comments

Comments
 (0)