Skip to content

Commit

Permalink
Move status icons to own directory.
Browse files Browse the repository at this point in the history
--HG--
branch : magao-dev
  • Loading branch information
magao committed Feb 8, 2017
1 parent 058ecc1 commit beb94e9
Show file tree
Hide file tree
Showing 32 changed files with 65 additions and 14 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,5 @@ config.status
src/icons/qbt-theme/build-icons/node_modules/
src/icons/skin/build-icons/node_modules/
src/icons/skin/build-icons/icons/*.png
src/icons/status/build-icons/node_modules/

2 changes: 1 addition & 1 deletion src/gui/guiiconprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ QIcon GuiIconProvider::getStatusIcon(const QString &iconId, const BitTorrent::To

QIcon GuiIconProvider::getStatusIcon(const QString &iconId, const BitTorrent::TorrentState &state, bool ignoreState)
{
QString path(":/icons/skin/" + iconId + ".png");
QString path(":/icons/status/" + iconId + ".png");
QPair<QString, BitTorrent::TorrentState> key(path, state);
QIcon icon((*m_iconCache)[key]);

Expand Down
26 changes: 13 additions & 13 deletions src/icons.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -330,17 +330,11 @@
<file>icons/skin/bg-handle-horizontal.gif</file>
<file>icons/skin/bg-header.gif</file>
<file>icons/skin/bg-panel-header.gif</file>
<file>icons/skin/checking.png</file>
<file>icons/skin/collapse-expand.gif</file>
<file>icons/skin/connected.png</file>
<file>icons/skin/disconnected.png</file>
<file>icons/skin/dock-tabs.gif</file>
<file>icons/skin/download.png</file>
<file>icons/skin/downloading.png</file>
<file>icons/skin/error.png</file>
<file>icons/skin/filteractive.png</file>
<file>icons/skin/filterall.png</file>
<file>icons/skin/filterinactive.png</file>
<file>icons/skin/firewalled.png</file>
<file>icons/skin/handle-icon-horizontal.gif</file>
<file>icons/skin/handle-icon.gif</file>
Expand All @@ -349,32 +343,38 @@
<file>icons/skin/logo.gif</file>
<file>icons/skin/logo2.gif</file>
<file>icons/skin/mascot.png</file>
<file>icons/skin/paused.png</file>
<file>icons/skin/qbittorrent16.png</file>
<file>icons/skin/qbittorrent22.png</file>
<file>icons/skin/qbittorrent32.png</file>
<file>icons/skin/qbittorrent_mono_dark.png</file>
<file>icons/skin/qbittorrent_mono_light.png</file>
<file>icons/skin/queued.png</file>
<file>icons/skin/ratio.png</file>
<file>icons/skin/seeding.png</file>
<file>icons/skin/slider-area.gif</file>
<file>icons/skin/spacer.gif</file>
<file>icons/skin/spinner-placeholder.gif</file>
<file>icons/skin/spinner.gif</file>
<file>icons/skin/splash.png</file>
<file>icons/skin/stalledDL.png</file>
<file>icons/skin/stalledUP.png</file>
<file>icons/skin/tabs.gif</file>
<file>icons/skin/toolbox-divider.gif</file>
<file>icons/skin/toolbox-divider2.gif</file>
<file>icons/skin/resumed.png</file>
<file>icons/skin/uploading.png</file>
<file>icons/skin/completed.png</file>
<file>icons/qbt-theme/system-log-out.png</file>
<file>icons/qbt-theme/go-bottom.png</file>
<file>icons/qbt-theme/go-top.png</file>
<file>icons/qbt-theme/checked.png</file>
<file>icons/qbt-theme/office-chart-line.png</file>
<file>icons/status/checking.png</file>
<file>icons/status/completed.png</file>
<file>icons/status/downloading.png</file>
<file>icons/status/error.png</file>
<file>icons/status/filteractive.png</file>
<file>icons/status/filterall.png</file>
<file>icons/status/filterinactive.png</file>
<file>icons/status/paused.png</file>
<file>icons/status/queued.png</file>
<file>icons/status/resumed.png</file>
<file>icons/status/stalledDL.png</file>
<file>icons/status/stalledUP.png</file>
<file>icons/status/uploading.png</file>
</qresource>
</RCC>
22 changes: 22 additions & 0 deletions src/icons/status/build-icons/Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
module.exports = function(grunt) {

grunt.initConfig({
svg2png: {
all: {
options:{
size: 256
},
files: [
{
src: ['icons/*.svg']
}
]
}
}
});

grunt.loadNpmTasks('grunt-svg2png');

grunt.registerTask('default', ['svg2png']);

}
File renamed without changes
13 changes: 13 additions & 0 deletions src/icons/status/build-icons/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "build-icons",
"version": "1.0.0",
"description": "Convert svg icons to png",
"main": "index.js",
"dependencies": {},
"devDependencies": {
"grunt": "^0.4.5",
"grunt-svg2png": "git+https://[email protected]/bertyhell/grunt-svg2png.git"
},
"author": "Bert Verhelst",
"license": "ISC"
}
14 changes: 14 additions & 0 deletions src/icons/status/build-icons/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Convert SVG icons to PNG
------------------------

install npm

Execute:
```
npm install
```

Convert icons by running:
```
grunt
```
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes

0 comments on commit beb94e9

Please sign in to comment.