Prettier about box

This commit is contained in:
Matt Keeter 2014-03-08 15:05:57 -08:00
parent a960f8b2a8
commit 907a76b4ad
3 changed files with 29 additions and 5 deletions

View file

@ -4,5 +4,6 @@
<file>gl/mesh.vert</file> <file>gl/mesh.vert</file>
<file>gl/quad.frag</file> <file>gl/quad.frag</file>
<file>gl/quad.vert</file> <file>gl/quad.vert</file>
<file>style.qss</file>
</qresource> </qresource>
</RCC> </RCC>

19
src/style.qss Normal file
View file

@ -0,0 +1,19 @@
QWidget {
background-color: "#fdf6e3";
color: "#839496";
}
QPushButton {
background-color: "#eee8d5";
border-top-width: 5px;
border-bottom-width: 5px;
border-left-width: 20px;
border-right-width: 20px;
border-style: flat;
margin: 0px;
color: "#839496";
}
QPushButton:pressed {
background-color: "#ddd7d4";
}

View file

@ -11,6 +11,10 @@ Window::Window(QWidget *parent) :
{ {
setWindowTitle("fstl"); setWindowTitle("fstl");
QFile styleFile( ":/style.qss" );
styleFile.open( QFile::ReadOnly );
setStyleSheet(styleFile.readAll());
QGLFormat format; QGLFormat format;
format.setVersion(2, 1); format.setVersion(2, 1);
format.setSampleBuffers(true); format.setSampleBuffers(true);
@ -54,11 +58,11 @@ void Window::on_open()
void Window::on_about() void Window::on_about()
{ {
QMessageBox::about(this, "About fstl", "<b>fstl</b><br><br>" QMessageBox::about(this, "", "<p align=\"center\"><b>fstl</b></p>"
"A fast viewer for <code>.stl</code> files.<br>" "<p>A fast viewer for <code>.stl</code> files.<br>"
"<a href=\"https://github.com/mkeeter/fstl\">https://github.com/mkeeter/fstl</a><br><br>" "<a href=\"https://github.com/mkeeter/fstl\">https://github.com/mkeeter/fstl</a></p>"
"© 2014 Matthew Keeter<br>" "<p>© 2014 Matthew Keeter<br>"
"<a href=\"mailto:matt.j.keeter@gmail.com\">matt.j.keeter@gmail.com</a><br>"); "<a href=\"mailto:matt.j.keeter@gmail.com\">matt.j.keeter@gmail.com</a></p>");
} }