diff options
author | allexzander <allexzander@users.noreply.github.com> | 2022-06-10 12:15:45 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-10 12:15:45 +0300 |
commit | d7217d1c07657be2979beeaf67d20a72ce99b0a6 (patch) | |
tree | 7e57e8ca7c6a5c75747729774a20a51cf332560a | |
parent | 7566d038cfaf05682ce1811a4fe2937901c1cf6c (diff) | |
parent | db9d83be2a13d655634c3d422bc19eff4a288cf7 (diff) |
Merge pull request #4622 from nextcloud/feature/generate-state-icons-from-svg
Feature/generate state icons from svg
92 files changed, 27 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore index dcd25d421..249c4a2c7 100644 --- a/.gitignore +++ b/.gitignore @@ -187,4 +187,5 @@ convert.exe *-icon-win-folder.png *-sidebar.png *-w10startmenu.png +*state-*.png theme.qrc diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index 920996836..0f0d4c9e5 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -376,7 +376,7 @@ endif() function(generate_sized_png_from_svg icon_path size) set(options) - set(oneValueArgs OUTPUT_ICON_NAME OUTPUT_ICON_PATH) + set(oneValueArgs OUTPUT_ICON_NAME OUTPUT_ICON_FULL_NAME_WLE OUTPUT_ICON_PATH) set(multiValueArgs) cmake_parse_arguments(ARG "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) @@ -392,11 +392,17 @@ function(generate_sized_png_from_svg icon_path size) set(icon_name_dir ${ARG_OUTPUT_ICON_PATH}) endif () - if (EXISTS "${icon_name_dir}/${size}-${icon_name_wle}.png") + set(output_icon_full_name_wle "${size}-${icon_name_wle}") + + if (ARG_OUTPUT_ICON_FULL_NAME_WLE) + set(output_icon_full_name_wle ${ARG_OUTPUT_ICON_FULL_NAME_WLE}) + endif () + + if (EXISTS "${icon_name_dir}/${output_icon_full_name_wle}.png") return() endif() - set(icon_output_name "${size}-${icon_name_wle}.png") + set(icon_output_name "${output_icon_full_name_wle}.png") message(STATUS "Generate ${icon_output_name}") execute_process(COMMAND "${SVG_CONVERTER}" -w ${size} -h ${size} "${icon_path}" -o "${icon_output_name}" @@ -413,6 +419,23 @@ function(generate_sized_png_from_svg icon_path size) endif() endfunction() +set(STATE_ICONS_COLORS colored black white) + +foreach(state_icons_color ${STATE_ICONS_COLORS}) + set(STATE_ICONS_PATH "${theme_dir}/${state_icons_color}/") + + message("Generating state icons from SVG in path: "${STATE_ICONS_PATH}) + + file(GLOB_RECURSE STATE_ICONS_SVG "${STATE_ICONS_PATH}/state-*.svg") + + foreach(state_icon_svg ${STATE_ICONS_SVG}) + get_filename_component(status_icon_name_wle ${state_icon_svg} NAME_WLE) + foreach(size IN ITEMS 16;32;64;128;256) + generate_sized_png_from_svg(${state_icon_svg} ${size} OUTPUT_ICON_FULL_NAME_WLE "${status_icon_name_wle}-${size}") + endforeach() + endforeach() +endforeach() + if ((APPLICATION_ICON_SET MATCHES "PNG") AND (NOT EXISTS "${theme_dir}/colored/${APPLICATION_ICON_NAME}-icon.svg")) diff --git a/theme/black/state-error-128.png b/theme/black/state-error-128.png Binary files differdeleted file mode 100644 index 51547e39f..000000000 --- a/theme/black/state-error-128.png +++ /dev/null diff --git a/theme/black/state-error-16.png b/theme/black/state-error-16.png Binary files differdeleted file mode 100644 index 50d143770..000000000 --- a/theme/black/state-error-16.png +++ /dev/null diff --git a/theme/black/state-error-256.png b/theme/black/state-error-256.png Binary files differdeleted file mode 100644 index 3929a9077..000000000 --- a/theme/black/state-error-256.png +++ /dev/null diff --git a/theme/black/state-error-32.png b/theme/black/state-error-32.png Binary files differdeleted file mode 100644 index 44ed47428..000000000 --- a/theme/black/state-error-32.png +++ /dev/null diff --git a/theme/black/state-error-64.png b/theme/black/state-error-64.png Binary files differdeleted file mode 100644 index 00891049c..000000000 --- a/theme/black/state-error-64.png +++ /dev/null diff --git a/theme/black/state-offline-128.png b/theme/black/state-offline-128.png Binary files differdeleted file mode 100644 index dd57aafc1..000000000 --- a/theme/black/state-offline-128.png +++ /dev/null diff --git a/theme/black/state-offline-16.png b/theme/black/state-offline-16.png Binary files differdeleted file mode 100644 index 9270cf3b7..000000000 --- a/theme/black/state-offline-16.png +++ /dev/null diff --git a/theme/black/state-offline-256.png b/theme/black/state-offline-256.png Binary files differdeleted file mode 100644 index 32bbd257b..000000000 --- a/theme/black/state-offline-256.png +++ /dev/null diff --git a/theme/black/state-offline-32.png b/theme/black/state-offline-32.png Binary files differdeleted file mode 100644 index 3a29e4acd..000000000 --- a/theme/black/state-offline-32.png +++ /dev/null diff --git a/theme/black/state-offline-64.png b/theme/black/state-offline-64.png Binary files differdeleted file mode 100644 index 7f2a47c66..000000000 --- a/theme/black/state-offline-64.png +++ /dev/null diff --git a/theme/black/state-ok-128.png b/theme/black/state-ok-128.png Binary files differdeleted file mode 100644 index f5fd5d9f4..000000000 --- a/theme/black/state-ok-128.png +++ /dev/null diff --git a/theme/black/state-ok-16.png b/theme/black/state-ok-16.png Binary files differdeleted file mode 100644 index b4fbfe6cc..000000000 --- a/theme/black/state-ok-16.png +++ /dev/null diff --git a/theme/black/state-ok-256.png b/theme/black/state-ok-256.png Binary files differdeleted file mode 100644 index cf138ee4d..000000000 --- a/theme/black/state-ok-256.png +++ /dev/null diff --git a/theme/black/state-ok-32.png b/theme/black/state-ok-32.png Binary files differdeleted file mode 100644 index f0e878cef..000000000 --- a/theme/black/state-ok-32.png +++ /dev/null diff --git a/theme/black/state-ok-64.png b/theme/black/state-ok-64.png Binary files differdeleted file mode 100644 index b6f88cd1d..000000000 --- a/theme/black/state-ok-64.png +++ /dev/null diff --git a/theme/black/state-pause-128.png b/theme/black/state-pause-128.png Binary files differdeleted file mode 100644 index b0d635b4b..000000000 --- a/theme/black/state-pause-128.png +++ /dev/null diff --git a/theme/black/state-pause-16.png b/theme/black/state-pause-16.png Binary files differdeleted file mode 100644 index 25b41929a..000000000 --- a/theme/black/state-pause-16.png +++ /dev/null diff --git a/theme/black/state-pause-256.png b/theme/black/state-pause-256.png Binary files differdeleted file mode 100644 index 2d25d0e2f..000000000 --- a/theme/black/state-pause-256.png +++ /dev/null diff --git a/theme/black/state-pause-32.png b/theme/black/state-pause-32.png Binary files differdeleted file mode 100644 index ffc57f9cb..000000000 --- a/theme/black/state-pause-32.png +++ /dev/null diff --git a/theme/black/state-pause-64.png b/theme/black/state-pause-64.png Binary files differdeleted file mode 100644 index 97cf3b1d5..000000000 --- a/theme/black/state-pause-64.png +++ /dev/null diff --git a/theme/black/state-sync-128.png b/theme/black/state-sync-128.png Binary files differdeleted file mode 100644 index 730eeb420..000000000 --- a/theme/black/state-sync-128.png +++ /dev/null diff --git a/theme/black/state-sync-16.png b/theme/black/state-sync-16.png Binary files differdeleted file mode 100644 index b34040d4d..000000000 --- a/theme/black/state-sync-16.png +++ /dev/null diff --git a/theme/black/state-sync-256.png b/theme/black/state-sync-256.png Binary files differdeleted file mode 100644 index b69e8a7fe..000000000 --- a/theme/black/state-sync-256.png +++ /dev/null diff --git a/theme/black/state-sync-32.png b/theme/black/state-sync-32.png Binary files differdeleted file mode 100644 index fdf2cebb0..000000000 --- a/theme/black/state-sync-32.png +++ /dev/null diff --git a/theme/black/state-sync-64.png b/theme/black/state-sync-64.png Binary files differdeleted file mode 100644 index 068287fb4..000000000 --- a/theme/black/state-sync-64.png +++ /dev/null diff --git a/theme/black/state-warning-128.png b/theme/black/state-warning-128.png Binary files differdeleted file mode 100644 index 1f1e7be77..000000000 --- a/theme/black/state-warning-128.png +++ /dev/null diff --git a/theme/black/state-warning-16.png b/theme/black/state-warning-16.png Binary files differdeleted file mode 100644 index a4ba05d96..000000000 --- a/theme/black/state-warning-16.png +++ /dev/null diff --git a/theme/black/state-warning-256.png b/theme/black/state-warning-256.png Binary files differdeleted file mode 100644 index e4d11c6ff..000000000 --- a/theme/black/state-warning-256.png +++ /dev/null diff --git a/theme/black/state-warning-32.png b/theme/black/state-warning-32.png Binary files differdeleted file mode 100644 index 651f04944..000000000 --- a/theme/black/state-warning-32.png +++ /dev/null diff --git a/theme/black/state-warning-64.png b/theme/black/state-warning-64.png Binary files differdeleted file mode 100644 index bef3b9f4b..000000000 --- a/theme/black/state-warning-64.png +++ /dev/null diff --git a/theme/colored/state-error-128.png b/theme/colored/state-error-128.png Binary files differdeleted file mode 100644 index b8654f934..000000000 --- a/theme/colored/state-error-128.png +++ /dev/null diff --git a/theme/colored/state-error-16.png b/theme/colored/state-error-16.png Binary files differdeleted file mode 100644 index ae39c60d6..000000000 --- a/theme/colored/state-error-16.png +++ /dev/null diff --git a/theme/colored/state-error-256.png b/theme/colored/state-error-256.png Binary files differdeleted file mode 100644 index 2a23976b2..000000000 --- a/theme/colored/state-error-256.png +++ /dev/null diff --git a/theme/colored/state-error-32.png b/theme/colored/state-error-32.png Binary files differdeleted file mode 100644 index e6891b4dc..000000000 --- a/theme/colored/state-error-32.png +++ /dev/null diff --git a/theme/colored/state-error-64.png b/theme/colored/state-error-64.png Binary files differdeleted file mode 100644 index 8349bed8a..000000000 --- a/theme/colored/state-error-64.png +++ /dev/null diff --git a/theme/colored/state-offline-128.png b/theme/colored/state-offline-128.png Binary files differdeleted file mode 100644 index 38015f551..000000000 --- a/theme/colored/state-offline-128.png +++ /dev/null diff --git a/theme/colored/state-offline-16.png b/theme/colored/state-offline-16.png Binary files differdeleted file mode 100644 index d0046d8eb..000000000 --- a/theme/colored/state-offline-16.png +++ /dev/null diff --git a/theme/colored/state-offline-256.png b/theme/colored/state-offline-256.png Binary files differdeleted file mode 100644 index e889a02b7..000000000 --- a/theme/colored/state-offline-256.png +++ /dev/null diff --git a/theme/colored/state-offline-32.png b/theme/colored/state-offline-32.png Binary files differdeleted file mode 100644 index 73f2c56d5..000000000 --- a/theme/colored/state-offline-32.png +++ /dev/null diff --git a/theme/colored/state-offline-64.png b/theme/colored/state-offline-64.png Binary files differdeleted file mode 100644 index 9467e2cff..000000000 --- a/theme/colored/state-offline-64.png +++ /dev/null diff --git a/theme/colored/state-ok-128.png b/theme/colored/state-ok-128.png Binary files differdeleted file mode 100644 index 38b3938b0..000000000 --- a/theme/colored/state-ok-128.png +++ /dev/null diff --git a/theme/colored/state-ok-16.png b/theme/colored/state-ok-16.png Binary files differdeleted file mode 100644 index 61e73812a..000000000 --- a/theme/colored/state-ok-16.png +++ /dev/null diff --git a/theme/colored/state-ok-256.png b/theme/colored/state-ok-256.png Binary files differdeleted file mode 100644 index b1f5a40d3..000000000 --- a/theme/colored/state-ok-256.png +++ /dev/null diff --git a/theme/colored/state-ok-32.png b/theme/colored/state-ok-32.png Binary files differdeleted file mode 100644 index e6dd2a6f8..000000000 --- a/theme/colored/state-ok-32.png +++ /dev/null diff --git a/theme/colored/state-ok-64.png b/theme/colored/state-ok-64.png Binary files differdeleted file mode 100644 index 5268ed024..000000000 --- a/theme/colored/state-ok-64.png +++ /dev/null diff --git a/theme/colored/state-pause-128.png b/theme/colored/state-pause-128.png Binary files differdeleted file mode 100644 index a423df502..000000000 --- a/theme/colored/state-pause-128.png +++ /dev/null diff --git a/theme/colored/state-pause-16.png b/theme/colored/state-pause-16.png Binary files differdeleted file mode 100644 index 0563bf3f1..000000000 --- a/theme/colored/state-pause-16.png +++ /dev/null diff --git a/theme/colored/state-pause-256.png b/theme/colored/state-pause-256.png Binary files differdeleted file mode 100644 index cc52d94f3..000000000 --- a/theme/colored/state-pause-256.png +++ /dev/null diff --git a/theme/colored/state-pause-32.png b/theme/colored/state-pause-32.png Binary files differdeleted file mode 100644 index 5853fa488..000000000 --- a/theme/colored/state-pause-32.png +++ /dev/null diff --git a/theme/colored/state-pause-64.png b/theme/colored/state-pause-64.png Binary files differdeleted file mode 100644 index 76d6192d8..000000000 --- a/theme/colored/state-pause-64.png +++ /dev/null diff --git a/theme/colored/state-sync-128.png b/theme/colored/state-sync-128.png Binary files differdeleted file mode 100644 index 1bd18e70b..000000000 --- a/theme/colored/state-sync-128.png +++ /dev/null diff --git a/theme/colored/state-sync-16.png b/theme/colored/state-sync-16.png Binary files differdeleted file mode 100644 index 686af598b..000000000 --- a/theme/colored/state-sync-16.png +++ /dev/null diff --git a/theme/colored/state-sync-256.png b/theme/colored/state-sync-256.png Binary files differdeleted file mode 100644 index 4d72cc03d..000000000 --- a/theme/colored/state-sync-256.png +++ /dev/null diff --git a/theme/colored/state-sync-32.png b/theme/colored/state-sync-32.png Binary files differdeleted file mode 100644 index ea92f3a49..000000000 --- a/theme/colored/state-sync-32.png +++ /dev/null diff --git a/theme/colored/state-sync-64.png b/theme/colored/state-sync-64.png Binary files differdeleted file mode 100644 index fff5ee4fd..000000000 --- a/theme/colored/state-sync-64.png +++ /dev/null diff --git a/theme/colored/state-warning-128.png b/theme/colored/state-warning-128.png Binary files differdeleted file mode 100644 index 7330ff100..000000000 --- a/theme/colored/state-warning-128.png +++ /dev/null diff --git a/theme/colored/state-warning-16.png b/theme/colored/state-warning-16.png Binary files differdeleted file mode 100644 index 1f4773189..000000000 --- a/theme/colored/state-warning-16.png +++ /dev/null diff --git a/theme/colored/state-warning-256.png b/theme/colored/state-warning-256.png Binary files differdeleted file mode 100644 index d7dd0f1fd..000000000 --- a/theme/colored/state-warning-256.png +++ /dev/null diff --git a/theme/colored/state-warning-32.png b/theme/colored/state-warning-32.png Binary files differdeleted file mode 100644 index 4b2a718b1..000000000 --- a/theme/colored/state-warning-32.png +++ /dev/null diff --git a/theme/colored/state-warning-64.png b/theme/colored/state-warning-64.png Binary files differdeleted file mode 100644 index 1e8f50194..000000000 --- a/theme/colored/state-warning-64.png +++ /dev/null diff --git a/theme/white/state-error-128.png b/theme/white/state-error-128.png Binary files differdeleted file mode 100644 index 5a43539ac..000000000 --- a/theme/white/state-error-128.png +++ /dev/null diff --git a/theme/white/state-error-16.png b/theme/white/state-error-16.png Binary files differdeleted file mode 100644 index 9727647a6..000000000 --- a/theme/white/state-error-16.png +++ /dev/null diff --git a/theme/white/state-error-256.png b/theme/white/state-error-256.png Binary files differdeleted file mode 100644 index d99711271..000000000 --- a/theme/white/state-error-256.png +++ /dev/null diff --git a/theme/white/state-error-32.png b/theme/white/state-error-32.png Binary files differdeleted file mode 100644 index 74bab33d1..000000000 --- a/theme/white/state-error-32.png +++ /dev/null diff --git a/theme/white/state-error-64.png b/theme/white/state-error-64.png Binary files differdeleted file mode 100644 index 67043c001..000000000 --- a/theme/white/state-error-64.png +++ /dev/null diff --git a/theme/white/state-offline-128.png b/theme/white/state-offline-128.png Binary files differdeleted file mode 100644 index 46742d4d7..000000000 --- a/theme/white/state-offline-128.png +++ /dev/null diff --git a/theme/white/state-offline-16.png b/theme/white/state-offline-16.png Binary files differdeleted file mode 100644 index b1fd238c8..000000000 --- a/theme/white/state-offline-16.png +++ /dev/null diff --git a/theme/white/state-offline-256.png b/theme/white/state-offline-256.png Binary files differdeleted file mode 100644 index 25b563a5f..000000000 --- a/theme/white/state-offline-256.png +++ /dev/null diff --git a/theme/white/state-offline-32.png b/theme/white/state-offline-32.png Binary files differdeleted file mode 100644 index 3e78bc15b..000000000 --- a/theme/white/state-offline-32.png +++ /dev/null diff --git a/theme/white/state-offline-64.png b/theme/white/state-offline-64.png Binary files differdeleted file mode 100644 index 3bc947c57..000000000 --- a/theme/white/state-offline-64.png +++ /dev/null diff --git a/theme/white/state-ok-128.png b/theme/white/state-ok-128.png Binary files differdeleted file mode 100644 index 9157e5405..000000000 --- a/theme/white/state-ok-128.png +++ /dev/null diff --git a/theme/white/state-ok-16.png b/theme/white/state-ok-16.png Binary files differdeleted file mode 100644 index 90b00ab04..000000000 --- a/theme/white/state-ok-16.png +++ /dev/null diff --git a/theme/white/state-ok-256.png b/theme/white/state-ok-256.png Binary files differdeleted file mode 100644 index d0f10ec50..000000000 --- a/theme/white/state-ok-256.png +++ /dev/null diff --git a/theme/white/state-ok-32.png b/theme/white/state-ok-32.png Binary files differdeleted file mode 100644 index 6a528d49f..000000000 --- a/theme/white/state-ok-32.png +++ /dev/null diff --git a/theme/white/state-ok-64.png b/theme/white/state-ok-64.png Binary files differdeleted file mode 100644 index 5c991270d..000000000 --- a/theme/white/state-ok-64.png +++ /dev/null diff --git a/theme/white/state-pause-128.png b/theme/white/state-pause-128.png Binary files differdeleted file mode 100644 index d3f741a4b..000000000 --- a/theme/white/state-pause-128.png +++ /dev/null diff --git a/theme/white/state-pause-16.png b/theme/white/state-pause-16.png Binary files differdeleted file mode 100644 index 3a217cc84..000000000 --- a/theme/white/state-pause-16.png +++ /dev/null diff --git a/theme/white/state-pause-256.png b/theme/white/state-pause-256.png Binary files differdeleted file mode 100644 index 092cc30eb..000000000 --- a/theme/white/state-pause-256.png +++ /dev/null diff --git a/theme/white/state-pause-32.png b/theme/white/state-pause-32.png Binary files differdeleted file mode 100644 index 788274be2..000000000 --- a/theme/white/state-pause-32.png +++ /dev/null diff --git a/theme/white/state-pause-64.png b/theme/white/state-pause-64.png Binary files differdeleted file mode 100644 index 042b71da7..000000000 --- a/theme/white/state-pause-64.png +++ /dev/null diff --git a/theme/white/state-sync-128.png b/theme/white/state-sync-128.png Binary files differdeleted file mode 100644 index 71ae65637..000000000 --- a/theme/white/state-sync-128.png +++ /dev/null diff --git a/theme/white/state-sync-16.png b/theme/white/state-sync-16.png Binary files differdeleted file mode 100644 index cf502d015..000000000 --- a/theme/white/state-sync-16.png +++ /dev/null diff --git a/theme/white/state-sync-256.png b/theme/white/state-sync-256.png Binary files differdeleted file mode 100644 index 9468065a0..000000000 --- a/theme/white/state-sync-256.png +++ /dev/null diff --git a/theme/white/state-sync-32.png b/theme/white/state-sync-32.png Binary files differdeleted file mode 100644 index 41ffb660e..000000000 --- a/theme/white/state-sync-32.png +++ /dev/null diff --git a/theme/white/state-sync-64.png b/theme/white/state-sync-64.png Binary files differdeleted file mode 100644 index 6c556a135..000000000 --- a/theme/white/state-sync-64.png +++ /dev/null diff --git a/theme/white/state-warning-128.png b/theme/white/state-warning-128.png Binary files differdeleted file mode 100644 index 872301947..000000000 --- a/theme/white/state-warning-128.png +++ /dev/null diff --git a/theme/white/state-warning-16.png b/theme/white/state-warning-16.png Binary files differdeleted file mode 100644 index a52e73e3c..000000000 --- a/theme/white/state-warning-16.png +++ /dev/null diff --git a/theme/white/state-warning-256.png b/theme/white/state-warning-256.png Binary files differdeleted file mode 100644 index 79e996b6d..000000000 --- a/theme/white/state-warning-256.png +++ /dev/null diff --git a/theme/white/state-warning-32.png b/theme/white/state-warning-32.png Binary files differdeleted file mode 100644 index 7475c0db5..000000000 --- a/theme/white/state-warning-32.png +++ /dev/null diff --git a/theme/white/state-warning-64.png b/theme/white/state-warning-64.png Binary files differdeleted file mode 100644 index bc6812964..000000000 --- a/theme/white/state-warning-64.png +++ /dev/null |