Skip to content

Commit

Permalink
Merge pull request #933 from dsm/current
Browse files Browse the repository at this point in the history
add app icon using cmake and rc file.
  • Loading branch information
ra3xdh authored Sep 5, 2024
2 parents 22d5238 + 6a26ae9 commit 2bb83b5
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions qucs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -257,15 +257,17 @@ IF(APPLE)
#SET(RESOURCES_SRCS ${RESOURCES_SRCS} ${LANG_SRCS})
ENDIF(APPLE)


set(app_icon_resource_windows "${CMAKE_CURRENT_SOURCE_DIR}/qucs_icon.rc")
#
# CMake's way of creating an executable
#
ADD_EXECUTABLE( ${QUCS_NAME} MACOSX_BUNDLE WIN32
${QUCS_HDRS}
${QUCS_SRCS}
${QUCS_MOC_SRCS}
${RESOURCES_SRCS} )
${RESOURCES_SRCS}
${app_icon_resource_windows}
)

#
# Tell CMake which libraries we need to link our executable against.
Expand Down
2 changes: 1 addition & 1 deletion qucs/dialogs/aboutdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ AboutDialog::AboutDialog(QWidget *parent)
//all->setSpacing(0);

QLabel *iconLabel = new QLabel();
iconLabel->setPixmap(QPixmap(QString(":/bitmaps/hicolor/128x128/apps/qucs.png")));
iconLabel->setPixmap(QPixmap(QString(":/bitmaps/hicolor/scalable/apps/qucs.svg")));

QWidget *hbox = new QWidget();
QHBoxLayout *hl = new QHBoxLayout(hbox);
Expand Down
2 changes: 1 addition & 1 deletion qucs/qucs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ void QucsApp::initView()
// set application icon
// APPLE sets the QApplication icon with Info.plist
#ifndef __APPLE__
setWindowIcon (QPixmap(":/bitmaps/big.qucs.xpm"));
setWindowIcon (QPixmap(QString(":/bitmaps/hicolor/scalable/apps/qucs.svg")));
#else
// setUnifiedTitleAndToolBarOnMac(true);
setStyleSheet("QToolButton { padding: 0px; }");
Expand Down
1 change: 1 addition & 0 deletions qucs/qucs.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<file>bitmaps/tiny.button.qucs.xpm</file>
<file>bitmaps/tiny.qucs.xpm</file>
<file>bitmaps/hicolor/128x128/apps/qucs.png</file>
<file>bitmaps/hicolor/scalable/apps/qucs.svg</file>
<file>bitmaps/svg/filenew.svg</file>
<file>bitmaps/svg/textnew.svg</file>
<file>bitmaps/svg/symnew.svg</file>
Expand Down
1 change: 1 addition & 0 deletions qucs/qucs_icon.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
IDI_ICON1 ICON DISCARDABLE "bitmaps/qucs.ico"

0 comments on commit 2bb83b5

Please sign in to comment.