Initial commit for real hidpi support

Note: This commit has only been tested on MacOS

Changes:
- Icons now use the native hidpi support from Gtk (through Icon Theme)
- Icons are now directly generated from scalable file (i.e. SVG file)
- Widget sizes are scaled based on DPI and scale factor
- Font size is scaled based on DPI and scale factor
This commit is contained in:
Pandagrapher
2022-08-19 16:47:28 +02:00
parent 1e2dc30738
commit 89d2bdce5b
108 changed files with 1949 additions and 2032 deletions

View File

@@ -8,8 +8,7 @@ file(GLOB FONTS "fonts/*")
set(PROFILESDIR "profiles")
set(THEMEDIR "themes")
file(GLOB IMG_SVG LIST_DIRECTORIES false "images/svg/*")
file(GLOB IMG_PNG LIST_DIRECTORIES false "images/png/*")
file(GLOB IMG_SVG LIST_DIRECTORIES false "images/svg/*.svg")
file(GLOB IMG_ICO LIST_DIRECTORIES false "images/*")
if(WIN32)
@@ -27,16 +26,17 @@ endif()
if(UNIX)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/rawtherapee.desktop.in" "${CMAKE_CURRENT_BINARY_DIR}/rawtherapee.desktop")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/rawtherapee.desktop" DESTINATION ${DESKTOPDIR})
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/images/png/rawtherapee-logo-16.png" DESTINATION "${ICONSDIR}/hicolor/16x16/apps" RENAME rawtherapee.png)
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/images/png/rawtherapee-logo-24.png" DESTINATION "${ICONSDIR}/hicolor/24x24/apps" RENAME rawtherapee.png)
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/images/png/rawtherapee-logo-32.png" DESTINATION "${ICONSDIR}/hicolor/32x32/apps" RENAME rawtherapee.png)
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/images/png/rawtherapee-logo-48.png" DESTINATION "${ICONSDIR}/hicolor/48x48/apps" RENAME rawtherapee.png)
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/images/png/rawtherapee-logo-64.png" DESTINATION "${ICONSDIR}/hicolor/64x64/apps" RENAME rawtherapee.png)
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/images/png/rawtherapee-logo-128.png" DESTINATION "${ICONSDIR}/hicolor/128x128/apps" RENAME rawtherapee.png)
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/images/png/rawtherapee-logo-256.png" DESTINATION "${ICONSDIR}/hicolor/256x256/apps" RENAME rawtherapee.png)
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/images/rt-logo.svg" DESTINATION "${ICONSDIR}/hicolor/scalable/apps" RENAME rawtherapee.svg)
endif()
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/images/png/rawtherapee-logo-16.png" DESTINATION "${ICONSDIR}/rawtherapee/16x16/app_icons" RENAME rawtherapee.png)
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/images/png/rawtherapee-logo-24.png" DESTINATION "${ICONSDIR}/rawtherapee/24x24/app_icons" RENAME rawtherapee.png)
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/images/png/rawtherapee-logo-32.png" DESTINATION "${ICONSDIR}/rawtherapee/32x32/app_icons" RENAME rawtherapee.png)
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/images/png/rawtherapee-logo-48.png" DESTINATION "${ICONSDIR}/rawtherapee/48x48/app_icons" RENAME rawtherapee.png)
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/images/png/rawtherapee-logo-64.png" DESTINATION "${ICONSDIR}/rawtherapee/64x64/app_icons" RENAME rawtherapee.png)
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/images/png/rawtherapee-logo-128.png" DESTINATION "${ICONSDIR}/rawtherapee/128x128/app_icons" RENAME rawtherapee.png)
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/images/png/rawtherapee-logo-256.png" DESTINATION "${ICONSDIR}/rawtherapee/256x256/app_icons" RENAME rawtherapee.png)
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/images/rt-logo.svg" DESTINATION "${ICONSDIR}/rawtherapee/scalable/app_icons" RENAME rawtherapee.svg)
install(FILES ${LANGUAGEFILES} DESTINATION "${DATADIR}/languages")
install(FILES ${SOUNDFILES} DESTINATION "${DATADIR}/sounds")
install(FILES ${INPUTICCFILES} DESTINATION "${DATADIR}/iccprofiles/input")
@@ -50,8 +50,9 @@ endif()
install(DIRECTORY "${PROFILESDIR}" DESTINATION "${DATADIR}" FILES_MATCHING PATTERN "*.pp3")
install(DIRECTORY "${THEMEDIR}" DESTINATION "${DATADIR}")
install(FILES ${IMG_SVG} DESTINATION "${DATADIR}/images")
install(FILES ${IMG_PNG} DESTINATION "${DATADIR}/images")
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/images/png/empty.png" DESTINATION "${ICONSDIR}/rawtherapee/24x24/apps")
install(FILES ${IMG_SVG} DESTINATION "${ICONSDIR}/rawtherapee/scalable/apps")
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/images/svg/Index.theme" DESTINATION "${ICONSDIR}/rawtherapee")
install(FILES ${IMG_ICO} DESTINATION "${DATADIR}/images")
if(APPLE)

View File

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 63 KiB

View File

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 52 KiB

View File

@@ -0,0 +1,55 @@
[Icon Theme]
Name=RawTherapee
Comment=RawTherapee icon theme
Inherits=Adwaita
Directories=16x16/app_icons,24x24/app_icons,32x32/app_icons,48x48/app_icons,64x64/app_icons,128x128/app_icons,256x256/app_icons,scalable/app_icons,scalable/apps
[16x16/app_icons]
Size=16
Context=ApplicationIcons
Type=Threshold
[24x24/app_icons]
Size=24
Context=ApplicationIcons
Type=Threshold
[32x32/app_icons]
Size=32
Context=ApplicationIcons
Type=Threshold
[48x48/app_icons]
Size=48
Context=ApplicationIcons
Type=Threshold
[64x64/app_icons]
Size=64
Context=ApplicationIcons
Type=Threshold
[128x128/app_icons]
Size=128
Context=ApplicationIcons
Type=Threshold
[256x256/app_icons]
Size=256
Context=ApplicationIcons
Type=Threshold
[scalable/app_icons]
MinSize=16
Size=128
MaxSize=256
Context=ApplicationIcons
Type=Scalable
[scalable/apps]
MinSize=16
Size=128
MaxSize=256
Context=Applications
Type=Scalable