From cd0098d18e5145c006da19ddb2fd0d1f1c7ffd31 Mon Sep 17 00:00:00 2001 From: Liu Chao Date: Sat, 13 Apr 2013 23:07:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=94=E7=94=A8GlobalPos=5FConvTo=5FRelative?= =?UTF-8?q?Pos=E5=87=BD=E6=95=B0=E5=90=8D=E7=9A=84=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/widget/textbox.c | 2 +- src/widget/window.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/widget/textbox.c b/src/widget/textbox.c index 25c6e8d5..c621ce4b 100755 --- a/src/widget/textbox.c +++ b/src/widget/textbox.c @@ -163,7 +163,7 @@ TextBox_TextLayer_Click( LCUI_Widget *widget, LCUI_WidgetEvent *event ) pos.x = pos.y = 0; } else { /* 全局坐标转换成相对坐标 */ - pos = GlobalPos_ConvTo_RelativePos( tb->text, event->drag.cursor_pos ); + pos = Widget_ToRelPos( tb->text, event->drag.cursor_pos ); } //printf("pos: %d,%d\n", pos.x, pos.y); /* 根据像素坐标,设定文本光标的位置 */ diff --git a/src/widget/window.c b/src/widget/window.c index f977fe28..677ea480 100755 --- a/src/widget/window.c +++ b/src/widget/window.c @@ -116,7 +116,7 @@ Window_ExecMove(LCUI_Widget *titlebar, LCUI_WidgetEvent *event) /* 将偏移坐标加在窗口全局坐标上,得出窗口的新全局坐标 */ pos = Pos_Add( pos, offset ); /* 转换成在容器区域内的相对坐标 */ - pos = GlobalPos_ConvTo_RelativePos( window, pos ); + pos = Widget_ToRelPos( window, pos ); /* 解除之前设定的align */ Widget_SetAlign( window, ALIGN_NONE, Pos(0,0) ); /* 移动窗口的位置 */