Some styling

This commit is contained in:
Anakin 2017-01-21 16:33:03 +01:00
parent c4444bcefd
commit 6fa81a8ccc
3 changed files with 31 additions and 0 deletions

View File

@ -8,6 +8,7 @@
</qresource> </qresource>
<qresource prefix="/files"> <qresource prefix="/files">
<file>about.txt</file> <file>about.txt</file>
<file>StyleSheet.txt</file>
</qresource> </qresource>
<qresource prefix="/images/toolbar"> <qresource prefix="/images/toolbar">
<file>placeholder.png</file> <file>placeholder.png</file>

View File

@ -0,0 +1,21 @@
QToolButton#test123 {
color: #000000;
}
QToolButton:checked {
background-color: #ffffff;
border-style: inset;
border-width: 1px;
border-radius: 5px;
border-color: #b3b3b3;
min-height: 25px
}
QToolButton:hover {
border-style: solid;
border-width: 1px;
border-radius: 5px;
border-color: #a4daff;
min-height: 25px
}

View File

@ -35,6 +35,10 @@ MainWindow::MainWindow(QWidget *parent)
ui->statusBar->showMessage("MeshViewer by Anakin", 0); ui->statusBar->showMessage("MeshViewer by Anakin", 0);
m_fileInfo += "Filename: -\nMaterials: -\nVertices: -\nTriangle: -<detail>No file is open"; m_fileInfo += "Filename: -\nMaterials: -\nVertices: -\nTriangle: -<detail>No file is open";
QFile styleSheet(":/files/StyleSheet.txt");
styleSheet.open(QIODevice::ReadOnly);
this->setStyleSheet(styleSheet.readAll());
} }
MainWindow::~MainWindow() MainWindow::~MainWindow()
@ -118,6 +122,11 @@ void MainWindow::setupWidgets()
connect(help, &QAction::triggered, this, &MainWindow::aboutTool); connect(help, &QAction::triggered, this, &MainWindow::aboutTool);
ui->mainToolBar->addAction(help); ui->mainToolBar->addAction(help);
QAction *test = new QAction(this);
test->setCheckable(true);
test->setObjectName("test123");
ui->mainToolBar->addAction(test);
m_output->setObjectName("output"); m_output->setObjectName("output");
m_output->setStyleSheet("QLabel#output{color : white; min-width: 400px; min-height: 50px;}"); m_output->setStyleSheet("QLabel#output{color : white; min-width: 400px; min-height: 50px;}");
m_output->setAlignment(Qt::AlignTop); m_output->setAlignment(Qt::AlignTop);