1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-26 22:57:00 +02:00

Merge pull request #1178 from Nordsoft91/editor-icons

Add icons for map editor toolbal
This commit is contained in:
Andrii Danylchenko 2022-11-30 14:43:37 +02:00 committed by GitHub
commit 6015e160cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 95 additions and 9 deletions

View File

@ -112,7 +112,7 @@ if(WIN32)
endif() endif()
if(APPLE) if(APPLE)
# This makes Xcode project prettier by moving vcmilauncher_autogen directory into vcmiclient subfolder # This makes Xcode project prettier by moving mapeditor_autogen directory into vcmiclient subfolder
set_property(GLOBAL PROPERTY AUTOGEN_TARGETS_FOLDER vcmieditor) set_property(GLOBAL PROPERTY AUTOGEN_TARGETS_FOLDER vcmieditor)
endif() endif()

BIN
mapeditor/icons/brush-1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
mapeditor/icons/brush-2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
mapeditor/icons/brush-4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
mapeditor/icons/brush-5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1008 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 723 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -120,6 +120,10 @@ MainWindow::MainWindow(QWidget* parent) :
ui(new Ui::MainWindow), ui(new Ui::MainWindow),
controller(this) controller(this)
{ {
for(auto & string : VCMIDirs::get().dataPaths())
QDir::addSearchPath("icons", pathToQString(string / "mapeditor" / "icons"));
QDir::addSearchPath("icons", pathToQString(VCMIDirs::get().userDataPath() / "mapeditor" / "icons"));
ui->setupUi(this); ui->setupUi(this);
loadUserSettings(); //For example window size loadUserSettings(); //For example window size
setTitle(); setTitle();

View File

@ -487,7 +487,17 @@
</size> </size>
</property> </property>
<property name="text"> <property name="text">
<string>1</string> <string/>
</property>
<property name="icon">
<iconset>
<normaloff>icons:brush-1.png</normaloff>icons:brush-1.png</iconset>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property> </property>
<property name="checkable"> <property name="checkable">
<bool>true</bool> <bool>true</bool>
@ -521,7 +531,17 @@
</size> </size>
</property> </property>
<property name="text"> <property name="text">
<string>2</string> <string/>
</property>
<property name="icon">
<iconset>
<normaloff>icons:brush-2.png</normaloff>icons:brush-2.png</iconset>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property> </property>
<property name="checkable"> <property name="checkable">
<bool>true</bool> <bool>true</bool>
@ -555,7 +575,17 @@
</size> </size>
</property> </property>
<property name="text"> <property name="text">
<string>4</string> <string/>
</property>
<property name="icon">
<iconset>
<normaloff>icons:brush-4.png</normaloff>icons:brush-4.png</iconset>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property> </property>
<property name="checkable"> <property name="checkable">
<bool>true</bool> <bool>true</bool>
@ -586,7 +616,11 @@
</size> </size>
</property> </property>
<property name="text"> <property name="text">
<string>[]</string> <string/>
</property>
<property name="icon">
<iconset>
<normaloff>icons:brush-5.png</normaloff>icons:brush-5.png</iconset>
</property> </property>
<property name="checkable"> <property name="checkable">
<bool>true</bool> <bool>true</bool>
@ -654,7 +688,11 @@
</size> </size>
</property> </property>
<property name="text"> <property name="text">
<string>E</string> <string/>
</property>
<property name="icon">
<iconset>
<normaloff>icons:edit-clear.png</normaloff>icons:edit-clear.png</iconset>
</property> </property>
<property name="checkable"> <property name="checkable">
<bool>false</bool> <bool>false</bool>
@ -690,7 +728,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>128</width> <width>128</width>
<height>271</height> <height>251</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@ -733,7 +771,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>128</width> <width>128</width>
<height>271</height> <height>251</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@ -769,7 +807,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>128</width> <width>128</width>
<height>271</height> <height>251</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@ -821,6 +859,10 @@
</widget> </widget>
</widget> </widget>
<action name="actionOpen"> <action name="actionOpen">
<property name="icon">
<iconset>
<normaloff>icons:document-open.png</normaloff>icons:document-open.png</iconset>
</property>
<property name="text"> <property name="text">
<string>Open</string> <string>Open</string>
</property> </property>
@ -829,6 +871,10 @@
</property> </property>
</action> </action>
<action name="actionSave"> <action name="actionSave">
<property name="icon">
<iconset>
<normaloff>icons:document-save.png</normaloff>icons:document-save.png</iconset>
</property>
<property name="text"> <property name="text">
<string>Save</string> <string>Save</string>
</property> </property>
@ -837,6 +883,10 @@
</property> </property>
</action> </action>
<action name="actionNew"> <action name="actionNew">
<property name="icon">
<iconset>
<normaloff>icons:document-new.png</normaloff>icons:document-new.png</iconset>
</property>
<property name="text"> <property name="text">
<string>New</string> <string>New</string>
</property> </property>
@ -853,6 +903,10 @@
</property> </property>
</action> </action>
<action name="actionLevel"> <action name="actionLevel">
<property name="icon">
<iconset>
<normaloff>icons:toggle-underground.png</normaloff>icons:toggle-underground.png</iconset>
</property>
<property name="text"> <property name="text">
<string>U/G</string> <string>U/G</string>
</property> </property>
@ -867,6 +921,10 @@
<property name="checkable"> <property name="checkable">
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="icon">
<iconset>
<normaloff>icons:toggle-pass.png</normaloff>icons:toggle-pass.png</iconset>
</property>
<property name="text"> <property name="text">
<string>Pass</string> <string>Pass</string>
</property> </property>
@ -875,6 +933,10 @@
</property> </property>
</action> </action>
<action name="actionCut"> <action name="actionCut">
<property name="icon">
<iconset>
<normaloff>icons:edit-cut.png</normaloff>icons:edit-cut.png</iconset>
</property>
<property name="text"> <property name="text">
<string>Cut</string> <string>Cut</string>
</property> </property>
@ -883,6 +945,10 @@
</property> </property>
</action> </action>
<action name="actionCopy"> <action name="actionCopy">
<property name="icon">
<iconset>
<normaloff>icons:edit-copy.png</normaloff>icons:edit-copy.png</iconset>
</property>
<property name="text"> <property name="text">
<string>Copy</string> <string>Copy</string>
</property> </property>
@ -891,6 +957,10 @@
</property> </property>
</action> </action>
<action name="actionPaste"> <action name="actionPaste">
<property name="icon">
<iconset>
<normaloff>icons:edit-paste.png</normaloff>icons:edit-paste.png</iconset>
</property>
<property name="text"> <property name="text">
<string>Paste</string> <string>Paste</string>
</property> </property>
@ -899,6 +969,10 @@
</property> </property>
</action> </action>
<action name="actionFill"> <action name="actionFill">
<property name="icon">
<iconset>
<normaloff>icons:fill-obstacles.png</normaloff>icons:fill-obstacles.png</iconset>
</property>
<property name="text"> <property name="text">
<string>Fill</string> <string>Fill</string>
</property> </property>
@ -913,6 +987,10 @@
<property name="checkable"> <property name="checkable">
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="icon">
<iconset>
<normaloff>icons:toggle-grid.png</normaloff>icons:toggle-grid.png</iconset>
</property>
<property name="text"> <property name="text">
<string>Grid</string> <string>Grid</string>
</property> </property>
@ -971,6 +1049,10 @@
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="icon">
<iconset>
<normaloff>icons:edit-clear.png</normaloff>icons:edit-clear.png</iconset>
</property>
<property name="text"> <property name="text">
<string>Erase</string> <string>Erase</string>
</property> </property>