Revision | 80be1253b80c91179433fa362f3848e1388ba2f0 (tree) |
---|---|
Zeit | 2014-04-11 22:03:05 |
Autor | jakago <jakago777@gmai...> |
Commiter | jakago |
GUI変更中
@@ -31,12 +31,24 @@ | ||
31 | 31 | <widget class="QDialogButtonBox" name="buttonBox"> |
32 | 32 | <property name="geometry"> |
33 | 33 | <rect> |
34 | - <x>200</x> | |
34 | + <x>340</x> | |
35 | 35 | <y>570</y> |
36 | - <width>341</width> | |
36 | + <width>201</width> | |
37 | 37 | <height>32</height> |
38 | 38 | </rect> |
39 | 39 | </property> |
40 | + <property name="sizePolicy"> | |
41 | + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> | |
42 | + <horstretch>0</horstretch> | |
43 | + <verstretch>0</verstretch> | |
44 | + </sizepolicy> | |
45 | + </property> | |
46 | + <property name="minimumSize"> | |
47 | + <size> | |
48 | + <width>0</width> | |
49 | + <height>0</height> | |
50 | + </size> | |
51 | + </property> | |
40 | 52 | <property name="orientation"> |
41 | 53 | <enum>Qt::Horizontal</enum> |
42 | 54 | </property> |
@@ -50,7 +62,7 @@ | ||
50 | 62 | <x>10</x> |
51 | 63 | <y>253</y> |
52 | 64 | <width>527</width> |
53 | - <height>311</height> | |
65 | + <height>312</height> | |
54 | 66 | </rect> |
55 | 67 | </property> |
56 | 68 | <layout class="QGridLayout" name="gridLayout"> |
@@ -51,6 +51,7 @@ | ||
51 | 51 | #define SCRAMBLE_URL1 "http://www47.atwiki.jp/jakago/pub/scramble.xml" |
52 | 52 | #define SCRAMBLE_URL2 "http://cdn47.atwikiimg.com/jakago/pub/scramble.xml" |
53 | 53 | #define X11_WINDOW_VERTICAL_INCREMENT 5 |
54 | +#define STYLE_SHEET "stylesheet.qss" | |
54 | 55 | |
55 | 56 | namespace { |
56 | 57 | bool outputDirSpecified = false; |
@@ -124,9 +125,16 @@ MainWindow::MainWindow( QWidget *parent ) | ||
124 | 125 | //connect( action, SIGNAL( triggered() ), this, SLOT( customizeScramble() ) ); |
125 | 126 | //customizeMenu->addAction( action ); |
126 | 127 | |
127 | - QFile file(":/default.qss"); | |
128 | - file.open(QFile::ReadOnly); | |
129 | - QString styleSheet = QLatin1String(file.readAll()); | |
128 | + QString styleSheet; | |
129 | + QFile real( Utility::applicationBundlePath() + STYLE_SHEET ); | |
130 | + if ( real.exists() ) { | |
131 | + real.open( QFile::ReadOnly ); | |
132 | + styleSheet = QLatin1String( real.readAll() ); | |
133 | + } else { | |
134 | + QFile res( QString( ":/" ) + STYLE_SHEET ); | |
135 | + res.open( QFile::ReadOnly ); | |
136 | + styleSheet = QLatin1String( res.readAll() ); | |
137 | + } | |
130 | 138 | qApp->setStyleSheet( styleSheet ); |
131 | 139 | } |
132 | 140 |
@@ -1,7 +1,11 @@ | ||
1 | 1 | QWidget { |
2 | 2 | background-color: gainsboro; |
3 | - /*background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #f6f7fa, stop: 1 #dadbde);*/ | |
4 | - /*color: #e7e7eb;*/ | |
3 | + /* | |
4 | + background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 1, stop: 0 whitesmoke, stop: 1 silver); | |
5 | + */ | |
6 | + /* | |
7 | + color: #e7e7eb; | |
8 | + */ | |
5 | 9 | } |
6 | 10 | |
7 | 11 | QMenuBar { |
@@ -20,25 +24,18 @@ QMenuBar::item:pressed { | ||
20 | 24 | background: #888888; |
21 | 25 | } |
22 | 26 | |
23 | -/* | |
24 | -QPlainTextEdit { | |
25 | - background-color: lightsteelblue; | |
26 | -} | |
27 | -*/ | |
28 | - | |
29 | 27 | QPushButton { |
30 | - /*background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #f6f7fa, stop: 1 #dadbde);*/ | |
31 | 28 | background-color: gainsboro; |
29 | + /* | |
30 | + background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 1, stop: 0 whitesmoke, stop: 1 silver); | |
31 | + */ | |
32 | 32 | border-top: 1px solid white; |
33 | 33 | border-left: 1px solid white; |
34 | 34 | border-right: 2px solid dimgray; |
35 | 35 | border-bottom: 2px solid dimgray; |
36 | 36 | border-radius: 10px; |
37 | - /* | |
38 | - padding: 3px; | |
39 | - min-width: 9ex; | |
40 | - min-height: 2.5ex; | |
41 | - */ | |
37 | + min-width: 12ex; | |
38 | + min-height: 3ex; | |
42 | 39 | } |
43 | 40 | |
44 | 41 | /* |