aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/Text.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk/Text.cc')
-rw-r--r--src/FbTk/Text.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/FbTk/Text.cc b/src/FbTk/Text.cc
index 1e2851e..710b48a 100644
--- a/src/FbTk/Text.cc
+++ b/src/FbTk/Text.cc
@@ -28,15 +28,15 @@
28 28
29namespace FbTk { 29namespace FbTk {
30 30
31int doAlignment(int max_width, int bevel, FbTk::Justify justify, 31int doAlignment(int max_width, int bevel, FbTk::Justify justify,
32 const FbTk::Font &font, const char * const text, 32 const FbTk::Font &font, const char * const text,
33 size_t textlen, size_t &newlen) { 33 unsigned int textlen, unsigned int &newlen) {
34 34
35 if (text == 0 || textlen == 0) 35 if (text == 0 || textlen == 0)
36 return 0; 36 return 0;
37 37
38 int l = font.textWidth(text, textlen) + bevel; 38 int l = font.textWidth(text, textlen) + bevel;
39 size_t dlen = textlen; 39 unsigned int dlen = textlen;
40 int dx = bevel; 40 int dx = bevel;
41 if (l > max_width) { 41 if (l > max_width) {
42 for (; dlen > 0; dlen--) { 42 for (; dlen > 0; dlen--) {
@@ -51,14 +51,14 @@ int doAlignment(int max_width, int bevel, FbTk::Justify justify,
51 switch (justify) { 51 switch (justify) {
52 case FbTk::RIGHT: 52 case FbTk::RIGHT:
53 dx = max_width - l - bevel; 53 dx = max_width - l - bevel;
54 break; 54 break;
55 case FbTk::CENTER: 55 case FbTk::CENTER:
56 dx = (max_width - l)/2; 56 dx = (max_width - l)/2;
57 break; 57 break;
58 case FbTk::LEFT: 58 case FbTk::LEFT:
59 break; 59 break;
60 } 60 }
61 61
62 return dx; 62 return dx;
63} 63}
64 64