Frontend:
authorsmxx
Thu, 18 Mar 2010 09:55:22 +0000
changeset 3019 d6e19f35d98d
parent 3018 13ceaad4767e
child 3020 9b443edb8dd1
Frontend: * Updated stylesheets and resized icons * Forced Frontend's minimum size to 800x600 * Fixed some swapped texts in German locale Graphics: * Added two hats by DJ. LisT
QTfrontend/chatwidget.cpp
QTfrontend/gameuiconfig.cpp
QTfrontend/hwform.cpp
QTfrontend/igbox.cpp
QTfrontend/main.cpp
QTfrontend/res/graphicsicon.png
QTfrontend/res/graphicsicon2.png
QTfrontend/res/miscicon.png
QTfrontend/res/teamicon.png
QTfrontend/res/teamicon2.png
QTfrontend/res/weaponsicon.png
hedgewars/GSHandlers.inc
share/hedgewars/Data/Graphics/Hats/angel.png
share/hedgewars/Data/Graphics/Hats/stormcloud.png
share/hedgewars/Data/Locale/hedgewars_de.qm
share/hedgewars/Data/Locale/hedgewars_de.ts
--- a/QTfrontend/chatwidget.cpp	Thu Mar 18 02:55:42 2010 +0000
+++ b/QTfrontend/chatwidget.cpp	Thu Mar 18 09:55:22 2010 +0000
@@ -39,7 +39,7 @@
     this->gameSettings = gameSettings;
     this->sdli = sdli;
     this->notify = notify;
-    if(notify && gameSettings->value("audio/frontendsound", true).toBool()) {
+    if(notify && gameSettings->value("frontend/sound", true).toBool()) {
        QDir tmpdir;
 
        tmpdir.cd(datadir->absolutePath());
@@ -238,7 +238,7 @@
     updateIcon(item);
     chatNicks->addItem(item);
 
-    if(notifyNick && notify && gameSettings->value("audio/frontendsound", true).toBool()) {
+    if(notifyNick && notify && gameSettings->value("frontend/sound", true).toBool()) {
        Mix_PlayChannel(-1, sound[rand()%4], 0);
     }
 }
--- a/QTfrontend/gameuiconfig.cpp	Thu Mar 18 02:55:42 2010 +0000
+++ b/QTfrontend/gameuiconfig.cpp	Thu Mar 18 09:55:22 2010 +0000
@@ -36,26 +36,26 @@
 
     connect(Form->ui.pageOptions->CBEnableFrontendMusic, SIGNAL(toggled(bool)), Form, SLOT(Music(bool)));
 
-    //Form->resize(value("window/width", 640).toUInt(), value("window/height", 450).toUInt());
+    //Form->resize(value("frontend/width", 640).toUInt(), value("frontend/height", 450).toUInt());
     resizeToConfigValues();
 
-    Form->ui.pageOptions->WeaponTooltip->setChecked(value("misc/weaponTooltip", true).toBool());
+    Form->ui.pageOptions->WeaponTooltip->setChecked(value("misc/weaponTooltips", true).toBool());
 
     int t = Form->ui.pageOptions->CBResolution->findText(value("video/resolution").toString());
     Form->ui.pageOptions->CBResolution->setCurrentIndex((t < 0) ? 0 : t);
     Form->ui.pageOptions->CBFullscreen->setChecked(value("video/fullscreen", false).toBool());
-    bool ffscr=value("video/frontendfullscreen", false).toBool();
+    bool ffscr=value("frontend/fullscreen", false).toBool();
     Form->ui.pageOptions->CBFrontendFullscreen->setChecked(ffscr);
 
     Form->ui.pageOptions->CBReduceQuality->setChecked(value("video/reducequality", false).toBool());
     Form->ui.pageOptions->CBFrontendEffects->setChecked(frontendEffects);
     Form->ui.pageOptions->CBEnableSound->setChecked(value("audio/sound", true).toBool());
-    Form->ui.pageOptions->CBEnableFrontendSound->setChecked(value("audio/frontendsound", true).toBool());
+    Form->ui.pageOptions->CBEnableFrontendSound->setChecked(value("frontend/sound", true).toBool());
 #ifdef _WIN32
 //  Form->ui.pageOptions->CBHardwareSound->setChecked(value("audio/hardware", false).toBool());
 #endif
     Form->ui.pageOptions->CBEnableMusic->setChecked(value("audio/music", true).toBool());
-    Form->ui.pageOptions->CBEnableFrontendMusic->setChecked(value("audio/frontendmusic", true).toBool());
+    Form->ui.pageOptions->CBEnableFrontendMusic->setChecked(value("frontend/music", true).toBool());
     Form->ui.pageOptions->volumeBox->setValue(value("audio/volume", 100).toUInt());
 
     QString netNick = value("net/nick", "").toString();
@@ -76,7 +76,7 @@
     Form->ui.pageNetServer->sbPort->setValue(value("net/serverport", 46631).toUInt());
 
     Form->ui.pageOptions->CBShowFPS->setChecked(value("fps/show", false).toBool());
-    Form->ui.pageOptions->fpsedit->setValue(value("fps/interval", 27).toUInt());
+    Form->ui.pageOptions->fpsedit->setValue(value("fps/limit", 27).toUInt());
 
     Form->ui.pageOptions->CBAltDamage->setChecked(value("misc/altdamage", false).toBool());
     Form->ui.pageOptions->CBNameWithDate->setChecked(value("misc/appendTimeToRecords", false).toBool());
@@ -105,7 +105,7 @@
 
 void GameUIConfig::resizeToConfigValues()
 {
-        Form->resize(value("window/width", 720).toUInt(), value("window/height", 450).toUInt());
+        Form->resize(value("frontend/width", 800).toUInt(), value("frontend/height", 600).toUInt());
 }
 
 void GameUIConfig::SaveOptions()
@@ -115,27 +115,27 @@
 
     setValue("video/reducequality", isReducedQuality());
 
-    setValue("video/frontendeffects", isFrontendEffects());
+    setValue("frontend/effects", isFrontendEffects());
 
-    setValue("misc/weaponTooltip", isWeaponTooltip());
+    setValue("misc/weaponTooltips", isWeaponTooltip());
 
     bool ffscr = isFrontendFullscreen();
-    setValue("video/frontendfullscreen", ffscr);
+    setValue("frontend/fullscreen", ffscr);
     emit frontendFullscreen(ffscr);
     if (!ffscr) {
-      setValue("window/width", Form->width());
-      setValue("window/height", Form->height());
+      setValue("frontend/width", Form->width());
+      setValue("frontend/height", Form->height());
     } else {
       //resizeToConfigValues(); // TODO: why this has been made?
     }
 
     setValue("audio/sound", isSoundEnabled());
-    setValue("audio/frontendsound", isFrontendSoundEnabled());
+    setValue("frontend/sound", isFrontendSoundEnabled());
 #ifdef _WIN32
 //  setValue("audio/hardware", isSoundHardware());
 #endif
     setValue("audio/music", isMusicEnabled());
-    setValue("audio/frontendmusic", isFrontendMusicEnabled());
+    setValue("frontend/music", isFrontendMusicEnabled());
     setValue("audio/volume", Form->ui.pageOptions->volumeBox->value());
 
     setValue("net/nick", netNick());
@@ -145,7 +145,7 @@
     setValue("net/serverport", Form->ui.pageNetServer->sbPort->value());
 
     setValue("fps/show", isShowFPSEnabled());
-    setValue("fps/interval", Form->ui.pageOptions->fpsedit->value());
+    setValue("fps/limit", Form->ui.pageOptions->fpsedit->value());
 
     setValue("misc/altdamage", isAltDamageEnabled());
     setValue("misc/appendTimeToRecords", appendDateTimeToRecordName());
--- a/QTfrontend/hwform.cpp	Thu Mar 18 02:55:42 2010 +0000
+++ b/QTfrontend/hwform.cpp	Thu Mar 18 09:55:22 2010 +0000
@@ -78,10 +78,11 @@
     xfire_init();
 #endif
     gameSettings = new QSettings(cfgdir->absolutePath() + "/hedgewars.ini", QSettings::IniFormat);
-    frontendEffects = gameSettings->value("video/frontendeffects", true).toBool();
+    frontendEffects = gameSettings->value("frontend/effects", true).toBool();
     playerHash = QString(QCryptographicHash::hash(gameSettings->value("net/nick","").toString().toLatin1(), QCryptographicHash::Md5).toHex());
 
     ui.setupUi(this);
+    setMinimumSize(800, 600);
 
     CustomizePalettes();
     
--- a/QTfrontend/igbox.cpp	Thu Mar 18 02:55:42 2010 +0000
+++ b/QTfrontend/igbox.cpp	Thu Mar 18 09:55:22 2010 +0000
@@ -27,8 +27,8 @@
 {
 // Has issues with border-radius on children
 //    setAttribute(Qt::WA_PaintOnScreen, true);
-    titleLeftPadding = 82;
-    contentTopPadding = 22;
+    titleLeftPadding = 49;
+    contentTopPadding = 15;
 }
 
 void IconedGroupBox::setIcon(const QIcon & icon)
@@ -44,7 +44,7 @@
                 "subcontrol-origin: margin;"
                 "subcontrol-position: top left;"
                 "padding-left: %2px;"
-                "padding-top: 25px;"
+                "padding-top: %1px;"
                 "text-align: left;"
                 "}"
                 ).arg(contentTopPadding).arg(titleLeftPadding)
--- a/QTfrontend/main.cpp	Thu Mar 18 02:55:42 2010 +0000
+++ b/QTfrontend/main.cpp	Thu Mar 18 09:55:22 2010 +0000
@@ -121,14 +121,14 @@
 
             "QLineEdit, QListWidget,QTableView, QTextBrowser, "
             "QSpinBox, QToolBox { "
-                "border-radius: 12px;"
+                "border-radius: 10px;"
             "}"
 
             "QLineEdit, QLabel, QHeaderView, QListWidget, QTableView, "
             "QSpinBox, QToolBox::tab, QComboBox, QComboBox QAbstractItemView, "
             "IconedGroupBox, .QGroupBox, GameCFGWidget, TeamSelWidget, "
-            "SelWeaponWidget, QCheckBox, QRadioButton {"
-                "font: bold 14px;"
+            "SelWeaponWidget, QCheckBox, QRadioButton, QPushButton {"
+                "font: bold 13px;"
             "}"
             "SelWeaponWidget QTabWidget::pane, SelWeaponWidget QTabBar::tab:selected {"
                 "background-position: bottom center;"
@@ -154,7 +154,7 @@
 
 
             "QPushButton {"
-                "border-radius: 10px;"
+                "border-radius: 8px;"
                 "background-origin: margin;"
                 "background-position: top left;"
                 "background-color: rgba(18, 42, 5, 70%);"
@@ -206,7 +206,7 @@
             "}"
 
             "QComboBox {"
-                "border-radius: 15px;"
+                "border-radius: 10px;"
                 "padding: 3px;"
             "}"
             "QComboBox:pressed{"
@@ -277,6 +277,7 @@
 
             "QToolTip{"
                 "background-color: #0d0544;"
+                "border: 1px solid #ffcc00;"
             "}"
 
             ":disabled{"
Binary file QTfrontend/res/graphicsicon.png has changed
Binary file QTfrontend/res/graphicsicon2.png has changed
Binary file QTfrontend/res/miscicon.png has changed
Binary file QTfrontend/res/teamicon.png has changed
Binary file QTfrontend/res/teamicon2.png has changed
Binary file QTfrontend/res/weaponsicon.png has changed
--- a/hedgewars/GSHandlers.inc	Thu Mar 18 02:55:42 2010 +0000
+++ b/hedgewars/GSHandlers.inc	Thu Mar 18 09:55:22 2010 +0000
@@ -166,7 +166,6 @@
 ////////////////////////////////////////////////////////////////////////////////
 procedure doStepFallingGear(Gear: PGear);
 var isFalling: boolean;
-    tmp: QWord;
     tdX, tdY: hwFloat;
     collV, collH: LongInt;
 begin
Binary file share/hedgewars/Data/Graphics/Hats/angel.png has changed
Binary file share/hedgewars/Data/Graphics/Hats/stormcloud.png has changed
Binary file share/hedgewars/Data/Locale/hedgewars_de.qm has changed
--- a/share/hedgewars/Data/Locale/hedgewars_de.ts	Thu Mar 18 02:55:42 2010 +0000
+++ b/share/hedgewars/Data/Locale/hedgewars_de.ts	Thu Mar 18 09:55:22 2010 +0000
@@ -625,7 +625,7 @@
     </message>
     <message>
         <source>Enable sound</source>
-        <translation>Sound an</translation>
+        <translation>Klänge im Spiel</translation>
     </message>
     <message>
         <source>Show FPS</source>
@@ -637,7 +637,7 @@
     </message>
     <message>
         <source>Enable music</source>
-        <translation>Musik an</translation>
+        <translation>Musik im Spiel</translation>
     </message>
     <message>
         <source>Frontend fullscreen</source>
@@ -661,19 +661,19 @@
     </message>
     <message>
         <source>Show ammo menu tooltips</source>
-        <translation>Hilfefenster für Waffen anzeigen</translation>
+        <translation type="unfinished">Kurzinfos für Waffen anzeigen</translation>
     </message>
     <message>
         <source>Enable frontend sounds</source>
-        <translation>Musik an (Frontend)</translation>
+        <translation>Klänge im Frontend</translation>
     </message>
     <message>
         <source>Enable frontend music</source>
-        <translation>Sounds an (Frontend)</translation>
+        <translation>Musik im Frontend</translation>
     </message>
     <message>
         <source>Frontend effects</source>
-        <translation>Frontendeffekte</translation>
+        <translation>Animationen im Frontend</translation>
     </message>
 </context>
 <context>
@@ -818,7 +818,7 @@
     </message>
     <message>
         <source>Damage Modifier</source>
-        <translation type="unfinished">Prozentualer Schaden</translation>
+        <translation>Prozentualer Schaden</translation>
     </message>
     <message>
         <source>Turn Time</source>