Shorten text of buttons to load/edit drawn map and make them look nicer
authorWuzzy <Wuzzy2@mail.ru>
Tue, 22 Jan 2019 21:34:13 +0100
changeset 14671 95b1b9ea505a
parent 14670 6608a68ca0ee
child 14672 6b70c109389f
Shorten text of buttons to load/edit drawn map and make them look nicer
QTfrontend/ui/widget/mapContainer.cpp
share/hedgewars/Data/Locale/hedgewars_de.ts
--- a/QTfrontend/ui/widget/mapContainer.cpp	Tue Jan 22 18:28:05 2019 +0100
+++ b/QTfrontend/ui/widget/mapContainer.cpp	Tue Jan 22 21:34:13 2019 +0100
@@ -229,14 +229,34 @@
 
     drawnControls->addStretch(1);
 
-    btnLoadMap = new QPushButton(tr("Load map drawing"));
-    btnLoadMap->setStyleSheet("padding: 20px;");
+    QPixmap pmLoad(":/res/Load.png");
+    QIcon iconLoad = QIcon(pmLoad);
+    sz = iconLoad.actualSize(QSize(48, 48));
+
+    btnLoadMap = new QPushButton(tr("Load"));
+    btnLoadMap->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
+    btnLoadMap->setWhatsThis(tr("Load map drawing"));
+    btnLoadMap->setStyleSheet("padding: 5px;");
+    btnLoadMap->setFixedHeight(50);
+    btnLoadMap->setIcon(iconLoad);
+    btnLoadMap->setIconSize(sz);
+    btnLoadMap->setFlat(true);
     drawnControls->addWidget(btnLoadMap, 0);
     m_childWidgets << btnLoadMap;
     connect(btnLoadMap, SIGNAL(clicked()), this, SLOT(loadDrawing()));
 
-    btnEditMap = new QPushButton(tr("Edit map drawing"));
-    btnEditMap->setStyleSheet("padding: 20px;");
+    QPixmap pmEdit(":/res/edit.png");
+    QIcon iconEdit = QIcon(pmEdit);
+    sz = iconEdit.actualSize(QSize(48, 48));
+
+    btnEditMap = new QPushButton(tr("Edit"));
+    btnEditMap->setWhatsThis(tr("Edit map drawing"));
+    btnEditMap->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
+    btnEditMap->setStyleSheet("padding: 5px;");
+    btnEditMap->setFixedHeight(50);
+    btnEditMap->setIcon(iconEdit);
+    btnEditMap->setIconSize(sz);
+    btnEditMap->setFlat(true);
     drawnControls->addWidget(btnEditMap, 0);
     m_childWidgets << btnEditMap;
     connect(btnEditMap, SIGNAL(clicked()), this, SIGNAL(drawMapRequested()));
--- a/share/hedgewars/Data/Locale/hedgewars_de.ts	Tue Jan 22 18:28:05 2019 +0100
+++ b/share/hedgewars/Data/Locale/hedgewars_de.ts	Tue Jan 22 21:34:13 2019 +0100
@@ -817,13 +817,11 @@
     </message>
     <message>
         <source>Load map drawing</source>
-        <translation>Gezeichnete
-Karte laden</translation>
+        <translation>Gezeichnete Karte laden</translation>
     </message>
     <message>
         <source>Edit map drawing</source>
-        <translation>Gezeichnete
-Karte bearbeiten</translation>
+        <translation>Gezeichnete Karte bearbeiten</translation>
     </message>
     <message>
         <source>Small islands</source>