From 907a76b4adfdaa36db28bb1b780f3074a0abbdcf Mon Sep 17 00:00:00 2001 From: Matt Keeter Date: Sat, 8 Mar 2014 15:05:57 -0800 Subject: [PATCH] Prettier about box --- src/resources.qrc | 1 + src/style.qss | 19 +++++++++++++++++++ src/window.cpp | 14 +++++++++----- 3 files changed, 29 insertions(+), 5 deletions(-) create mode 100644 src/style.qss diff --git a/src/resources.qrc b/src/resources.qrc index 1cb5c2c..a88f834 100644 --- a/src/resources.qrc +++ b/src/resources.qrc @@ -4,5 +4,6 @@ gl/mesh.vert gl/quad.frag gl/quad.vert + style.qss diff --git a/src/style.qss b/src/style.qss new file mode 100644 index 0000000..a4dde3a --- /dev/null +++ b/src/style.qss @@ -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"; +} diff --git a/src/window.cpp b/src/window.cpp index 34a0a56..280dad5 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -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", "fstl

" - "A fast viewer for .stl files.
" - "https://github.com/mkeeter/fstl

" - "© 2014 Matthew Keeter
" - "matt.j.keeter@gmail.com
"); + QMessageBox::about(this, "", "

fstl

" + "

A fast viewer for .stl files.
" + "https://github.com/mkeeter/fstl

" + "

© 2014 Matthew Keeter
" + "matt.j.keeter@gmail.com

"); } -- 2.39.2