forked from Mirrors/openclonk
Qt Editor: Use qt resource to set icon
parent
9690174007
commit
1613885f47
|
@ -13,6 +13,10 @@
|
|||
<property name="windowTitle">
|
||||
<string>EDITOR</string>
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
<iconset resource="resource.qrc">
|
||||
<normaloff>:/editor/res/oc.ico</normaloff>:/editor/res/oc.ico</iconset>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget">
|
||||
<widget class="QComboBox" name="foregroundMatTexComboBox">
|
||||
<property name="geometry">
|
||||
|
|
|
@ -30,10 +30,6 @@
|
|||
#include <C4Object.h>
|
||||
#include <C4Viewport.h>
|
||||
|
||||
#ifdef USE_WIN32_WINDOWS
|
||||
#include <resource.h> // for setting the icon
|
||||
#endif
|
||||
|
||||
/* String translation */
|
||||
|
||||
QString C4ConsoleQtTranslator::translate(const char * context, const char * sourceText, const char * disambiguation, int n) const
|
||||
|
@ -113,12 +109,6 @@ int ExecRecursionCheck::counter = 0;
|
|||
C4ConsoleQtMainWindow::C4ConsoleQtMainWindow(C4AbstractApp *app, C4ConsoleGUIState *state)
|
||||
: QMainWindow(NULL), state(state)
|
||||
{
|
||||
#ifdef USE_WIN32_WINDOWS
|
||||
HWND hWindow = reinterpret_cast<HWND>(winId());
|
||||
// Set icon
|
||||
SendMessage(hWindow, WM_SETICON, ICON_BIG, (LPARAM)LoadIcon(app->GetInstance(), MAKEINTRESOURCE(IDI_00_C4X)));
|
||||
SendMessage(hWindow, WM_SETICON, ICON_SMALL, (LPARAM)LoadIcon(app->GetInstance(), MAKEINTRESOURCE(IDI_00_C4X)));
|
||||
#endif
|
||||
}
|
||||
|
||||
void C4ConsoleQtMainWindow::keyPressEvent(QKeyEvent * event)
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<RCC>
|
||||
<qresource prefix="/editor">
|
||||
<file>../res/oc.ico</file>
|
||||
<file>../res/CreateObj_Trans.png</file>
|
||||
<file>../res/Brush_Trans.png</file>
|
||||
<file>../res/Cursor_Trans.png</file>
|
||||
|
@ -9,7 +10,6 @@
|
|||
<file>../res/Halt_Trans.png</file>
|
||||
<file>../res/Line_Trans.png</file>
|
||||
<file>../res/Mouse_Trans.png</file>
|
||||
<file>../res/oc64.png</file>
|
||||
<file>../res/Picker_Trans.png</file>
|
||||
<file>../res/Play_Trans.png</file>
|
||||
<file>../res/Rect_Trans.png</file>
|
||||
|
|
Loading…
Reference in New Issue