diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-04-24 10:19:28 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-04-24 10:19:28 +0300 |
commit | 3581b997d4793e8fd9ad7be7722b01edb2d75287 (patch) | |
tree | f7ebc91cce9d508aea5aa695531d37f368c21a59 /source | |
parent | 4b544e857c94118ff3957d7fa15758507fd94181 (diff) |
UI: use icons for the toolbar
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/interface/interface_icons.c | 9 | ||||
-rw-r--r-- | source/creator/CMakeLists.txt | 6 |
2 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c index ec255ed73a0..e81ab44150f 100644 --- a/source/blender/editors/interface/interface_icons.c +++ b/source/blender/editors/interface/interface_icons.c @@ -1226,6 +1226,15 @@ static void icon_draw_size( /* We need to flush widget base first to ensure correct ordering. */ UI_widgetbase_draw_cache_flush(); + /* TODO(campbell): scale icons up for toolbar, we need a way to detect larger buttons and do this automatic. */ + { + /* Icons are currently 38 aligned, scale from 16 -> 38. */ + float scale = 2.375f; + y = (y + (h / 2)) - ((h * scale) / 2); + w *= scale; + h *= scale; + } + /* This could re-generate often if rendered at different sizes in the one interface. * TODO(campbell): support caching multiple sizes. */ ImBuf *ibuf = di->data.geom.image_cache; diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index c5d1a55dfd6..5ed9355105a 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -958,6 +958,12 @@ delayed_do_install(${TARGETDIR_VER}) unset(BLENDER_TEXT_FILES) unset(BLENDER_TEXT_FILES_DESTINATION) +# Geometry icons. +install( + DIRECTORY + ${CMAKE_SOURCE_DIR}/release/datafiles/icons + DESTINATION ${TARGETDIR_VER}/datafiles +) # ----------------------------------------------------------------------------- # Setup link libs |