[prev in list] [next in list] [prev in thread] [next in thread]
List: enlightenment-svn
Subject: E CVS: e kwo
From: Enlightenment CVS <noreply () fitx-00 ! ewr ! caoslinux ! org>
Date: 2007-12-30 20:40:49
Message-ID: 20071230204049.CA4D0A30A2 () cvs ! caoslinux ! org
[Download RAW message or body]
Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
borders.c buttons.c coords.c dialog.c iclass.c iclass.h
tclass.h text.c
Log Message:
Center title vertically within border.
===================================================================
RCS file: /cvs/e/e16/e/src/borders.c,v
retrieving revision 1.301
retrieving revision 1.302
diff -u -3 -r1.301 -r1.302
--- borders.c 10 Sep 2007 20:26:52 -0000 1.301
+++ borders.c 30 Dec 2007 20:40:49 -0000 1.302
@@ -112,7 +112,7 @@
ITApply(ewb->win, ewin->border->part[i].iclass, is,
ewb->state, ewin->state.active, EoIsSticky(ewin),
- ST_BORDER, ewin->border->part[i].tclass, ts, txt);
+ ST_BORDER, ewin->border->part[i].tclass, ts, txt, 1);
}
static int
===================================================================
RCS file: /cvs/e/e16/e/src/buttons.c,v
retrieving revision 1.107
retrieving revision 1.108
diff -u -3 -r1.107 -r1.108
--- buttons.c 21 Dec 2007 22:04:54 -0000 1.107
+++ buttons.c 30 Dec 2007 20:40:49 -0000 1.108
@@ -262,7 +262,7 @@
ButtonDraw(Button * b)
{
ITApply(EoGetWin(b), b->iclass, NULL,
- b->state, 0, 0, ST_BUTTON, b->tclass, NULL, b->label);
+ b->state, 0, 0, ST_BUTTON, b->tclass, NULL, b->label, 0);
EoShapeUpdate(b, 0);
}
===================================================================
RCS file: /cvs/e/e16/e/src/coords.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -3 -r1.47 -r1.48
--- coords.c 10 Sep 2007 20:26:53 -0000 1.47
+++ coords.c 30 Dec 2007 20:40:49 -0000 1.48
@@ -125,7 +125,7 @@
EobjMap(eo, 0);
}
- ITApply(eo->win, ic, NULL, STATE_NORMAL, 1, 0, ST_SOLID, tc, NULL, s);
+ ITApply(eo->win, ic, NULL, STATE_NORMAL, 1, 0, ST_SOLID, tc, NULL, s, 1);
if (md) /* Assuming that shape change only happens when size changes too */
EobjShapeUpdate(eo, 0);
===================================================================
RCS file: /cvs/e/e16/e/src/dialog.c,v
retrieving revision 1.193
retrieving revision 1.194
diff -u -3 -r1.193 -r1.194
--- dialog.c 21 Dec 2007 22:04:54 -0000 1.193
+++ dialog.c 30 Dec 2007 20:40:49 -0000 1.194
@@ -440,7 +440,7 @@
else
{
ITApply(db->win, db->iclass, NULL, state, 0, 0,
- ST_WIDGET, db->tclass, NULL, db->text);
+ ST_WIDGET, db->tclass, NULL, db->text, 0);
}
}
#endif
@@ -1660,7 +1660,7 @@
else if (!(di->hilited) && (di->clicked))
state = STATE_CLICKED;
ITApply(di->win, di->iclass, NULL, state, 0, 0,
- ST_WIDGET, di->tclass, NULL, di->text);
+ ST_WIDGET, di->tclass, NULL, di->text, 0);
break;
case DITEM_AREA:
===================================================================
RCS file: /cvs/e/e16/e/src/iclass.c,v
retrieving revision 1.125
retrieving revision 1.126
diff -u -3 -r1.125 -r1.126
--- iclass.c 15 Dec 2007 16:29:22 -0000 1.125
+++ iclass.c 30 Dec 2007 20:40:49 -0000 1.126
@@ -1165,7 +1165,7 @@
void
ITApply(Win win, ImageClass * ic, ImageState * is,
int state, int active, int sticky, int image_type,
- TextClass * tc, TextState * ts, const char *text)
+ TextClass * tc, TextState * ts, const char *text, int flags)
{
int w, h;
@@ -1212,7 +1212,7 @@
TextstateTextDraw(ts, win, pmap, text, 0, 0, w, h,
&(ic->padding), 0,
- TextclassGetJustification(tc));
+ TextclassGetJustification(tc), flags);
}
/* Set window pixmap */
@@ -1261,7 +1261,8 @@
ImageclassApply(ImageClass * ic, Win win, int active, int sticky, int state,
int image_type)
{
- ITApply(win, ic, NULL, state, active, sticky, image_type, NULL, NULL, NULL);
+ ITApply(win, ic, NULL, state, active, sticky, image_type, NULL, NULL, NULL,
+ 0);
}
void
===================================================================
RCS file: /cvs/e/e16/e/src/iclass.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- iclass.h 10 Sep 2007 20:26:53 -0000 1.16
+++ iclass.h 30 Dec 2007 20:40:49 -0000 1.17
@@ -121,6 +121,7 @@
int image_type);
void ITApply(Win win, ImageClass * ic, ImageState * is,
int state, int active, int sticky, int image_type,
- TextClass * tc, TextState * ts, const char *text);
+ TextClass * tc, TextState * ts, const char *text,
+ int flags);
#endif /* _ICLASS_H */
===================================================================
RCS file: /cvs/e/e16/e/src/tclass.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -3 -r1.24 -r1.25
--- tclass.h 12 Sep 2007 21:33:50 -0000 1.24
+++ tclass.h 30 Dec 2007 20:40:49 -0000 1.25
@@ -112,7 +112,7 @@
void TextstateTextDraw(TextState * ts, Win win, Drawable draw,
const char *text, int x, int y, int w,
int h, const EImageBorder * pad,
- int fsize, int justification);
+ int fsize, int justh, int justv);
void TextSize(TextClass * tclass, int active, int sticky,
int state, const char *text, int *width,
int *height, int fsize);
===================================================================
RCS file: /cvs/e/e16/e/src/text.c,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -3 -r1.94 -r1.95
--- text.c 8 Dec 2007 15:17:42 -0000 1.94
+++ text.c 30 Dec 2007 20:40:49 -0000 1.95
@@ -828,12 +828,12 @@
void
TextstateTextDraw(TextState * ts, Win win, Drawable draw, const char *text,
int x, int y, int w, int h, const EImageBorder * pad,
- int fsize __UNUSED__, int justification)
+ int fsize __UNUSED__, int justh, int justv)
{
const char *str;
char **lines;
int i, num_lines;
- int textwidth_limit, offset_x, offset_y;
+ int textwidth_limit, textheight_limit, offset_x, offset_y;
int xx, yy, ww, hh, ascent;
Pixmap drawable;
@@ -865,6 +865,7 @@
h -= pad->top + pad->bottom;
}
textwidth_limit = w;
+ textheight_limit = h;
}
else
{
@@ -876,11 +877,12 @@
w -= pad->top + pad->bottom;
}
textwidth_limit = h;
+ textheight_limit = w;
}
#if 0
- Eprintf("TextstateTextDraw %d,%d %dx%d(%d): %s\n", x, y, w, h,
- textwidth_limit, text);
+ Eprintf("TextstateTextDraw %d,%d %dx%d(%dx%d): %s\n", x, y, w, h,
+ textwidth_limit, textheight_limit, text);
#endif
xx = x;
@@ -900,9 +902,11 @@
if (ww > textwidth_limit)
ts->ops->TextFit(ts, &lines[i], &ww, textwidth_limit);
+ if (justv)
+ yy += (textheight_limit - hh) / 2;
if (i == 0)
yy += ascent;
- xx = x + (((textwidth_limit - ww) * justification) >> 10);
+ xx = x + (((textwidth_limit - ww) * justh) >> 10);
im = TextImageGet(win, draw, xx - 1, yy - 1 - ascent,
ww + 2, hh + 2, ts);
@@ -931,9 +935,11 @@
if (ww > textwidth_limit)
ts->ops->TextFit(ts, &lines[i], &ww, textwidth_limit);
+ if (justv)
+ yy += (textheight_limit - hh) / 2;
if (i == 0)
yy += ascent;
- xx = x + (((textwidth_limit - ww) * justification) >> 10);
+ xx = x + (((textwidth_limit - ww) * justh) >> 10);
if (ts->style.orientation != FONT_TO_RIGHT)
drawable = ECreatePixmap(win, ww + 2, hh + 2, 0);
@@ -976,7 +982,7 @@
void
TextDraw(TextClass * tclass, Win win, Drawable draw, int active, int sticky,
int state, const char *text, int x, int y, int w, int h, int fsize,
- int justification)
+ int justh)
{
TextState *ts;
@@ -987,6 +993,5 @@
if (!ts)
return;
- TextstateTextDraw(ts, win, draw, text, x, y, w, h, NULL, fsize,
- justification);
+ TextstateTextDraw(ts, win, draw, text, x, y, w, h, NULL, fsize, justh, 0);
}
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic