Skip to content

Commit d9a7a41

Browse files
StyleSheet changes
Stylesheet changes for tabs, tables, tooltips, main file menu.
1 parent 1e82362 commit d9a7a41

File tree

9 files changed

+69
-44
lines changed

9 files changed

+69
-44
lines changed

src/Interface/Application/SCIRunMainWindow.cc

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

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

117116
setTipsAndWhatsThis();
@@ -148,7 +147,8 @@ SCIRunMainWindow::SCIRunMainWindow() : firstTimePythonShown_(true)
148147
setActionIcons();
149148

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

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

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

295300
provenanceWindow_->hide();
296301

src/Interface/Modules/Base/ModuleDialogGeneric.cc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -592,4 +592,19 @@ 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+
this->setStyleSheet(
600+
"QTabBar::tab:!selected {background: rgb(66,66,69); border: 1px solid #FFFFFF; min-width:2ex; padding: 5px 10px; }"
601+
"QTabBar::tab:selected{color:black; background: #F0F0F0; border: 1px solid #C4C4C3; min-width:2ex; padding: 5px 10px;}"
602+
);
603+
}
604+
605+
void ModuleDialogGeneric::tableHeaderStyle(QTableWidget* tableHeader)
606+
{
607+
this->setStyleSheet(
608+
"QHeaderView::section {background: rgb(66,66,69);}"
609+
);
595610
}

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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ ElectrodeCoilSetupDialog::ElectrodeCoilSetupDialog(const std::string& name, Modu
4747
setupUi(this);
4848
setWindowTitle(QString::fromStdString(name));
4949
fixSize();
50-
50+
tabStyle(this->tabWidget);
51+
tableHeaderStyle(this->electrode_coil_tableWidget);
5152
electrode_coil_tableWidget->setRowCount(1);
5253
electrode_coil_tableWidget->setColumnCount(ElectrodeCoilSetupAlgorithm::number_of_columns);
5354
electrode_coil_tableWidget->setItem(0, 0, new QTableWidgetItem(" "));

src/Interface/Modules/BrainStimulator/GenerateROIStatisticsDialog.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ 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);
4951

5052
QStringList tableHeader1; /// set default GUI parameter for upper table
5153
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
@@ -50,7 +50,7 @@ BuildBEMatrixDialog::BuildBEMatrixDialog(const std::string& name, ModuleStateHan
5050
setupUi(this);
5151
setWindowTitle(QString::fromStdString(name));
5252
fixSize();
53-
53+
tableHeaderStyle(this->tableWidget);
5454
tableWidget->resizeColumnsToContents();
5555

5656
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)