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-04-17 09:44:38 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-17 09:44:38 +0300
commit6b26024ea41f4ec25bf52872c18f08ec8f78138a (patch)
tree311b89c74e361e653bea912c11d9c4e82f4685bc /source/blender/editors/interface/interface_widgets.c
parent41d4a1986548e66a652221e4a68c52900474eeff (diff)
Cleanup: comment length in interface
Diffstat (limited to 'source/blender/editors/interface/interface_widgets.c')
-rw-r--r--source/blender/editors/interface/interface_widgets.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index e18a2e6068a..a5589fe2a80 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -1604,9 +1604,14 @@ static void ui_text_clip_right_ex(const uiFontStyle *fstyle,
/**
* Cut off the middle of the text to fit into the given width.
- * Note in case this middle clipping would just remove a few chars, it rather clips right, which is more readable.
- * If rpart_sep is not Null, the part of str starting to first occurrence of rpart_sep is preserved at all cost (useful
- * for strings with shortcuts, like 'AVeryLongFooBarLabelForMenuEntry|Ctrl O' -> 'AVeryLong...MenuEntry|Ctrl O').
+ *
+ * \note in case this middle clipping would just remove a few chars,
+ * it rather clips right, which is more readable.
+ *
+ * If rpart_sep is not Null, the part of str starting to first occurrence of rpart_sep
+ * is preserved at all cost.
+ * Useful for strings with shortcuts
+ * (like 'AVeryLongFooBarLabelForMenuEntry|Ctrl O' -> 'AVeryLong...MenuEntry|Ctrl O').
*/
float UI_text_clip_middle_ex(const uiFontStyle *fstyle,
char *str,
@@ -1691,8 +1696,8 @@ float UI_text_clip_middle_ex(const uiFontStyle *fstyle,
r_len = strlen(str + r_offset) + 1; /* +1 for the trailing '\0'. */
if (l_end + sep_len + r_len + rpart_len > max_len) {
- /* Corner case, the str already takes all available mem, and the ellipsis chars would actually
- * add more chars...
+ /* Corner case, the str already takes all available mem,
+ * and the ellipsis chars would actually add more chars.
* Better to just trim one or two letters to the right in this case...
* Note: with a single-char ellipsis, this should never happen! But better be safe here...
*/
@@ -1753,8 +1758,10 @@ static void ui_text_clip_middle(const uiFontStyle *fstyle, uiBut *but, const rct
}
/**
- * Like ui_text_clip_middle(), but protect/preserve at all cost the right part of the string after sep.
- * Useful for strings with shortcuts (like 'AVeryLongFooBarLabelForMenuEntry|Ctrl O' -> 'AVeryLong...MenuEntry|Ctrl O').
+ * Like #ui_text_clip_middle(), but protect/preserve at all cost
+ * the right part of the string after sep.
+ * Useful for strings with shortcuts
+ * (like 'AVeryLongFooBarLabelForMenuEntry|Ctrl O' -> 'AVeryLong...MenuEntry|Ctrl O').
*/
static void ui_text_clip_middle_protect_right(const uiFontStyle *fstyle,
uiBut *but,