Some desktop environment, like KDE, need more rastered sizes and cannot make use of the SVG.tags/v1.12.90
@@ -1,4 +1,4 @@ | |||
set(ICON_SIZES 16 22 24 32 48) | |||
set(ICON_SIZES 16 22 24 32 48 64 128) | |||
find_program(CONVERT_EXECUTABLE convert) | |||
@@ -9,11 +9,16 @@ if(CONVERT_EXECUTABLE) | |||
add_custom_target(icons DEPENDS ${ICON_FILES}) | |||
foreach(SIZE ${ICON_SIZES}) | |||
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/tigervnc_${SIZE}.svg) | |||
set(ICON_SRC_FILE ${CMAKE_CURRENT_SOURCE_DIR}/tigervnc_${SIZE}.svg) | |||
else() | |||
set(ICON_SRC_FILE ${CMAKE_CURRENT_SOURCE_DIR}/tigervnc_48.svg) | |||
endif() | |||
add_custom_command(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/icons/tigervnc_${SIZE}.png | |||
COMMAND ${CONVERT_EXECUTABLE} -depth 8 -background transparent | |||
${CMAKE_CURRENT_SOURCE_DIR}/tigervnc_${SIZE}.svg | |||
-size ${SIZE}x${SIZE} ${ICON_SRC_FILE} | |||
${CMAKE_CURRENT_SOURCE_DIR}/icons/tigervnc_${SIZE}.png | |||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/tigervnc_${SIZE}.svg | |||
DEPENDS ${ICON_SRC_FILE} | |||
COMMENT "Generating icons/tigervnc_${SIZE}.png") | |||
endforeach() | |||
endif() |
@@ -131,7 +131,7 @@ if(UNIX) | |||
add_custom_target(appstream ALL DEPENDS org.tigervnc.vncviewer.metainfo.xml) | |||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.tigervnc.vncviewer.metainfo.xml DESTINATION ${CMAKE_INSTALL_FULL_DATADIR}/metainfo) | |||
foreach(res 16 22 24 32 48) | |||
foreach(res 16 22 24 32 48 64 128) | |||
install(FILES ../media/icons/tigervnc_${res}.png DESTINATION ${CMAKE_INSTALL_FULL_DATADIR}/icons/hicolor/${res}x${res}/apps RENAME tigervnc.png) | |||
endforeach() | |||
install(FILES ../media/icons/tigervnc.svg DESTINATION ${CMAKE_INSTALL_FULL_DATADIR}/icons/hicolor/scalable/apps) |
@@ -355,7 +355,7 @@ static void init_fltk() | |||
Fl_Window::default_icons(lg, sm); | |||
#elif ! defined(__APPLE__) | |||
const int icon_sizes[] = {48, 32, 24, 16}; | |||
const int icon_sizes[] = {128, 64, 48, 32, 24, 22, 16}; | |||
Fl_PNG_Image *icons[sizeof(icon_sizes)/sizeof(icon_sizes[0])]; | |||
int count; |