From b98596490e1fdaf3dc5bc147d2dc7a1e79e85747 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Fri, 23 Aug 2019 19:13:51 +0200 Subject: [PATCH] Utils/Android: Add themable, DPI-endabled Download icon to Utils::Icons And use it in AdroidSettingsDialog Change-Id: Ia847b6df0e5ab26fc02157f888565a3e6d86bb34 Reviewed-by: Eike Ziller --- src/libs/utils/images/download_arrow.png | Bin 0 -> 150 bytes src/libs/utils/images/download_arrow@2x.png | Bin 0 -> 181 bytes src/libs/utils/images/download_base.png | Bin 0 -> 96 bytes src/libs/utils/images/download_base@2x.png | Bin 0 -> 104 bytes src/libs/utils/utils.qrc | 4 ++ src/libs/utils/utilsicons.cpp | 3 ++ src/libs/utils/utilsicons.h | 1 + src/plugins/android/android.qrc | 1 - src/plugins/android/androidsettingswidget.cpp | 5 +++ src/plugins/android/androidsettingswidget.ui | 12 ------ src/plugins/android/images/download.png | Bin 262 -> 0 bytes src/tools/icons/qtcreatoricons.svg | 36 ++++++++++++++++++ 12 files changed, 49 insertions(+), 13 deletions(-) create mode 100644 src/libs/utils/images/download_arrow.png create mode 100644 src/libs/utils/images/download_arrow@2x.png create mode 100644 src/libs/utils/images/download_base.png create mode 100644 src/libs/utils/images/download_base@2x.png delete mode 100644 src/plugins/android/images/download.png diff --git a/src/libs/utils/images/download_arrow.png b/src/libs/utils/images/download_arrow.png new file mode 100644 index 0000000000000000000000000000000000000000..c73bf628f4befe729c4394ba8d751fe25270534b GIT binary patch literal 150 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd7G?$phPQVgfdnK1d_r6q7#QT_Y|+7#J8lUHx3vIVCg!00|8& A%>V!Z literal 0 HcmV?d00001 diff --git a/src/libs/utils/images/download_arrow@2x.png b/src/libs/utils/images/download_arrow@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..aabf6fce787562ee1b458ee83a8cb2add4917207 GIT binary patch literal 181 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I7G?$phQ^Te;|vT8LIFM@t_%ze<>lq|_4N%6 z4ILdF|NsAg?_Io}fq@~;)5S4FBlzsOjl2y8JT4dIXDHT6xh?q4Bewm&mWZFs#7Rtr zQ@?)UUYxpz{nHP=tOoTd4bvP%Ps|Kp$rA42Iydh@&IJph6bBYrnT`aTG-Zi`gFhJ} i`Gx*OD0~;+!T8a68q-<3&K3p+1_n=8KbLh*2~7YZUOt)t literal 0 HcmV?d00001 diff --git a/src/libs/utils/images/download_base.png b/src/libs/utils/images/download_base.png new file mode 100644 index 0000000000000000000000000000000000000000..25163bef64c055298eef0ac469bfbe2979131664 GIT binary patch literal 96 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdMrH;E236Z!B?bltwg8_HR|W=#|Ns9ly*d9b z0|SGor;B3{Qv)d>CO3f z85kI3JzX3_IHHq(@U!rgDBJ!2UoSWJ$AJR}_!T$2U|>+Ls+ew;+kcq>WQ41q%Q~lo FCIEDmAG`nn literal 0 HcmV?d00001 diff --git a/src/libs/utils/utils.qrc b/src/libs/utils/utils.qrc index 3cfb55a4bab..1a1edbef5af 100644 --- a/src/libs/utils/utils.qrc +++ b/src/libs/utils/utils.qrc @@ -225,6 +225,10 @@ images/dir.png images/online.png images/online@2x.png + images/download_arrow.png + images/download_arrow@2x.png + images/download_base.png + images/download_base@2x.png ../3rdparty/xdg/freedesktop.org.xml diff --git a/src/libs/utils/utilsicons.cpp b/src/libs/utils/utilsicons.cpp index 0f6417bd7fa..c83f74a5ced 100644 --- a/src/libs/utils/utilsicons.cpp +++ b/src/libs/utils/utilsicons.cpp @@ -196,6 +196,9 @@ const Icon TOGGLE_PROGRESSDETAILS_TOOLBAR({ {QLatin1String(":/utils/images/toggleprogressdetails.png"), Theme::IconsBaseColor}}); const Icon ONLINE_TOOLBAR({ {QLatin1String(":/utils/images/online.png"), Theme::IconsBaseColor}}); +const Icon DOWNLOAD({ + {QLatin1String(":/utils/images/download_arrow.png"), Theme::IconsRunColor}, + {QLatin1String(":/utils/images/download_base.png"), Theme::PanelTextColorDark}}, Icon::Tint); const Icon WARNING({ {QLatin1String(":/utils/images/warningfill.png"), Theme::BackgroundColorNormal}, diff --git a/src/libs/utils/utilsicons.h b/src/libs/utils/utilsicons.h index c0657d19cb2..8505aed941c 100644 --- a/src/libs/utils/utilsicons.h +++ b/src/libs/utils/utilsicons.h @@ -114,6 +114,7 @@ QTCREATOR_UTILS_EXPORT extern const Icon LINK_TOOLBAR; QTCREATOR_UTILS_EXPORT extern const Icon SORT_ALPHABETICALLY_TOOLBAR; QTCREATOR_UTILS_EXPORT extern const Icon TOGGLE_PROGRESSDETAILS_TOOLBAR; QTCREATOR_UTILS_EXPORT extern const Icon ONLINE_TOOLBAR; +QTCREATOR_UTILS_EXPORT extern const Icon DOWNLOAD; QTCREATOR_UTILS_EXPORT extern const Icon INFO; QTCREATOR_UTILS_EXPORT extern const Icon INFO_TOOLBAR; diff --git a/src/plugins/android/android.qrc b/src/plugins/android/android.qrc index 26b9b148d3c..8c7bbb9ec80 100644 --- a/src/plugins/android/android.qrc +++ b/src/plugins/android/android.qrc @@ -4,6 +4,5 @@ images/androiddevice@2x.png images/androiddevicesmall.png images/androiddevicesmall@2x.png - images/download.png diff --git a/src/plugins/android/androidsettingswidget.cpp b/src/plugins/android/androidsettingswidget.cpp index 0233e940fb9..965483ab165 100644 --- a/src/plugins/android/androidsettingswidget.cpp +++ b/src/plugins/android/androidsettingswidget.cpp @@ -288,6 +288,11 @@ AndroidSettingsWidget::AndroidSettingsWidget(QWidget *parent) m_ui->downloadOpenJDKToolButton->setVisible(!Utils::HostOsInfo::isLinuxHost()); + const QIcon downloadIcon = Utils::Icons::DOWNLOAD.icon(); + m_ui->downloadSDKToolButton->setIcon(downloadIcon); + m_ui->downloadNDKToolButton->setIcon(downloadIcon); + m_ui->downloadOpenJDKToolButton->setIcon(downloadIcon); + connect(&m_virtualDevicesWatcher, &QFutureWatcherBase::finished, this, &AndroidSettingsWidget::updateAvds); connect(&m_futureWatcher, &QFutureWatcherBase::finished, diff --git a/src/plugins/android/androidsettingswidget.ui b/src/plugins/android/androidsettingswidget.ui index ee9b9a8433b..037e304c76e 100644 --- a/src/plugins/android/androidsettingswidget.ui +++ b/src/plugins/android/androidsettingswidget.ui @@ -53,10 +53,6 @@ Download JDK - - - :/android/images/download.png:/android/images/download.png - @@ -112,10 +108,6 @@ Download Android NDK - - - :/android/images/download.png:/android/images/download.png - @@ -155,10 +147,6 @@ Download Android SDK - - - :/android/images/download.png:/android/images/download.png - diff --git a/src/plugins/android/images/download.png b/src/plugins/android/images/download.png deleted file mode 100644 index 366a2913bc10b62d2d9622d25ed6edffe38416fb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 262 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd7G?$phPQVgfdrU~ojgN0I5=)U^nbv>z`$AH z5n0T@zRzNS3%plmzFem6RtIr81P4m+NKbWfvzW7NqLs7p2dBXCuYH zz#tvq6XN>+|9^w&26|KVAjoK;k@*@k`@^;k4Gqei_y036FtC&a`2{m59C+|RPt=Ej zfx*|)#W95AdU8TSLP23+0t55+q9n;4HNAIF_4L|!cn-aM`t<2ZCI`jMpFSBmPY_xl z;K886BK9C7L4Z#z;RS=Cgs7wfj{t*_l>);#28P*flHulCzUMJ8Ffe$!`njxgN@xNA D^=DCP diff --git a/src/tools/icons/qtcreatoricons.svg b/src/tools/icons/qtcreatoricons.svg index ffec8a02a89..a846a4e26ee 100644 --- a/src/tools/icons/qtcreatoricons.svg +++ b/src/tools/icons/qtcreatoricons.svg @@ -3760,6 +3760,42 @@ inkscape:connector-curvature="0" sodipodi:nodetypes="cccccc" /> + + + + + + + +