aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/Text.cc
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2008-01-14 22:27:00 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2008-01-14 22:27:00 (GMT)
commite1db89e2d7d56afca5335550ee1c9ff87fd54ba4 (patch)
tree779b52814dedd08eb56d1875cb2f97bbcdd39e8b /src/FbTk/Text.cc
parentc6099d777d844699fb8a4243921159898bc4f45c (diff)
downloadfluxbox-e1db89e2d7d56afca5335550ee1c9ff87fd54ba4.zip
fluxbox-e1db89e2d7d56afca5335550ee1c9ff87fd54ba4.tar.bz2
moved code a bit around, cleaned up some classes
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