Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-01-15 15:24:20 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-01-15 15:30:31 +0300
commitb8e8c0e325d213f2dcf4adad5506989fa224716e (patch)
treeadb3d7fa8735426ea856a929f562655b2eaf64cb /source/blender/editors/interface/interface_icons.c
parent4226ee0b71fec6f08897dacf3d6632526618acca (diff)
Cleanup: comment line length (editors)
Prevents clang-format wrapping text before comments.
Diffstat (limited to 'source/blender/editors/interface/interface_icons.c')
-rw-r--r--source/blender/editors/interface/interface_icons.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c
index eb35f69b627..f3bb61cdd3d 100644
--- a/source/blender/editors/interface/interface_icons.c
+++ b/source/blender/editors/interface/interface_icons.c
@@ -709,7 +709,10 @@ static void init_internal_icons(void)
if (icondir) {
BLI_join_dirfile(iconfilestr, sizeof(iconfilestr), icondir, btheme->tui.iconfile);
- bbuf = IMB_loadiffname(iconfilestr, IB_rect, NULL); /* if the image is missing bbuf will just be NULL */
+
+ /* if the image is missing bbuf will just be NULL */
+ bbuf = IMB_loadiffname(iconfilestr, IB_rect, NULL);
+
if (bbuf && (bbuf->x < ICON_IMAGE_W || bbuf->y < ICON_IMAGE_H)) {
printf("\n***WARNING***\nIcons file %s too small.\nUsing built-in Icons instead\n", iconfilestr);
IMB_freeImBuf(bbuf);
@@ -1520,7 +1523,8 @@ static void icon_draw_size(
}
else if (di->type == ICON_TYPE_GEOM) {
#ifdef USE_UI_TOOLBAR_HACK
- /* TODO(campbell): scale icons up for toolbar, we need a way to detect larger buttons and do this automatic. */
+ /* TODO(campbell): scale icons up for toolbar,
+ * we need a way to detect larger buttons and do this automatic. */
{
float scale = (float)ICON_DEFAULT_HEIGHT_TOOLBAR / (float)ICON_DEFAULT_HEIGHT;
y = (y + (h / 2)) - ((h * scale) / 2);
@@ -1615,7 +1619,8 @@ static void icon_draw_size(
static void ui_id_preview_image_render_size(
const bContext *C, Scene *scene, ID *id, PreviewImage *pi, int size, const bool use_job)
{
- if (((pi->flag[size] & PRV_CHANGED) || !pi->rect[size])) { /* changed only ever set by dynamic icons */
+ /* changed only ever set by dynamic icons */
+ if (((pi->flag[size] & PRV_CHANGED) || !pi->rect[size])) {
/* create the rect if necessary */
icon_set_image(C, scene, id, pi, size, use_job);
@@ -1628,10 +1633,14 @@ void UI_id_icon_render(const bContext *C, Scene *scene, ID *id, const bool big,
PreviewImage *pi = BKE_previewimg_id_ensure(id);
if (pi) {
- if (big)
- ui_id_preview_image_render_size(C, scene, id, pi, ICON_SIZE_PREVIEW, use_job); /* bigger preview size */
- else
- ui_id_preview_image_render_size(C, scene, id, pi, ICON_SIZE_ICON, use_job); /* icon size */
+ if (big) {
+ /* bigger preview size */
+ ui_id_preview_image_render_size(C, scene, id, pi, ICON_SIZE_PREVIEW, use_job);
+ }
+ else {
+ /* icon size */
+ ui_id_preview_image_render_size(C, scene, id, pi, ICON_SIZE_ICON, use_job);
+ }
}
}