]> git.sur5r.net Git - fstl/commitdiff
Prettier about box
authorMatt Keeter <matt.j.keeter@gmail.com>
Sat, 8 Mar 2014 23:05:57 +0000 (15:05 -0800)
committerMatt Keeter <matt.j.keeter@gmail.com>
Sat, 8 Mar 2014 23:05:57 +0000 (15:05 -0800)
src/resources.qrc
src/style.qss [new file with mode: 0644]
src/window.cpp

index 1cb5c2ccc1ccb16a9be335ec622a8a7c8acc700e..a88f834359a2885e1c595a7b372f8db8e79fed1d 100644 (file)
@@ -4,5 +4,6 @@
         <file>gl/mesh.vert</file>
         <file>gl/quad.frag</file>
         <file>gl/quad.vert</file>
+        <file>style.qss</file>
     </qresource>
 </RCC>
diff --git a/src/style.qss b/src/style.qss
new file mode 100644 (file)
index 0000000..a4dde3a
--- /dev/null
@@ -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";
+}
index 34a0a561fd3f8774419520ac659837299286c0d2..280dad5fb70747fd498b98936c45a17d81e37f73 100644 (file)
@@ -11,6 +11,10 @@ Window::Window(QWidget *parent) :
 {
     setWindowTitle("fstl");
 
+    QFile styleFile( ":/style.qss" );
+    styleFile.open( QFile::ReadOnly );
+    setStyleSheet(styleFile.readAll());
+
     QGLFormat format;
     format.setVersion(2, 1);
     format.setSampleBuffers(true);
@@ -54,11 +58,11 @@ void Window::on_open()
 
 void Window::on_about()
 {
-    QMessageBox::about(this, "About fstl", "<b>fstl</b><br><br>"
-                       "A fast viewer for <code>.stl</code> files.<br>"
-                       "<a href=\"https://github.com/mkeeter/fstl\">https://github.com/mkeeter/fstl</a><br><br>"
-                       "© 2014 Matthew Keeter<br>"
-                       "<a href=\"mailto:matt.j.keeter@gmail.com\">matt.j.keeter@gmail.com</a><br>");
+    QMessageBox::about(this, "", "<p align=\"center\"><b>fstl</b></p>"
+                       "<p>A fast viewer for <code>.stl</code> files.<br>"
+                       "<a href=\"https://github.com/mkeeter/fstl\">https://github.com/mkeeter/fstl</a></p>"
+                       "<p>© 2014 Matthew Keeter<br>"
+                       "<a href=\"mailto:matt.j.keeter@gmail.com\">matt.j.keeter@gmail.com</a></p>");
 }