• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javaandroidc++linuxc#objective-ccocoa誰得qtrubypythonwindowsphpgamebathyscaphegui翻訳comegattwitterframeworkbtronvb.net計画中(planning stage)testdomarduinodirectxpreviewerゲームエンジン

Commit MetaInfo

Revision80be1253b80c91179433fa362f3848e1388ba2f0 (tree)
Zeit2014-04-11 22:03:05
Autorjakago <jakago777@gmai...>
Commiterjakago

Log Message

GUI変更中

Ändern Zusammenfassung

Diff

--- a/customizedialog.ui
+++ b/customizedialog.ui
@@ -31,12 +31,24 @@
3131 <widget class="QDialogButtonBox" name="buttonBox">
3232 <property name="geometry">
3333 <rect>
34- <x>200</x>
34+ <x>340</x>
3535 <y>570</y>
36- <width>341</width>
36+ <width>201</width>
3737 <height>32</height>
3838 </rect>
3939 </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>
4052 <property name="orientation">
4153 <enum>Qt::Horizontal</enum>
4254 </property>
@@ -50,7 +62,7 @@
5062 <x>10</x>
5163 <y>253</y>
5264 <width>527</width>
53- <height>311</height>
65+ <height>312</height>
5466 </rect>
5567 </property>
5668 <layout class="QGridLayout" name="gridLayout">
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -51,6 +51,7 @@
5151 #define SCRAMBLE_URL1 "http://www47.atwiki.jp/jakago/pub/scramble.xml"
5252 #define SCRAMBLE_URL2 "http://cdn47.atwikiimg.com/jakago/pub/scramble.xml"
5353 #define X11_WINDOW_VERTICAL_INCREMENT 5
54+#define STYLE_SHEET "stylesheet.qss"
5455
5556 namespace {
5657 bool outputDirSpecified = false;
@@ -124,9 +125,16 @@ MainWindow::MainWindow( QWidget *parent )
124125 //connect( action, SIGNAL( triggered() ), this, SLOT( customizeScramble() ) );
125126 //customizeMenu->addAction( action );
126127
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+ }
130138 qApp->setStyleSheet( styleSheet );
131139 }
132140
--- a/stylesheet.qss
+++ b/stylesheet.qss
@@ -1,7 +1,11 @@
11 QWidget {
22 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+ */
59 }
610
711 QMenuBar {
@@ -20,25 +24,18 @@ QMenuBar::item:pressed {
2024 background: #888888;
2125 }
2226
23-/*
24-QPlainTextEdit {
25- background-color: lightsteelblue;
26-}
27-*/
28-
2927 QPushButton {
30- /*background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #f6f7fa, stop: 1 #dadbde);*/
3128 background-color: gainsboro;
29+ /*
30+ background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 1, stop: 0 whitesmoke, stop: 1 silver);
31+ */
3232 border-top: 1px solid white;
3333 border-left: 1px solid white;
3434 border-right: 2px solid dimgray;
3535 border-bottom: 2px solid dimgray;
3636 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;
4239 }
4340
4441 /*