Skip to content

Commit

Permalink
Add Mac OS X icon
Browse files Browse the repository at this point in the history
  • Loading branch information
Harinlen committed Jun 2, 2015
1 parent 8af6a9b commit 4b04533
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
10 changes: 8 additions & 2 deletions Robot.pro
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,14 @@ CONFIG += c++11
#Win32 configure.
win32
{
RC_FILE += win.rc
DISTFILES += \
win.rc
RC_FILE += win.rc
}

macx
{
ICON = icon.icns
}

SOURCES += \
Expand Down Expand Up @@ -48,7 +53,8 @@ HEADERS += \
groundrealtimepreviewer.h \
groundglobal.h \
polygoneditor.h \
robotmanagewidget.h
robotmanagewidget.h \
about.h

RESOURCES += \
res.qrc
5 changes: 4 additions & 1 deletion about.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,15 @@ void About::showAbout(QWidget *parent)
About::About(QWidget *parent) :
QDialog(parent)
{
//Set the main layout.
QBoxLayout *mainLayout=new QBoxLayout(QBoxLayout::TopToBottom,
this);
setLayout(mainLayout);

QLabel *icon=new QLabel(this);
icon->setPixmap(QPixmap(""));
icon->setPixmap(QPixmap("://res/icon.png"));
icon->setFixedSize(256, 256);
icon->setScaledContents(true);
mainLayout->addWidget(icon, 1, Qt::AlignHCenter);
mainLayout->addWidget(new QLabel(tr("Robot Emulator"), this),
0,
Expand Down
Binary file added icon.icns
Binary file not shown.

0 comments on commit 4b04533

Please sign in to comment.