mirror of
https://github.com/lc-soft/LCUI.git
synced 2026-12-01 16:56:34 +01:00
应用GlobalPos_ConvTo_RelativePos函数名的更改
This commit is contained in:
@@ -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);
|
||||
/* 根据像素坐标,设定文本光标的位置 */
|
||||
|
||||
+1
-1
@@ -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) );
|
||||
/* 移动窗口的位置 */
|
||||
|
||||
Reference in New Issue
Block a user