mirror of
https://gitee.com/zlgopen/awtk.git
synced 2024-11-29 18:48:09 +08:00
improve overlay
This commit is contained in:
parent
65fc3617ac
commit
a78db1d691
@ -24,5 +24,6 @@ env.Program(os.path.join(BIN_DIR, 'demo_scroll_view'), ['demo_scroll_view.c']);
|
||||
|
||||
env.Program(os.path.join(BIN_DIR, 'demo_5key'), ['demo_5key_app.c']);
|
||||
env.Program(os.path.join(BIN_DIR, 'demo_desktop'), ['demo_desktop.c']);
|
||||
env.Program(os.path.join(BIN_DIR, 'demo_overlay'), ['demo_overlay.c']);
|
||||
env.Program(os.path.join(BIN_DIR, 'demo_file_browser'), ['demo_file_browser.c']);
|
||||
env.Program(os.path.join(BIN_DIR, 'demo_canvas_offline'), ['demo_canvas_offline.c']);
|
||||
|
32
design/default/ui/overlay_test.xml
Normal file
32
design/default/ui/overlay_test.xml
Normal file
@ -0,0 +1,32 @@
|
||||
<window>
|
||||
<view name="view" x="0%" y="0" w="100%" h="10%" style:normal:border_color="#000000">
|
||||
<check_button name="always_on_top" x="10" y="m" w="35%" h="50%" text="always_on_top"/>
|
||||
<button name="open:top" x="55%" y="m" w="40%" h="50%" text="open_overlay"/>
|
||||
</view>
|
||||
<view name="view" x="0" y="10%" w="100%" h="16%" style:normal:border_color="#000000">
|
||||
<button name="open:dialog1" x="55%" y="m" w="40%" h="50%" text="open_overlay"/>
|
||||
<view name="view2" x="0" y="m" w="50%" h="100%" children_layout="default(c=1,r=3)">
|
||||
<check_button name="highlight" value="true" text="highlight"/>
|
||||
<check_button name="window_anim" value="false" text="window_anim"/>
|
||||
<check_button name="timer_open_overlay" value="true" text="timer_open_overlay"/>
|
||||
</view>
|
||||
</view>
|
||||
<combo_box name="combo_box" x="10" y="135" w="132" h="28" item_height="30" localize_options="false" readonly="true" options="a;b;c;d" selected_index="0"/>
|
||||
<view name="view1" x="0" y="b" w="100%" h="60%" style:normal:border_color="#000000" children_layout="default(c=3,r=5,x=5,y=5,s=5)">
|
||||
<button name="open:menu_down_left" visible="true" text="DownLeft"/>
|
||||
<button name="open:menu_down_center" visible="true" text="DownCenter"/>
|
||||
<button name="open:menu_down_right" visible="true" text="DownRight"/>
|
||||
<button name="open:menu_right_top" visible="true" text="RightTop"/>
|
||||
<button name="open:menu_point" visible="true" text="Point"/>
|
||||
<button name="open:menu_left_top" visible="true" text="LeftTop"/>
|
||||
<button name="open:menu_right_middle" visible="true" text="RightMiddle"/>
|
||||
<button name="close" visible="true" text="Close"/>
|
||||
<button name="open:menu_left_middle" visible="true" text="LeftMiddle"/>
|
||||
<button name="open:menu_right_bottom" visible="true" text="LeftBottom"/>
|
||||
<button name="open:menu_point" visible="true" text="Point"/>
|
||||
<button name="open:menu_left_bottom" visible="true" text="LeftBottom"/>
|
||||
<button name="open:menu_up_left" visible="true" text="UpLeft"/>
|
||||
<button name="open:menu_up_center" visible="true" text="UpCenter"/>
|
||||
<button name="open:menu_up_right" visible="true" text="UpRight"/>
|
||||
</view>
|
||||
</window>
|
@ -1,5 +1,8 @@
|
||||
# 最新动态
|
||||
|
||||
2024/06/27
|
||||
* 修复overlay导致对话框高亮消失的问题和overlay的焦点切换问题(感谢智明提供补丁)
|
||||
|
||||
2024/06/26
|
||||
* icon\_at 增加 left\_top/left\_bottom/right\_top/right\_bottom四种位置。
|
||||
|
||||
|
@ -219,6 +219,7 @@ extern TK_CONST_DATA_ALIGN(const unsigned char ui_floating_keyboard_default[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char ui_color_picker_rgb_default[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char ui_tab_bottom_compact_default[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char ui_popup_default[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char ui_overlay_test_default[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char ui_serial_default[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char ui_image_packed_default[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char ui_kb_uint_default[]);
|
||||
@ -1153,6 +1154,7 @@ ret_t assets_init_dark(void) {
|
||||
assets_manager_add(am, ui_color_picker_rgb_default);
|
||||
assets_manager_add(am, ui_tab_bottom_compact_default);
|
||||
assets_manager_add(am, ui_popup_default);
|
||||
assets_manager_add(am, ui_overlay_test_default);
|
||||
assets_manager_add(am, ui_serial_default);
|
||||
assets_manager_add(am, ui_image_packed_default);
|
||||
assets_manager_add(am, ui_kb_uint_default);
|
||||
|
@ -219,6 +219,7 @@
|
||||
#include "default/inc/ui/color_picker_rgb.data"
|
||||
#include "default/inc/ui/tab_bottom_compact.data"
|
||||
#include "default/inc/ui/popup.data"
|
||||
#include "default/inc/ui/overlay_test.data"
|
||||
#include "default/inc/ui/serial.data"
|
||||
#include "default/inc/ui/image_packed.data"
|
||||
#include "default/inc/ui/kb_uint.data"
|
||||
@ -1153,6 +1154,7 @@ ret_t assets_init_default(void) {
|
||||
assets_manager_add(am, ui_color_picker_rgb_default);
|
||||
assets_manager_add(am, ui_tab_bottom_compact_default);
|
||||
assets_manager_add(am, ui_popup_default);
|
||||
assets_manager_add(am, ui_overlay_test_default);
|
||||
assets_manager_add(am, ui_serial_default);
|
||||
assets_manager_add(am, ui_image_packed_default);
|
||||
assets_manager_add(am, ui_kb_uint_default);
|
||||
|
@ -216,6 +216,7 @@ extern TK_CONST_DATA_ALIGN(const unsigned char ui_floating_keyboard_default[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char ui_color_picker_rgb_default[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char ui_tab_bottom_compact_default[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char ui_popup_default[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char ui_overlay_test_default[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char ui_serial_default[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char ui_image_packed_default[]);
|
||||
extern TK_CONST_DATA_ALIGN(const unsigned char ui_kb_uint_default[]);
|
||||
@ -773,6 +774,7 @@ ret_t assets_init_dark(void) {
|
||||
assets_manager_add(am, ui_color_picker_rgb_default);
|
||||
assets_manager_add(am, ui_tab_bottom_compact_default);
|
||||
assets_manager_add(am, ui_popup_default);
|
||||
assets_manager_add(am, ui_overlay_test_default);
|
||||
assets_manager_add(am, ui_serial_default);
|
||||
assets_manager_add(am, ui_image_packed_default);
|
||||
assets_manager_add(am, ui_kb_uint_default);
|
||||
|
@ -216,6 +216,7 @@
|
||||
#include "default/inc/ui/color_picker_rgb.data"
|
||||
#include "default/inc/ui/tab_bottom_compact.data"
|
||||
#include "default/inc/ui/popup.data"
|
||||
#include "default/inc/ui/overlay_test.data"
|
||||
#include "default/inc/ui/serial.data"
|
||||
#include "default/inc/ui/image_packed.data"
|
||||
#include "default/inc/ui/kb_uint.data"
|
||||
@ -773,6 +774,7 @@ ret_t assets_init_default(void) {
|
||||
assets_manager_add(am, ui_color_picker_rgb_default);
|
||||
assets_manager_add(am, ui_tab_bottom_compact_default);
|
||||
assets_manager_add(am, ui_popup_default);
|
||||
assets_manager_add(am, ui_overlay_test_default);
|
||||
assets_manager_add(am, ui_serial_default);
|
||||
assets_manager_add(am, ui_image_packed_default);
|
||||
assets_manager_add(am, ui_kb_uint_default);
|
||||
|
154
res/assets/default/inc/ui/overlay_test.data
Normal file
154
res/assets/default/inc/ui/overlay_test.data
Normal file
@ -0,0 +1,154 @@
|
||||
TK_CONST_DATA_ALIGN(const unsigned char ui_overlay_test_default[]) = {
|
||||
0x04,0x00,0x01,0x01,0xb1,0x0b,0x00,0x00,0x00,0x00,0x00,0x00,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x5f,
|
||||
0x74,0x65,0x73,0x74,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x12,0x12,0x22,0x11,0x77,0x69,0x6e,0x64,0x6f,0x77,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x76,0x69,0x65,
|
||||
0x77,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x00,0x00,
|
||||
0x00,0x0a,0x00,0x00,0x00,0x73,0x65,0x6c,0x66,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,
|
||||
0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,0x30,0x25,0x2c,0x79,0x3d,0x30,0x2c,0x77,0x3d,0x31,0x30,0x30,0x25,
|
||||
0x2c,0x68,0x3d,0x31,0x30,0x25,0x29,0x00,0x6e,0x61,0x6d,0x65,0x00,0x76,0x69,0x65,0x77,0x00,0x73,0x74,
|
||||
0x79,0x6c,0x65,0x3a,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x3a,0x62,0x6f,0x72,0x64,0x65,0x72,0x5f,0x63,0x6f,
|
||||
0x6c,0x6f,0x72,0x00,0x23,0x30,0x30,0x30,0x30,0x30,0x30,0x00,0x00,0x63,0x68,0x65,0x63,0x6b,0x5f,0x62,
|
||||
0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x23,0x00,0x00,0x00,0x32,0x00,0x00,
|
||||
0x00,0x73,0x65,0x6c,0x66,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,
|
||||
0x28,0x78,0x3d,0x31,0x30,0x2c,0x79,0x3d,0x6d,0x2c,0x77,0x3d,0x33,0x35,0x25,0x2c,0x68,0x3d,0x35,0x30,
|
||||
0x25,0x29,0x00,0x6e,0x61,0x6d,0x65,0x00,0x61,0x6c,0x77,0x61,0x79,0x73,0x5f,0x6f,0x6e,0x5f,0x74,0x6f,
|
||||
0x70,0x00,0x74,0x65,0x78,0x74,0x00,0x61,0x6c,0x77,0x61,0x79,0x73,0x5f,0x6f,0x6e,0x5f,0x74,0x6f,0x70,
|
||||
0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x37,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x32,0x00,0x00,0x00,0x73,0x65,0x6c,0x66,0x5f,0x6c,0x61,0x79,0x6f,
|
||||
0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,0x35,0x35,0x25,0x2c,0x79,0x3d,0x6d,
|
||||
0x2c,0x77,0x3d,0x34,0x30,0x25,0x2c,0x68,0x3d,0x35,0x30,0x25,0x29,0x00,0x6e,0x61,0x6d,0x65,0x00,0x6f,
|
||||
0x70,0x65,0x6e,0x3a,0x74,0x6f,0x70,0x00,0x74,0x65,0x78,0x74,0x00,0x6f,0x70,0x65,0x6e,0x5f,0x6f,0x76,
|
||||
0x65,0x72,0x6c,0x61,0x79,0x00,0x00,0x00,0x00,0x76,0x69,0x65,0x77,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x73,0x65,0x6c,
|
||||
0x66,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,0x30,
|
||||
0x2c,0x79,0x3d,0x31,0x30,0x25,0x2c,0x77,0x3d,0x31,0x30,0x30,0x25,0x2c,0x68,0x3d,0x31,0x36,0x25,0x29,
|
||||
0x00,0x6e,0x61,0x6d,0x65,0x00,0x76,0x69,0x65,0x77,0x00,0x73,0x74,0x79,0x6c,0x65,0x3a,0x6e,0x6f,0x72,
|
||||
0x6d,0x61,0x6c,0x3a,0x62,0x6f,0x72,0x64,0x65,0x72,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x00,0x23,0x30,0x30,
|
||||
0x30,0x30,0x30,0x30,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x37,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x32,0x00,0x00,0x00,0x73,0x65,0x6c,0x66,0x5f,0x6c,
|
||||
0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,0x35,0x35,0x25,0x2c,
|
||||
0x79,0x3d,0x6d,0x2c,0x77,0x3d,0x34,0x30,0x25,0x2c,0x68,0x3d,0x35,0x30,0x25,0x29,0x00,0x6e,0x61,0x6d,
|
||||
0x65,0x00,0x6f,0x70,0x65,0x6e,0x3a,0x64,0x69,0x61,0x6c,0x6f,0x67,0x31,0x00,0x74,0x65,0x78,0x74,0x00,
|
||||
0x6f,0x70,0x65,0x6e,0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x00,0x00,0x00,0x76,0x69,0x65,0x77,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x32,0x00,0x00,0x00,0x64,
|
||||
0x00,0x00,0x00,0x73,0x65,0x6c,0x66,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,
|
||||
0x6c,0x74,0x28,0x78,0x3d,0x30,0x2c,0x79,0x3d,0x6d,0x2c,0x77,0x3d,0x35,0x30,0x25,0x2c,0x68,0x3d,0x31,
|
||||
0x30,0x30,0x25,0x29,0x00,0x6e,0x61,0x6d,0x65,0x00,0x76,0x69,0x65,0x77,0x32,0x00,0x63,0x68,0x69,0x6c,
|
||||
0x64,0x72,0x65,0x6e,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,
|
||||
0x63,0x3d,0x31,0x2c,0x72,0x3d,0x33,0x29,0x00,0x00,0x63,0x68,0x65,0x63,0x6b,0x5f,0x62,0x75,0x74,0x74,
|
||||
0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,
|
||||
0x6d,0x65,0x00,0x68,0x69,0x67,0x68,0x6c,0x69,0x67,0x68,0x74,0x00,0x76,0x61,0x6c,0x75,0x65,0x00,0x74,
|
||||
0x72,0x75,0x65,0x00,0x74,0x65,0x78,0x74,0x00,0x68,0x69,0x67,0x68,0x6c,0x69,0x67,0x68,0x74,0x00,0x00,
|
||||
0x00,0x63,0x68,0x65,0x63,0x6b,0x5f,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x77,0x69,0x6e,0x64,0x6f,0x77,
|
||||
0x5f,0x61,0x6e,0x69,0x6d,0x00,0x76,0x61,0x6c,0x75,0x65,0x00,0x66,0x61,0x6c,0x73,0x65,0x00,0x74,0x65,
|
||||
0x78,0x74,0x00,0x77,0x69,0x6e,0x64,0x6f,0x77,0x5f,0x61,0x6e,0x69,0x6d,0x00,0x00,0x00,0x63,0x68,0x65,
|
||||
0x63,0x6b,0x5f,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x74,0x69,0x6d,0x65,0x72,0x5f,0x6f,0x70,0x65,0x6e,
|
||||
0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x00,0x76,0x61,0x6c,0x75,0x65,0x00,0x74,0x72,0x75,0x65,0x00,
|
||||
0x74,0x65,0x78,0x74,0x00,0x74,0x69,0x6d,0x65,0x72,0x5f,0x6f,0x70,0x65,0x6e,0x5f,0x6f,0x76,0x65,0x72,
|
||||
0x6c,0x61,0x79,0x00,0x00,0x00,0x00,0x00,0x63,0x6f,0x6d,0x62,0x6f,0x5f,0x62,0x6f,0x78,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x0a,0x00,0x00,0x00,0x87,0x00,0x00,0x00,0x84,0x00,0x00,0x00,0x1c,0x00,0x00,0x00,0x6f,0x70,0x74,0x69,
|
||||
0x6f,0x6e,0x73,0x00,0x61,0x3b,0x62,0x3b,0x63,0x3b,0x64,0x00,0x6e,0x61,0x6d,0x65,0x00,0x63,0x6f,0x6d,
|
||||
0x62,0x6f,0x5f,0x62,0x6f,0x78,0x00,0x69,0x74,0x65,0x6d,0x5f,0x68,0x65,0x69,0x67,0x68,0x74,0x00,0x33,
|
||||
0x30,0x00,0x6c,0x6f,0x63,0x61,0x6c,0x69,0x7a,0x65,0x5f,0x6f,0x70,0x74,0x69,0x6f,0x6e,0x73,0x00,0x66,
|
||||
0x61,0x6c,0x73,0x65,0x00,0x72,0x65,0x61,0x64,0x6f,0x6e,0x6c,0x79,0x00,0x74,0x72,0x75,0x65,0x00,0x73,
|
||||
0x65,0x6c,0x65,0x63,0x74,0x65,0x64,0x5f,0x69,0x6e,0x64,0x65,0x78,0x00,0x30,0x00,0x00,0x00,0x76,0x69,
|
||||
0x65,0x77,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x00,
|
||||
0x00,0x00,0x3c,0x00,0x00,0x00,0x73,0x65,0x6c,0x66,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,
|
||||
0x66,0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,0x30,0x2c,0x79,0x3d,0x62,0x2c,0x77,0x3d,0x31,0x30,0x30,0x25,
|
||||
0x2c,0x68,0x3d,0x36,0x30,0x25,0x29,0x00,0x6e,0x61,0x6d,0x65,0x00,0x76,0x69,0x65,0x77,0x31,0x00,0x73,
|
||||
0x74,0x79,0x6c,0x65,0x3a,0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x3a,0x62,0x6f,0x72,0x64,0x65,0x72,0x5f,0x63,
|
||||
0x6f,0x6c,0x6f,0x72,0x00,0x23,0x30,0x30,0x30,0x30,0x30,0x30,0x00,0x63,0x68,0x69,0x6c,0x64,0x72,0x65,
|
||||
0x6e,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x63,0x3d,0x33,
|
||||
0x2c,0x72,0x3d,0x35,0x2c,0x78,0x3d,0x35,0x2c,0x79,0x3d,0x35,0x2c,0x73,0x3d,0x35,0x29,0x00,0x00,0x62,
|
||||
0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x6f,0x70,0x65,0x6e,0x3a,0x6d,0x65,0x6e,
|
||||
0x75,0x5f,0x64,0x6f,0x77,0x6e,0x5f,0x6c,0x65,0x66,0x74,0x00,0x76,0x69,0x73,0x69,0x62,0x6c,0x65,0x00,
|
||||
0x74,0x72,0x75,0x65,0x00,0x74,0x65,0x78,0x74,0x00,0x44,0x6f,0x77,0x6e,0x4c,0x65,0x66,0x74,0x00,0x00,
|
||||
0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x6f,0x70,0x65,0x6e,0x3a,0x6d,
|
||||
0x65,0x6e,0x75,0x5f,0x64,0x6f,0x77,0x6e,0x5f,0x63,0x65,0x6e,0x74,0x65,0x72,0x00,0x76,0x69,0x73,0x69,
|
||||
0x62,0x6c,0x65,0x00,0x74,0x72,0x75,0x65,0x00,0x74,0x65,0x78,0x74,0x00,0x44,0x6f,0x77,0x6e,0x43,0x65,
|
||||
0x6e,0x74,0x65,0x72,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,
|
||||
0x6f,0x70,0x65,0x6e,0x3a,0x6d,0x65,0x6e,0x75,0x5f,0x64,0x6f,0x77,0x6e,0x5f,0x72,0x69,0x67,0x68,0x74,
|
||||
0x00,0x76,0x69,0x73,0x69,0x62,0x6c,0x65,0x00,0x74,0x72,0x75,0x65,0x00,0x74,0x65,0x78,0x74,0x00,0x44,
|
||||
0x6f,0x77,0x6e,0x52,0x69,0x67,0x68,0x74,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,
|
||||
0x61,0x6d,0x65,0x00,0x6f,0x70,0x65,0x6e,0x3a,0x6d,0x65,0x6e,0x75,0x5f,0x72,0x69,0x67,0x68,0x74,0x5f,
|
||||
0x74,0x6f,0x70,0x00,0x76,0x69,0x73,0x69,0x62,0x6c,0x65,0x00,0x74,0x72,0x75,0x65,0x00,0x74,0x65,0x78,
|
||||
0x74,0x00,0x52,0x69,0x67,0x68,0x74,0x54,0x6f,0x70,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x6e,0x61,0x6d,0x65,0x00,0x6f,0x70,0x65,0x6e,0x3a,0x6d,0x65,0x6e,0x75,0x5f,0x70,0x6f,0x69,0x6e,
|
||||
0x74,0x00,0x76,0x69,0x73,0x69,0x62,0x6c,0x65,0x00,0x74,0x72,0x75,0x65,0x00,0x74,0x65,0x78,0x74,0x00,
|
||||
0x50,0x6f,0x69,0x6e,0x74,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,
|
||||
0x00,0x6f,0x70,0x65,0x6e,0x3a,0x6d,0x65,0x6e,0x75,0x5f,0x6c,0x65,0x66,0x74,0x5f,0x74,0x6f,0x70,0x00,
|
||||
0x76,0x69,0x73,0x69,0x62,0x6c,0x65,0x00,0x74,0x72,0x75,0x65,0x00,0x74,0x65,0x78,0x74,0x00,0x4c,0x65,
|
||||
0x66,0x74,0x54,0x6f,0x70,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,
|
||||
0x00,0x6f,0x70,0x65,0x6e,0x3a,0x6d,0x65,0x6e,0x75,0x5f,0x72,0x69,0x67,0x68,0x74,0x5f,0x6d,0x69,0x64,
|
||||
0x64,0x6c,0x65,0x00,0x76,0x69,0x73,0x69,0x62,0x6c,0x65,0x00,0x74,0x72,0x75,0x65,0x00,0x74,0x65,0x78,
|
||||
0x74,0x00,0x52,0x69,0x67,0x68,0x74,0x4d,0x69,0x64,0x64,0x6c,0x65,0x00,0x00,0x00,0x62,0x75,0x74,0x74,
|
||||
0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x63,0x6c,0x6f,0x73,0x65,0x00,0x76,0x69,0x73,0x69,0x62,
|
||||
0x6c,0x65,0x00,0x74,0x72,0x75,0x65,0x00,0x74,0x65,0x78,0x74,0x00,0x43,0x6c,0x6f,0x73,0x65,0x00,0x00,
|
||||
0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x6f,0x70,0x65,0x6e,0x3a,0x6d,
|
||||
0x65,0x6e,0x75,0x5f,0x6c,0x65,0x66,0x74,0x5f,0x6d,0x69,0x64,0x64,0x6c,0x65,0x00,0x76,0x69,0x73,0x69,
|
||||
0x62,0x6c,0x65,0x00,0x74,0x72,0x75,0x65,0x00,0x74,0x65,0x78,0x74,0x00,0x4c,0x65,0x66,0x74,0x4d,0x69,
|
||||
0x64,0x64,0x6c,0x65,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,
|
||||
0x6f,0x70,0x65,0x6e,0x3a,0x6d,0x65,0x6e,0x75,0x5f,0x72,0x69,0x67,0x68,0x74,0x5f,0x62,0x6f,0x74,0x74,
|
||||
0x6f,0x6d,0x00,0x76,0x69,0x73,0x69,0x62,0x6c,0x65,0x00,0x74,0x72,0x75,0x65,0x00,0x74,0x65,0x78,0x74,
|
||||
0x00,0x4c,0x65,0x66,0x74,0x42,0x6f,0x74,0x74,0x6f,0x6d,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x6f,0x70,0x65,0x6e,0x3a,0x6d,0x65,0x6e,0x75,0x5f,0x70,0x6f,0x69,
|
||||
0x6e,0x74,0x00,0x76,0x69,0x73,0x69,0x62,0x6c,0x65,0x00,0x74,0x72,0x75,0x65,0x00,0x74,0x65,0x78,0x74,
|
||||
0x00,0x50,0x6f,0x69,0x6e,0x74,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,
|
||||
0x65,0x00,0x6f,0x70,0x65,0x6e,0x3a,0x6d,0x65,0x6e,0x75,0x5f,0x6c,0x65,0x66,0x74,0x5f,0x62,0x6f,0x74,
|
||||
0x74,0x6f,0x6d,0x00,0x76,0x69,0x73,0x69,0x62,0x6c,0x65,0x00,0x74,0x72,0x75,0x65,0x00,0x74,0x65,0x78,
|
||||
0x74,0x00,0x4c,0x65,0x66,0x74,0x42,0x6f,0x74,0x74,0x6f,0x6d,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,
|
||||
0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x6f,0x70,0x65,0x6e,0x3a,0x6d,0x65,0x6e,0x75,0x5f,0x75,0x70,
|
||||
0x5f,0x6c,0x65,0x66,0x74,0x00,0x76,0x69,0x73,0x69,0x62,0x6c,0x65,0x00,0x74,0x72,0x75,0x65,0x00,0x74,
|
||||
0x65,0x78,0x74,0x00,0x55,0x70,0x4c,0x65,0x66,0x74,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x6e,0x61,0x6d,0x65,0x00,0x6f,0x70,0x65,0x6e,0x3a,0x6d,0x65,0x6e,0x75,0x5f,0x75,0x70,0x5f,0x63,
|
||||
0x65,0x6e,0x74,0x65,0x72,0x00,0x76,0x69,0x73,0x69,0x62,0x6c,0x65,0x00,0x74,0x72,0x75,0x65,0x00,0x74,
|
||||
0x65,0x78,0x74,0x00,0x55,0x70,0x43,0x65,0x6e,0x74,0x65,0x72,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,
|
||||
0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x6f,0x70,0x65,0x6e,0x3a,0x6d,0x65,0x6e,0x75,0x5f,0x75,0x70,
|
||||
0x5f,0x72,0x69,0x67,0x68,0x74,0x00,0x76,0x69,0x73,0x69,0x62,0x6c,0x65,0x00,0x74,0x72,0x75,0x65,0x00,
|
||||
0x74,0x65,0x78,0x74,0x00,0x55,0x70,0x52,0x69,0x67,0x68,0x74,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,};/*3041*/
|
BIN
res/assets/default/raw/ui/overlay_test.bin
Normal file
BIN
res/assets/default/raw/ui/overlay_test.bin
Normal file
Binary file not shown.
@ -219,6 +219,7 @@
|
||||
#include "assets/default/inc/ui/color_picker_rgb.data"
|
||||
#include "assets/default/inc/ui/tab_bottom_compact.data"
|
||||
#include "assets/default/inc/ui/popup.data"
|
||||
#include "assets/default/inc/ui/overlay_test.data"
|
||||
#include "assets/default/inc/ui/serial.data"
|
||||
#include "assets/default/inc/ui/image_packed.data"
|
||||
#include "assets/default/inc/ui/kb_uint.data"
|
||||
@ -1153,6 +1154,7 @@ ret_t assets_init(void) {
|
||||
assets_manager_add(am, ui_color_picker_rgb_default);
|
||||
assets_manager_add(am, ui_tab_bottom_compact_default);
|
||||
assets_manager_add(am, ui_popup_default);
|
||||
assets_manager_add(am, ui_overlay_test_default);
|
||||
assets_manager_add(am, ui_serial_default);
|
||||
assets_manager_add(am, ui_image_packed_default);
|
||||
assets_manager_add(am, ui_kb_uint_default);
|
||||
|
@ -219,6 +219,7 @@
|
||||
#include "assets/default/inc/ui/color_picker_rgb.data"
|
||||
#include "assets/default/inc/ui/tab_bottom_compact.data"
|
||||
#include "assets/default/inc/ui/popup.data"
|
||||
#include "assets/default/inc/ui/overlay_test.data"
|
||||
#include "assets/default/inc/ui/serial.data"
|
||||
#include "assets/default/inc/ui/image_packed.data"
|
||||
#include "assets/default/inc/ui/kb_uint.data"
|
||||
@ -1153,6 +1154,7 @@ ret_t assets_init(void) {
|
||||
assets_manager_add(am, ui_color_picker_rgb_default);
|
||||
assets_manager_add(am, ui_tab_bottom_compact_default);
|
||||
assets_manager_add(am, ui_popup_default);
|
||||
assets_manager_add(am, ui_overlay_test_default);
|
||||
assets_manager_add(am, ui_serial_default);
|
||||
assets_manager_add(am, ui_image_packed_default);
|
||||
assets_manager_add(am, ui_kb_uint_default);
|
||||
|
@ -216,6 +216,7 @@
|
||||
#include "assets/default/inc/ui/color_picker_rgb.data"
|
||||
#include "assets/default/inc/ui/tab_bottom_compact.data"
|
||||
#include "assets/default/inc/ui/popup.data"
|
||||
#include "assets/default/inc/ui/overlay_test.data"
|
||||
#include "assets/default/inc/ui/serial.data"
|
||||
#include "assets/default/inc/ui/image_packed.data"
|
||||
#include "assets/default/inc/ui/kb_uint.data"
|
||||
@ -773,6 +774,7 @@ ret_t assets_init(void) {
|
||||
assets_manager_add(am, ui_color_picker_rgb_default);
|
||||
assets_manager_add(am, ui_tab_bottom_compact_default);
|
||||
assets_manager_add(am, ui_popup_default);
|
||||
assets_manager_add(am, ui_overlay_test_default);
|
||||
assets_manager_add(am, ui_serial_default);
|
||||
assets_manager_add(am, ui_image_packed_default);
|
||||
assets_manager_add(am, ui_kb_uint_default);
|
||||
|
@ -216,6 +216,7 @@
|
||||
#include "assets/default/inc/ui/color_picker_rgb.data"
|
||||
#include "assets/default/inc/ui/tab_bottom_compact.data"
|
||||
#include "assets/default/inc/ui/popup.data"
|
||||
#include "assets/default/inc/ui/overlay_test.data"
|
||||
#include "assets/default/inc/ui/serial.data"
|
||||
#include "assets/default/inc/ui/image_packed.data"
|
||||
#include "assets/default/inc/ui/kb_uint.data"
|
||||
@ -773,6 +774,7 @@ ret_t assets_init(void) {
|
||||
assets_manager_add(am, ui_color_picker_rgb_default);
|
||||
assets_manager_add(am, ui_tab_bottom_compact_default);
|
||||
assets_manager_add(am, ui_popup_default);
|
||||
assets_manager_add(am, ui_overlay_test_default);
|
||||
assets_manager_add(am, ui_serial_default);
|
||||
assets_manager_add(am, ui_image_packed_default);
|
||||
assets_manager_add(am, ui_kb_uint_default);
|
||||
|
@ -3092,6 +3092,15 @@ ret_t widget_on_pointer_down_children(widget_t* widget, pointer_event_t* e) {
|
||||
if (!(widget_is_keyboard(target))) {
|
||||
if (widget_is_focusable(target) || !widget_is_strongly_focus(widget)) {
|
||||
if (!target->focused) {
|
||||
if (widget_is_window(target)) {
|
||||
widget_t* foreground_win = window_manager_get_foreground_window(window_manager());
|
||||
if (foreground_win != NULL) {
|
||||
if (widget_is_overlay(foreground_win) || widget_is_overlay(target)) {
|
||||
window_manager_dispatch_window_event(target, EVT_WINDOW_TO_FOREGROUND);
|
||||
window_manager_dispatch_window_event(foreground_win, EVT_WINDOW_TO_BACKGROUND);
|
||||
}
|
||||
}
|
||||
}
|
||||
widget_set_focused_internal(target, TRUE);
|
||||
} else {
|
||||
widget->key_target = target;
|
||||
|
@ -224,6 +224,20 @@ widget_t* window_manager_get_top_window(widget_t* widget) {
|
||||
}
|
||||
}
|
||||
|
||||
widget_t* window_manager_get_foreground_window(widget_t* widget) {
|
||||
window_manager_t* wm = WINDOW_MANAGER(widget);
|
||||
return_value_if_fail(wm != NULL && wm->vt != NULL, NULL);
|
||||
|
||||
WIDGET_FOR_EACH_CHILD_BEGIN_R(widget, iter, i)
|
||||
int32_t stage = widget_get_prop_int(iter, WIDGET_PROP_STAGE, WINDOW_STAGE_NONE);
|
||||
if (stage == WINDOW_STAGE_OPENED) {
|
||||
return iter;
|
||||
}
|
||||
WIDGET_FOR_EACH_CHILD_END();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
widget_t* window_manager_get_prev_window(widget_t* widget) {
|
||||
window_manager_t* wm = WINDOW_MANAGER(widget);
|
||||
return_value_if_fail(wm != NULL && wm->vt != NULL, NULL);
|
||||
|
@ -189,6 +189,16 @@ widget_t* window_manager_get_top_main_window(widget_t* widget);
|
||||
*/
|
||||
widget_t* window_manager_get_top_window(widget_t* widget);
|
||||
|
||||
/**
|
||||
* @method window_manager_get_foreground_window
|
||||
* 获取前景窗口。
|
||||
* @annotation ["scriptable"]
|
||||
* @param {widget_t*} widget 窗口管理器对象。
|
||||
*
|
||||
* @return {widget_t*} 返回窗口对象。
|
||||
*/
|
||||
widget_t* window_manager_get_foreground_window(widget_t* widget);
|
||||
|
||||
/**
|
||||
* @method window_manager_get_prev_window
|
||||
* 获取前一个的窗口。
|
||||
|
@ -811,7 +811,6 @@ static ret_t window_manager_default_close_window(widget_t* widget, widget_t* win
|
||||
}
|
||||
if (prev_win != NULL) {
|
||||
if (!widget_is_keyboard(window)) {
|
||||
bool_t find = FALSE;
|
||||
bool_t is_create = TRUE;
|
||||
const char* curr_highlight = NULL;
|
||||
widget_t* widget_highlighter = prev_win;
|
||||
@ -820,20 +819,16 @@ static ret_t window_manager_default_close_window(widget_t* widget, widget_t* win
|
||||
window_manager_dispatch_window_event(prev_win, EVT_WINDOW_TO_FOREGROUND);
|
||||
|
||||
WIDGET_FOR_EACH_CHILD_BEGIN_R(widget, iter, i)
|
||||
if (!find && iter == prev_win) {
|
||||
find = TRUE;
|
||||
}
|
||||
if (find) {
|
||||
if (!widget_is_support_highlighter(iter)) {
|
||||
is_create = FALSE;
|
||||
if (widget_is_normal_window(iter)) {
|
||||
break;
|
||||
}
|
||||
curr_highlight = widget_get_prop_str(iter, WIDGET_PROP_HIGHLIGHT, NULL);
|
||||
if (curr_highlight != NULL && *curr_highlight != '\0') {
|
||||
widget_highlighter = iter;
|
||||
break;
|
||||
if (widget_is_support_highlighter(iter)) {
|
||||
curr_highlight = widget_get_prop_str(iter, WIDGET_PROP_HIGHLIGHT, NULL);
|
||||
if (curr_highlight != NULL && *curr_highlight != '\0') {
|
||||
widget_highlighter = iter;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
WIDGET_FOR_EACH_CHILD_END();
|
||||
if (is_create) {
|
||||
wm->curr_win = widget_highlighter;
|
||||
@ -1646,7 +1641,7 @@ static ret_t window_manager_default_post_init(widget_t* widget, wh_t w, wh_t h)
|
||||
|
||||
wm->lcd_w = w;
|
||||
wm->lcd_h = h;
|
||||
wm->native_window = window_manager_create_native_window(wm, widget);
|
||||
wm->native_window = window_manager_create_native_window(WINDOW_MANAGER(wm), widget);
|
||||
|
||||
if (native_window_get_info(wm->native_window, &info) == RET_OK) {
|
||||
w = info.w;
|
||||
|
Loading…
Reference in New Issue
Block a user