summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Williams <andy@andywilliams.me>2017-11-29 17:37:21 +0000
committerAndy Williams <andy@andywilliams.me>2017-11-29 17:37:21 +0000
commitc89dc4e0e4e62574781ea888b4946037bf0f904d (patch)
treeccfcfe5be88feeda99a9348b06e7752fd001fba6
parent54d3091133c78496cf121a4b1c022a536a402969 (diff)
elm_code: If showing line numbers don't resize at 10 lines.
Content will still shift at 100 but that should be less intrusive
-rw-r--r--src/lib/elementary/elm_code_widget_text.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/elementary/elm_code_widget_text.c b/src/lib/elementary/elm_code_widget_text.c
index 43cce43a97..3b99305815 100644
--- a/src/lib/elementary/elm_code_widget_text.c
+++ b/src/lib/elementary/elm_code_widget_text.c
@@ -12,8 +12,10 @@ _elm_code_widget_text_line_number_width_get(Eo *obj EINA_UNUSED, Elm_Code_Widget
12 int max; 12 int max;
13 13
14 max = elm_code_file_lines_get(pd->code->file); 14 max = elm_code_file_lines_get(pd->code->file);
15 if (max < 1) 15
16 max = 1; 16 // leave space for 2 digits minimum
17 if (max < 10)
18 max = 10;
17 19
18 return floor(log10(max)) + 1; 20 return floor(log10(max)) + 1;
19} 21}