C06S:
authordxy15521469561 <1731678236@qq.com>
Thu, 19 Oct 2023 03:05:46 +0000 (11:05 +0800)
committerdxy15521469561 <1731678236@qq.com>
Thu, 19 Oct 2023 03:05:46 +0000 (11:05 +0800)
UI界面调整

34 files changed:
2.sdk/project/C06S/ext/static/IMAGE_NUMBER_KEY0_ICON.png
2.sdk/project/C06S/ext/static/IMAGE_NUMBER_KEY7_ICON.png
2.sdk/project/C06S/ext/static/IMAGE_NUMBER_KEY9_ICON.png
2.sdk/project/C06S/ext/static/IMAGE_NUMBER_KEYHASH_ICON.png [deleted file]
2.sdk/project/C06S/ext/static/IMAGE_NUMBER_KEYSTAR_ICON.png [deleted file]
2.sdk/project/C06S/ext/static/health/health_hr.png
2.sdk/project/C06S/ext/static/health/health_spo2.png
2.sdk/project/C06S/ext/static/health/health_temp.png
2.sdk/project/C06S/ext/static/health/health_text.png
2.sdk/project/C06S/ext/static/setting/menu_app_qrcode.png
2.sdk/project/C06S/ext/static/setting/menu_bright.png
2.sdk/project/C06S/ext/static/setting/menu_imei_qrcode.png
2.sdk/project/C06S/ext/static/setting/menu_language.png
2.sdk/project/C06S/ext/static/setting/menu_poweroff.png
2.sdk/project/C06S/ext/static/setting/menu_restore.png
2.sdk/project/C06S/ext/static/setting/menu_theme_switch.png
2.sdk/project/C06S/ext/static/setting/menu_upgrade.png
2.sdk/project/C06S/ext/static/setting/menu_version.png
2.sdk/project/C06S/ext/static/setting/menu_volume.png
2.sdk/project/C06S/ext/static/setting/menu_watch_switch.png
2.sdk/project/C06S/ext/static/setting/setting_text.png
2.sdk/project/C06S/ext/static/tool/IMAGE_SECMENU_ALARM.png
2.sdk/project/C06S/ext/static/tool/IMAGE_SECMENU_COUNTDOWN.png
2.sdk/project/C06S/ext/static/tool/IMAGE_SECMENU_STEP.png
2.sdk/project/C06S/ext/static/tool/IMAGE_SECMENU_STOPWATCH.png
2.sdk/project/C06S/ext/static/tool/IMAGE_SECMENU_WEATHER.png
2.sdk/project/C06S/ext/static/tool/sms_setting.png
2.sdk/project/C06S/ext/static/tool/tool_text.png
2.sdk/project/C06S/sdk/services/microPython/ports/quectel/core/lcd.py
2.sdk/project/C06S/sdk/services/microPython/ports/quectel/core/mgr.py
2.sdk/project/C06S/sdk/services/microPython/ports/quectel/core/ui.py
2.sdk/project/C06S/sdk/services/microPython/ports/quectel/core/ui_WatchFaceScreen.py
2.sdk/project/C06S/sdk/services/microPython/ports/quectel/core/ui_health.py
2.sdk/project/C06S/sdk/services/microPython/ports/quectel/core/ui_setting.py

index 15b6108..45cfc9f 100644 (file)
Binary files a/2.sdk/project/C06S/ext/static/IMAGE_NUMBER_KEY0_ICON.png and b/2.sdk/project/C06S/ext/static/IMAGE_NUMBER_KEY0_ICON.png differ
index 86893a4..1825ca4 100644 (file)
Binary files a/2.sdk/project/C06S/ext/static/IMAGE_NUMBER_KEY7_ICON.png and b/2.sdk/project/C06S/ext/static/IMAGE_NUMBER_KEY7_ICON.png differ
index 4bc6134..6ffad35 100644 (file)
Binary files a/2.sdk/project/C06S/ext/static/IMAGE_NUMBER_KEY9_ICON.png and b/2.sdk/project/C06S/ext/static/IMAGE_NUMBER_KEY9_ICON.png differ
diff --git a/2.sdk/project/C06S/ext/static/IMAGE_NUMBER_KEYHASH_ICON.png b/2.sdk/project/C06S/ext/static/IMAGE_NUMBER_KEYHASH_ICON.png
deleted file mode 100644 (file)
index b3803db..0000000
Binary files a/2.sdk/project/C06S/ext/static/IMAGE_NUMBER_KEYHASH_ICON.png and /dev/null differ
diff --git a/2.sdk/project/C06S/ext/static/IMAGE_NUMBER_KEYSTAR_ICON.png b/2.sdk/project/C06S/ext/static/IMAGE_NUMBER_KEYSTAR_ICON.png
deleted file mode 100644 (file)
index c3e133f..0000000
Binary files a/2.sdk/project/C06S/ext/static/IMAGE_NUMBER_KEYSTAR_ICON.png and /dev/null differ
index 7bc1428..2991b9e 100644 (file)
Binary files a/2.sdk/project/C06S/ext/static/health/health_hr.png and b/2.sdk/project/C06S/ext/static/health/health_hr.png differ
index 4898289..6ed64bd 100644 (file)
Binary files a/2.sdk/project/C06S/ext/static/health/health_spo2.png and b/2.sdk/project/C06S/ext/static/health/health_spo2.png differ
index a7f260b..c1753f4 100644 (file)
Binary files a/2.sdk/project/C06S/ext/static/health/health_temp.png and b/2.sdk/project/C06S/ext/static/health/health_temp.png differ
index 1b914a1..c036e34 100644 (file)
Binary files a/2.sdk/project/C06S/ext/static/health/health_text.png and b/2.sdk/project/C06S/ext/static/health/health_text.png differ
index 71c9215..9096384 100644 (file)
Binary files a/2.sdk/project/C06S/ext/static/setting/menu_app_qrcode.png and b/2.sdk/project/C06S/ext/static/setting/menu_app_qrcode.png differ
index c64fb44..38139bd 100644 (file)
Binary files a/2.sdk/project/C06S/ext/static/setting/menu_bright.png and b/2.sdk/project/C06S/ext/static/setting/menu_bright.png differ
index a564ba5..58ac59b 100644 (file)
Binary files a/2.sdk/project/C06S/ext/static/setting/menu_imei_qrcode.png and b/2.sdk/project/C06S/ext/static/setting/menu_imei_qrcode.png differ
index f6deb97..fe4a914 100644 (file)
Binary files a/2.sdk/project/C06S/ext/static/setting/menu_language.png and b/2.sdk/project/C06S/ext/static/setting/menu_language.png differ
index df5b92c..c29543f 100644 (file)
Binary files a/2.sdk/project/C06S/ext/static/setting/menu_poweroff.png and b/2.sdk/project/C06S/ext/static/setting/menu_poweroff.png differ
index 34c01a2..8e022fd 100644 (file)
Binary files a/2.sdk/project/C06S/ext/static/setting/menu_restore.png and b/2.sdk/project/C06S/ext/static/setting/menu_restore.png differ
index e57ae26..7118463 100644 (file)
Binary files a/2.sdk/project/C06S/ext/static/setting/menu_theme_switch.png and b/2.sdk/project/C06S/ext/static/setting/menu_theme_switch.png differ
index 83ee667..6265c24 100644 (file)
Binary files a/2.sdk/project/C06S/ext/static/setting/menu_upgrade.png and b/2.sdk/project/C06S/ext/static/setting/menu_upgrade.png differ
index f0bfd65..06275de 100644 (file)
Binary files a/2.sdk/project/C06S/ext/static/setting/menu_version.png and b/2.sdk/project/C06S/ext/static/setting/menu_version.png differ
index 200367c..5cd1b70 100644 (file)
Binary files a/2.sdk/project/C06S/ext/static/setting/menu_volume.png and b/2.sdk/project/C06S/ext/static/setting/menu_volume.png differ
index d1c21be..4ffd0d1 100644 (file)
Binary files a/2.sdk/project/C06S/ext/static/setting/menu_watch_switch.png and b/2.sdk/project/C06S/ext/static/setting/menu_watch_switch.png differ
index 2a03c47..6ff41e4 100644 (file)
Binary files a/2.sdk/project/C06S/ext/static/setting/setting_text.png and b/2.sdk/project/C06S/ext/static/setting/setting_text.png differ
index 3647cae..99906c4 100644 (file)
Binary files a/2.sdk/project/C06S/ext/static/tool/IMAGE_SECMENU_ALARM.png and b/2.sdk/project/C06S/ext/static/tool/IMAGE_SECMENU_ALARM.png differ
index c136bac..a1118ab 100644 (file)
Binary files a/2.sdk/project/C06S/ext/static/tool/IMAGE_SECMENU_COUNTDOWN.png and b/2.sdk/project/C06S/ext/static/tool/IMAGE_SECMENU_COUNTDOWN.png differ
index 9f0a6f3..42ddf28 100644 (file)
Binary files a/2.sdk/project/C06S/ext/static/tool/IMAGE_SECMENU_STEP.png and b/2.sdk/project/C06S/ext/static/tool/IMAGE_SECMENU_STEP.png differ
index ebde832..2f78419 100644 (file)
Binary files a/2.sdk/project/C06S/ext/static/tool/IMAGE_SECMENU_STOPWATCH.png and b/2.sdk/project/C06S/ext/static/tool/IMAGE_SECMENU_STOPWATCH.png differ
index 6e113c3..900b5ac 100644 (file)
Binary files a/2.sdk/project/C06S/ext/static/tool/IMAGE_SECMENU_WEATHER.png and b/2.sdk/project/C06S/ext/static/tool/IMAGE_SECMENU_WEATHER.png differ
index acdc5fc..a8d042c 100644 (file)
Binary files a/2.sdk/project/C06S/ext/static/tool/sms_setting.png and b/2.sdk/project/C06S/ext/static/tool/sms_setting.png differ
index cbed113..0db4913 100644 (file)
Binary files a/2.sdk/project/C06S/ext/static/tool/tool_text.png and b/2.sdk/project/C06S/ext/static/tool/tool_text.png differ
index ad4b916..dcf730d 100644 (file)
@@ -275,7 +275,7 @@ print("power_on_screen")
 power_on_screen.add_style(style_screen, lv.PART.MAIN | lv.STATE.DEFAULT)
 
 power_on_label = lv.label(power_on_screen)
-power_on_label.set_pos(0, 150)
+power_on_label.set_pos(0, (LCD_SIZE_H//2)-10)
 power_on_label.set_size(LCD_SIZE_W, 40)
 power_on_label.set_text("系统初始化中")
 power_on_label.set_style_text_align(lv.TEXT_ALIGN.CENTER, 0)
index d42031d..970e8b5 100644 (file)
@@ -603,14 +603,14 @@ def voice_callback(args):
             EventMesh.publish("set_interrup_incall",0)
             return
 
-        EventMesh.publish("set_interrup_incall",0)
-        EventMesh.publish("set_UI_high_priority",0)
+        # EventMesh.publish("set_interrup_incall",0)
+        # EventMesh.publish("set_UI_high_priority",0)
         
 
-        screen_NAME = EventMesh.publish("get_screen_NAME")
-        if screen_NAME != None:
-            if screen_NAME != "dialing_noplay_popup":
-                EventMesh.publish("load_screen", {"screen": "main_menu"})  
+        # screen_NAME = EventMesh.publish("get_screen_NAME")
+        # if screen_NAME != None:
+        #     if screen_NAME != "dialing_noplay_popup":
+        #         EventMesh.publish("load_screen", {"screen": "main_menu"})  
         
         EventMesh.publish("set_sos_info_call")  
         print('voicecall disconnect end')
@@ -2814,7 +2814,7 @@ class getBrightnessManager(Abstract):#获取亮度级别
     def add(self, event, msg):
         if self.level < 10:
             self.level = self.level + 2
-        self.PWM_backlight = PWM(PWM.PWM1, PWM.ABOVE_MS, self.level, 10)
+        self.PWM_backlight = PWM(PWM.PWM1, PWM.ABOVE_10US, self.level*100, 100)
         self.PWM_backlight.open()
         EventMesh.publish("set_storage_config", ["brightness_level",self.level])
 
@@ -2823,9 +2823,9 @@ class getBrightnessManager(Abstract):#获取亮度级别
         if self.level > 0:
             self.level = self.level - 2
         if self.level <= 0:
-            self.PWM_backlight = PWM(PWM.PWM1, PWM.ABOVE_MS, 1, 10)
+            self.PWM_backlight = PWM(PWM.PWM1, PWM.ABOVE_10US, 100, 1000)
         else:
-            self.PWM_backlight = PWM(PWM.PWM1, PWM.ABOVE_MS,self.level, 10)
+            self.PWM_backlight = PWM(PWM.PWM1, PWM.ABOVE_10US,self.level*100, 1000)
 
         self.PWM_backlight.open()
         EventMesh.publish("set_storage_config", ["brightness_level",self.level])
index ed84c4a..7983609 100644 (file)
@@ -23,6 +23,8 @@ from queue import Queue
 from machine import RTC
 import usys
 from lcd import LCD_SIZE_W,LCD_SIZE_H
+
+
 def audio_cb(event):
     if event == 0:
         EventMesh.publish("set_audio_state", 1)
@@ -116,6 +118,10 @@ style_font_28_black_bg_gray.set_text_color(lv.color_make(0x00, 0x00, 0x00))
 style_font_28_black_bg_gray.set_text_font_v2("font_28.bin",28,0)
 style_font_28_black_bg_gray.set_bg_color(lv.color_make(0xe1,0xdb,0xdb))
 
+style_font_youyuan_28 = lv.style_t()
+style_font_youyuan_28.init()
+style_font_youyuan_28.set_text_color(lv.color_make(0xFF, 0xFF, 0xFF))
+style_font_youyuan_28.set_text_font(lv.font_28_dial)
 #黑色
 style_black = lv.style_t()
 style_black.init()
@@ -323,138 +329,138 @@ class PhoneScreen(Screen):
 
             phone_line = lv.line(phone_screen)
             phone_line.set_points(phone_line_points,2)
-            phone_line.set_pos(235,8)
+            phone_line.set_pos(235,14)
             phone_line.set_size(2,40)
             phone_line.set_scrollbar_mode(lv.SCROLLBAR_MODE.OFF)
             phone_line.add_style(style_line,0)
 
             phone_label = lv.label(phone_screen)
-            phone_label.set_pos(0, 14)
+            phone_label.set_pos(0, 20)
             phone_label.set_size(0, 48)
             phone_label.set_text(" ")
-            phone_label.add_style(style_font_youyuan_40, lv.PART.MAIN | lv.STATE.DEFAULT)
+            phone_label.add_style(style_font_youyuan_20, lv.PART.MAIN | lv.STATE.DEFAULT)
             phone_label.set_long_mode(lv.label.LONG.CLIP)
             phone_label.set_style_text_align(lv.TEXT_ALIGN.RIGHT, 0)
 
-            phone_one = lv.img(phone_screen)
+            phone_one = lv.img(phone_screen)#1
             phone_one.set_src("E:/static/IMAGE_NUMBER_KEY1_ICON.png")
             phone_one.add_flag(lv.obj.FLAG.CLICKABLE)
             phone_one.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
             phone_one.set_pos(3, 60)
             phone_one.set_size(76, 50)
 
-            phone_two = lv.img(phone_screen)
+            phone_two = lv.img(phone_screen)#2
             phone_two.set_size(76, 50)
             phone_two.set_src("E:/static/IMAGE_NUMBER_KEY2_ICON.png")
             phone_two.add_flag(lv.obj.FLAG.CLICKABLE)
             phone_two.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
             phone_two.set_pos(82, 60)
 
-            phone_three = lv.img(phone_screen)
+            phone_three = lv.img(phone_screen)#3
             phone_three.set_size(76, 50)
             phone_three.set_src("E:/static/IMAGE_NUMBER_KEY3_ICON.png")
             phone_three.add_flag(lv.obj.FLAG.CLICKABLE)
             phone_three.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
             phone_three.set_pos(161, 60)
 
-            phone_four = lv.img(phone_screen)
+            phone_four = lv.img(phone_screen)#4
             phone_four.set_size(76, 50)
             phone_four.set_src("E:/static/IMAGE_NUMBER_KEY4_ICON.png")
             phone_four.add_flag(lv.obj.FLAG.CLICKABLE)
             phone_four.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
             phone_four.set_pos(3, 112)
 
-            phone_five = lv.img(phone_screen)
+            phone_five = lv.img(phone_screen)#5
             phone_five.set_size(76, 50)
             phone_five.set_src("E:/static/IMAGE_NUMBER_KEY5_ICON.png")
             phone_five.add_flag(lv.obj.FLAG.CLICKABLE)
             phone_five.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
             phone_five.set_pos(82, 112)
 
-            phone_six = lv.img(phone_screen)
+            phone_six = lv.img(phone_screen)#6
             phone_six.set_size(76, 50)
             phone_six.set_src("E:/static/IMAGE_NUMBER_KEY6_ICON.png")
             phone_six.add_flag(lv.obj.FLAG.CLICKABLE)
             phone_six.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
             phone_six.set_pos(161, 112)
 
-            phone_seven = lv.img(phone_screen)
+            phone_seven = lv.img(phone_screen)#7
             phone_seven.set_size(76, 50)
             phone_seven.set_src("E:/static/IMAGE_NUMBER_KEY7_ICON.png")
             phone_seven.add_flag(lv.obj.FLAG.CLICKABLE)
             phone_seven.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
             phone_seven.set_pos(3, 164)
 
-            phone_eight = lv.img(phone_screen)
+            phone_eight = lv.img(phone_screen)#8
             phone_eight.set_size(76, 50)
             phone_eight.set_src("E:/static/IMAGE_NUMBER_KEY8_ICON.png")
             phone_eight.add_flag(lv.obj.FLAG.CLICKABLE)
             phone_eight.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
             phone_eight.set_pos(82, 164)
 
-            phone_nine = lv.img(phone_screen)
+            phone_nine = lv.img(phone_screen)#9
             phone_nine.set_size(76, 50)
             phone_nine.set_src("E:/static/IMAGE_NUMBER_KEY9_ICON.png")
             phone_nine.add_flag(lv.obj.FLAG.CLICKABLE)
             phone_nine.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
             phone_nine.set_pos(161, 164)
 
-            phone_start = lv.img(phone_screen)
-            phone_start.set_size(76, 50)
-            phone_start.set_src("E:/static/IMAGE_NUMBER_KEYSTAR_ICON.png")
-            phone_start.add_flag(lv.obj.FLAG.CLICKABLE)
-            phone_start.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
-            phone_start.set_pos(3, 216)
+            phone_call = lv.img(phone_screen)#拨号
+            phone_call.set_size(76, 50)
+            phone_call.set_src("E:/static/IMAGE_BUTTON_DIAL.png")
+            phone_call.add_flag(lv.obj.FLAG.CLICKABLE)
+            phone_call.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
+            phone_call.set_pos(3, 216)
 
-            phone_zero = lv.img(phone_screen)
+            phone_zero = lv.img(phone_screen)#0
             phone_zero.set_size(76, 50)
             phone_zero.set_src("E:/static/IMAGE_NUMBER_KEY0_ICON.png")
             phone_zero.add_flag(lv.obj.FLAG.CLICKABLE)
             phone_zero.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
             phone_zero.set_pos(82, 216)
 
-            phone_hash = lv.img(phone_screen)
-            phone_hash.set_size(76, 50)
-            phone_hash.set_src("E:/static/IMAGE_NUMBER_KEYHASH_ICON.png")
-            phone_hash.add_flag(lv.obj.FLAG.CLICKABLE)
-            phone_hash.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
-            phone_hash.set_pos(161, 216)
-
-            phone_call = lv.img(phone_screen)
-            phone_call.set_size(76, 50)
-            phone_call.set_src("E:/static/IMAGE_BUTTON_DIAL.png")
-            phone_call.add_flag(lv.obj.FLAG.CLICKABLE)
-            phone_call.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
-            phone_call.set_pos(3, 270)
-
-            phone_call_btn = lv.img(phone_screen)
-            phone_call_btn.set_size(76, 52)
-            phone_call_btn.add_flag(lv.obj.FLAG.CLICKABLE)
-            phone_call_btn.set_pos(3, 268)
-
-            phone_contact = lv.img(phone_screen)
-            phone_contact.set_size(64, 50)
-            phone_contact.set_src("E:/static/IMAGE_BUTTON_DIAL_CONTACT.png")
-            phone_contact.add_flag(lv.obj.FLAG.CLICKABLE)
-            phone_contact.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
-            phone_contact.set_pos(87, 270)
-
-            phone_contact_btn = lv.img(phone_screen)
-            phone_contact_btn.set_size(76, 52)
-            phone_contact_btn.add_flag(lv.obj.FLAG.CLICKABLE)
-            phone_contact_btn.set_pos(87, 268)
-
-            phone_delete = lv.img(phone_screen)
+            phone_delete = lv.img(phone_screen)#删除
             phone_delete.set_size(76, 50)
             phone_delete.set_src("E:/static/IMAGE_BUTTON_DELKEY.png")
             phone_delete.add_flag(lv.obj.FLAG.CLICKABLE)
             phone_delete.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
-            phone_delete.set_pos(161, 270)
+            phone_delete.set_pos(161, 216)
+
+            # phone_call = lv.img(phone_screen)
+            # phone_call.set_size(76, 50)
+            # phone_call.set_src("E:/static/IMAGE_BUTTON_DIAL.png")
+            # phone_call.add_flag(lv.obj.FLAG.CLICKABLE)
+            # phone_call.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
+            # phone_call.set_pos(3, 270)
+
+            phone_call_btn = lv.img(phone_screen)
+            phone_call_btn.set_size(76, 68)
+            phone_call_btn.add_flag(lv.obj.FLAG.CLICKABLE)
+            phone_call_btn.set_pos(3, 216)
+
+            # phone_contact = lv.img(phone_screen)
+            # phone_contact.set_size(64, 50)
+            # phone_contact.set_src("E:/static/IMAGE_BUTTON_DIAL_CONTACT.png")
+            # phone_contact.add_flag(lv.obj.FLAG.CLICKABLE)
+            # phone_contact.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
+            # phone_contact.set_pos(87, 270)
+
+            # phone_contact_btn = lv.img(phone_screen)
+            # phone_contact_btn.set_size(76, 52)
+            # phone_contact_btn.add_flag(lv.obj.FLAG.CLICKABLE)
+            # phone_contact_btn.set_pos(87, 268)
+
+            # phone_delete = lv.img(phone_screen)
+            # phone_delete.set_size(76, 50)
+            # phone_delete.set_src("E:/static/IMAGE_BUTTON_DELKEY.png")
+            # phone_delete.add_flag(lv.obj.FLAG.CLICKABLE)
+            # phone_delete.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
+            # phone_delete.set_pos(161, 216)
 
             phone_delete_btn = lv.img(phone_screen)
-            phone_delete_btn.set_size(76, 52)
+            phone_delete_btn.set_size(76, 68)
             phone_delete_btn.add_flag(lv.obj.FLAG.CLICKABLE)
-            phone_delete_btn.set_pos(161, 268)
+            phone_delete_btn.set_pos(161, 216)
 
             self.meta = phone_screen
 
@@ -472,39 +478,47 @@ class PhoneScreen(Screen):
                                         lv.EVENT.CLICKED, None)
             phone_seven.add_event_cb(lambda e: EventMesh.callback_wrapper(self.seven(e)),
                                         lv.EVENT.CLICKED, None)
+            phone_seven.add_event_cb(lambda e: EventMesh.callback_wrapper(self.seven(e)),
+                                        lv.EVENT.LONG_PRESSED, None)
+            
             phone_eight.add_event_cb(lambda e: EventMesh.callback_wrapper(self.eight(e)),
                                         lv.EVENT.CLICKED, None)
             phone_nine.add_event_cb(lambda e: EventMesh.callback_wrapper(self.nine(e)),
                                         lv.EVENT.CLICKED, None)
+            phone_nine.add_event_cb(lambda e: EventMesh.callback_wrapper(self.nine(e)),
+                                        lv.EVENT.LONG_PRESSED, None)
+            
             phone_zero.add_event_cb(lambda e: EventMesh.callback_wrapper(self.zero(e)),
                                         lv.EVENT.CLICKED, None)
+            phone_zero.add_event_cb(lambda e: EventMesh.callback_wrapper(self.zero(e)),
+                                        lv.EVENT.LONG_PRESSED, None)
 
             phone_call_btn.add_event_cb(lambda e: EventMesh.callback_wrapper(self.call(e)),
                                         lv.EVENT.CLICKED, None)
-            phone_contact_btn.add_event_cb(lambda e: EventMesh.callback_wrapper(self.contact(e)),
-                                        lv.EVENT.CLICKED, None)
+            # # phone_contact_btn.add_event_cb(lambda e: EventMesh.callback_wrapper(self.contact(e)),
+            #                             lv.EVENT.CLICKED, None)
             phone_delete_btn.add_event_cb(lambda e: EventMesh.callback_wrapper(self.delete(e)),
                                         lv.EVENT.CLICKED, None)
             
-            phone_start.add_event_cb(lambda e: EventMesh.callback_wrapper(self.start(e)),
-                                        lv.EVENT.CLICKED, None)#短按显示* 
+            # # phone_start.add_event_cb(lambda e: EventMesh.callback_wrapper(self.start(e)),
+            #                             lv.EVENT.CLICKED, None)#短按显示* 
             
-            phone_start.add_event_cb(lambda e: EventMesh.callback_wrapper(self.pressed_start(e)),
-                                        lv.EVENT.LONG_PRESSED, None)#长按显示+
+            # phone_start.add_event_cb(lambda e: EventMesh.callback_wrapper(self.pressed_start(e)),
+            #                             lv.EVENT.LONG_PRESSED, None)#长按显示+
             
-            phone_start.add_event_cb(lambda e: EventMesh.callback_wrapper(self.endpressed_start(e)),
-                                        lv.EVENT.RELEASED, None)#释放按键
+            # phone_start.add_event_cb(lambda e: EventMesh.callback_wrapper(self.endpressed_start(e)),
+                                        # lv.EVENT.RELEASED, None)#释放按键
             
 
-            phone_hash.add_event_cb(lambda e: EventMesh.callback_wrapper(self.hash(e)),
-                                        lv.EVENT.CLICKED, None)
+            # phone_hash.add_event_cb(lambda e: EventMesh.callback_wrapper(self.hash(e)),
+            #                             lv.EVENT.CLICKED, None)
             
 
         self.phone_num=''
         self.phone_list = []
         self.count = 0
         if phone_label != None:
-            phone_label.set_pos(0, 14)
+            phone_label.set_pos(0, 20)
             phone_label.set_size(0, 0)
             phone_label.set_text(" ")
         #phone_label.set_text(" ")
@@ -691,7 +705,7 @@ class PhoneScreen(Screen):
         if len_t > 230:
             len_t = 230
         phone_label.set_size(len_t,48)
-        phone_label.set_pos(230-len_t,14)
+        phone_label.set_pos(230-len_t,20)
         phone_label.set_text(self.phone_num)
     
     def lcd_on(self):
@@ -721,6 +735,8 @@ call_log_title  = None
 none_call_log_title  = None
 call_log_cont_list_screen = None
 CALLLOG_FLAG = 0
+CALL_LOG_LIST_SIZE = 80
+CALL_LOG_LIST_LABEL = 28
 class CallLogScreen(Screen):
     NAME = "call_log"
 
@@ -734,6 +750,7 @@ class CallLogScreen(Screen):
         self.call_log_detail_list = None
         self.call_log_detail_list_dict = []
         self.timer = osTimer()
+        self.is_sliding = 0
         EventMesh.subscribe("call_log_update_show_list", self.call_log_update_show_list)
 
     def post_processor_before_initialization(self):
@@ -756,6 +773,7 @@ class CallLogScreen(Screen):
        self.btn_create()
 
     def initialization(self):
+        self.is_sliding = 0
         global call_log_screen,contacts_cont_list ,call_log_title ,none_call_log_title ,call_log_cont_list_screen
         if call_log_screen  == None:
             call_log_screen = lv.obj()
@@ -765,7 +783,7 @@ class CallLogScreen(Screen):
 
             call_log_cont_list_screen = lv.obj(call_log_screen)
             call_log_cont_list_screen.set_pos(0, 50)
-            call_log_cont_list_screen.set_size(LCD_SIZE_W, 270)
+            call_log_cont_list_screen.set_size(LCD_SIZE_W, LCD_SIZE_H-50)
             call_log_cont_list_screen.set_scrollbar_mode(lv.SCROLLBAR_MODE.OFF)
             call_log_cont_list_screen.add_style(style_screen, lv.PART.MAIN | lv.STATE.DEFAULT)
 
@@ -788,7 +806,7 @@ class CallLogScreen(Screen):
             #self.call_log_detail_list = lv.obj(call_log_screen)
             self.call_log_detail_list = lv.obj(call_log_cont_list_screen)
             self.call_log_detail_list.set_pos(0, 0)
-            self.call_log_detail_list.set_size(LCD_SIZE_W, 271)
+            self.call_log_detail_list.set_size(LCD_SIZE_W, LCD_SIZE_H-50+1)
             self.call_log_detail_list.set_scrollbar_mode(lv.SCROLLBAR_MODE.OFF)
             self.call_log_detail_list.add_style(style_screen, lv.PART.MAIN | lv.STATE.DEFAULT)
             for i in range(self.CALL_LOG_MAX):
@@ -796,6 +814,8 @@ class CallLogScreen(Screen):
                 _btn.add_flag(lv.obj.FLAG.CLICKABLE)
                 _btn.add_event_cb(lambda e: EventMesh.callback_wrapper(self.calling(e)),
                                         lv.EVENT.CLICKED, None)
+                _btn.add_event_cb(lambda e: EventMesh.callback_wrapper(self.calling(e)),
+                                        lv.EVENT.PRESSING, None)
                 _btn.add_flag(lv.obj.FLAG.HIDDEN)
                 _btn_label2 = lv.label(_btn)
                 _btn_label3 = lv.label(_btn)
@@ -829,30 +849,31 @@ class CallLogScreen(Screen):
         global call_log_screen,contacts_cont_list ,call_log_title ,none_call_log_title ,call_log_cont_list_screen
         h = 0
         if call_log_screen != None:
-            if self.check_json == True and len(self.read_call_log) != 0:
+            self.check_json = True
+            if self.check_json == True:
+            # if self.check_json == True and len(self.read_call_log) != 0:
                 
                 none_call_log_title.set_text(" ")
-
-                # self.call_log_detail_list.delete()#先删除一次控件
-                # self.call_log_detail_list = lv.obj(call_log_cont_list_screen)
-                # self.call_log_detail_list.set_pos(0, 0)
-                # self.call_log_detail_list.set_size(LCD_SIZE_W, 271)
-                # self.call_log_detail_list.set_scrollbar_mode(lv.SCROLLBAR_MODE.OFF)
-                # self.call_log_detail_list.add_style(style_screen, lv.PART.MAIN | lv.STATE.DEFAULT)
-                sort_tmp = self.read_call_log.values()
-                sort_new = sorted(sort_tmp, key = lambda i: i['timesec'],reverse = True)#按照时间戳进行排序 去掉最旧的一次数据如果满了五十条
+                # sort_tmp = self.read_call_log.values()
+                # sort_new = sorted(sort_tmp, key = lambda i: i['timesec'],reverse = True)#按照时间戳进行排序 去掉最旧的一次数据如果满了五十条
                 # print("self.call_log :{} \r\n sort_new:{}\r\n".format(self.read_call_log,sort_new))
                 self.call_log_detail_list.clear_flag(lv.obj.FLAG.HIDDEN)#隐藏空文本
-                for sort_new_tmp in sort_new: #字典 key value
-                    num_count = sort_new_tmp["count"]#获取通话次数
-                    num_name = sort_new_tmp["name"]#获取名称
-                    num_phonnum = sort_new_tmp["number"]#获取电话号码
-                    num_time = sort_new_tmp["time"]#获取电话号码
+                for i in range(6): #字典 key value
+                # for sort_new_tmp in sort_new: #字典 key value
+                    # num_count = sort_new_tmp["count"]#获取通话次数
+                    # num_name = sort_new_tmp["name"]#获取名称
+                    # num_phonnum = sort_new_tmp["number"]#获取电话号码
+                    # num_time = sort_new_tmp["time"]#获取电话号码
+
+                    num_count = "6"#获取通话次数
+                    num_name = "邓雪英hi的话提高速度速度速度速"#获取名称
+                    num_phonnum = "129392849839483948038"#获取电话号码
+                    num_time = "time"#
 
                     # print("num_count :{} num_name:{} num_time:{}".format(num_count,num_name,num_time))
                     #_btn = lv.btn(self.call_log_detail_list)
-                    self.call_log_detail_list_dict[h]["_btn"].set_size(LCD_SIZE_W,80)
-                    self.call_log_detail_list_dict[h]["_btn"].set_pos(0,82*h)
+                    self.call_log_detail_list_dict[h]["_btn"].set_size(LCD_SIZE_W-10,CALL_LOG_LIST_SIZE)
+                    self.call_log_detail_list_dict[h]["_btn"].set_pos(0,(CALL_LOG_LIST_SIZE+4)*h)
                     #self.call_log_detail_list_dict[h]["_btn"].add_style(style_contact_btn, lv.PART.MAIN | lv.STATE.DEFAULT)
                     self.call_log_detail_list_dict[h]["_btn"].add_event_cb(lambda e: EventMesh.callback_wrapper(self.calling(e)),
                                             lv.EVENT.CLICKED, None)
@@ -860,7 +881,7 @@ class CallLogScreen(Screen):
 
                     #_btn_label2 = lv.label(_btn)
                     self.call_log_detail_list_dict[h]["_btn_label2"].set_pos(0, 5)
-                    self.call_log_detail_list_dict[h]["_btn_label2"].set_size(0, 25)
+                    self.call_log_detail_list_dict[h]["_btn_label2"].set_size(0, CALL_LOG_LIST_LABEL)
                     self.call_log_detail_list_dict[h]["_btn_label2"].set_text(num_phonnum)
                     #_btn_label2.add_style(style_font_youyuan_20_black, lv.PART.MAIN | lv.STATE.DEFAULT)
                     #
@@ -871,8 +892,8 @@ class CallLogScreen(Screen):
                     # _btn_label3.add_style(style_font_youyuan_20_black, lv.PART.MAIN | lv.STATE.DEFAULT)
 
                     #_btn_label4 = lv.label(_btn)
-                    self.call_log_detail_list_dict[h]["_btn_label4"].set_pos(0, 38)
-                    self.call_log_detail_list_dict[h]["_btn_label4"].set_size(230, 30)
+                    self.call_log_detail_list_dict[h]["_btn_label4"].set_pos(0, 45)
+                    self.call_log_detail_list_dict[h]["_btn_label4"].set_size(LCD_SIZE_W-10, CALL_LOG_LIST_LABEL)
                     self.call_log_detail_list_dict[h]["_btn_label4"].set_long_mode(lv.label.LONG.CLIP)
                     self.call_log_detail_list_dict[h]["_btn_label4"].set_text(num_phonnum)
                     #self.call_log_detail_list_dict[h]["_btn_label4"].add_style(style_font_youyuan_20_black, lv.PART.MAIN | lv.STATE.DEFAULT)
@@ -886,7 +907,7 @@ class CallLogScreen(Screen):
 
                     #_btn_label6 = lv.label(_btn)
                     self.call_log_detail_list_dict[h]["_btn_label6"].set_pos(0, 5)
-                    self.call_log_detail_list_dict[h]["_btn_label6"].set_size(230, 28)
+                    self.call_log_detail_list_dict[h]["_btn_label6"].set_size(LCD_SIZE_W-10, CALL_LOG_LIST_LABEL)
                     self.call_log_detail_list_dict[h]["_btn_label6"].set_long_mode(lv.label.LONG.CLIP)
                     self.call_log_detail_list_dict[h]["_btn_label6"].set_text(num_name)
                     #self.call_log_detail_list_dict[h]["_btn_label6"].add_style(style_font_youyuan_20_black, lv.PART.MAIN | lv.STATE.DEFAULT)
@@ -904,61 +925,67 @@ class CallLogScreen(Screen):
         
     def calling(self,e):
         code = e.get_code()
-        if code == lv.EVENT.CLICKED:
+        if code == lv.EVENT.PRESSING:
+            #print("PRESSING")
+            self.is_sliding += 1
+
+        elif  code == lv.EVENT.CLICKED:
             global call_log_screen,contacts_cont_list ,call_log_title ,none_call_log_title 
-            # print("e.get_text():{} {}".format(e.get_target().get_child(0).get_text(),e.get_target().get_child(3).get_text()))
-            phonnum = str(e.get_target().get_child(0).get_text())
-            phnoname = e.get_target().get_child(3).get_text()
-            # print("phonnum :{} _msg:{}".format(phonnum,phnoname))
+            if self.is_sliding <= 5 and self.is_sliding != 0:#如果是在滑动中则不需要点击事件
+                self.is_sliding = 0
+                # print("e.get_text():{} {}".format(e.get_target().get_child(0).get_text(),e.get_target().get_child(3).get_text()))
+                phonnum = str(e.get_target().get_child(0).get_text())
+                phnoname = e.get_target().get_child(3).get_text()
+                # print("phonnum :{} _msg:{}".format(phonnum,phnoname))
+                
             
-           
-            self.name = None
-            self.phonebook = {}
+                self.name = None
+                self.phonebook = {}
 
-            self.call_log = {}
-            self.call_log_value = {}
-            self.read_call_log = {}
-            self.number_tmp = {}
+                self.call_log = {}
+                self.call_log_value = {}
+                self.read_call_log = {}
+                self.number_tmp = {}
 
-            data = EventMesh.publish("get_phonebook_list")
-            if data != None:
-                check = data[0]
-                self.phonebook = data[1]
-                # print("check :{}".format(check))
-                if check == 1:#检查通讯录
-                    phonebook_keys = sorted(self.phonebook.keys())
-                    b = str(phonnum) in self.phonebook.values()#查找key中是否包含content电话号码 True 包含在里面 False不包含在里面
-                    j = 0
-                    if b == True:
-                        for i in range(len(self.phonebook)): #字典 key value
-                            #'001:':15521469561
-                            name = self.phonebook[phonebook_keys[j]]
-                            name_value = phonebook_keys[j]
-                            number_tmp = str(phonnum)
-                            # print("name :{} number_tmp:{}".format(name,number_tmp))
-                            if name.find(number_tmp) != -1:#查找电话号码是否在通讯录里面
-                                number_f= name_value
-                                name_s = number_f.split(':')
-                                name_s = name_s[1]
-                                self.name = name_s
-                                break
-                            j+=1
+                data = EventMesh.publish("get_phonebook_list")
+                if data != None:
+                    check = data[0]
+                    self.phonebook = data[1]
+                    # print("check :{}".format(check))
+                    if check == 1:#检查通讯录
+                        phonebook_keys = sorted(self.phonebook.keys())
+                        b = str(phonnum) in self.phonebook.values()#查找key中是否包含content电话号码 True 包含在里面 False不包含在里面
+                        j = 0
+                        if b == True:
+                            for i in range(len(self.phonebook)): #字典 key value
+                                #'001:':15521469561
+                                name = self.phonebook[phonebook_keys[j]]
+                                name_value = phonebook_keys[j]
+                                number_tmp = str(phonnum)
+                                # print("name :{} number_tmp:{}".format(name,number_tmp))
+                                if name.find(number_tmp) != -1:#查找电话号码是否在通讯录里面
+                                    number_f= name_value
+                                    name_s = number_f.split(':')
+                                    name_s = name_s[1]
+                                    self.name = name_s
+                                    break
+                                j+=1
+                        else:
+                            self.name = phnoname
                     else:
                         self.name = phnoname
-                else:
-                    self.name = phnoname
-
-            if self.name == None:
-                self.name = phnoname
-            if len(phonnum) > 0:
-                EventMesh.publish("save_phonename",self.name)#
-                EventMesh.publish("save_phonenum",phonnum)#保存电话号码用于界面显示获取
-                #voiceCall.callStart(str(phonnum))
-                EventMesh.publish("load_screen", {"screen": "dialing_noplay_popup"})
-            else:
-                EventMesh.publish("load_screen", {"screen": "no_valied_num_screen"})#无效的号码 请重新输入
 
+                if self.name == None:
+                    self.name = phnoname
+                if len(phonnum) > 0:
+                    EventMesh.publish("save_phonename",self.name)#
+                    EventMesh.publish("save_phonenum",phonnum)#保存电话号码用于界面显示获取
+                    #voiceCall.callStart(str(phonnum))
+                    EventMesh.publish("load_screen", {"screen": "dialing_noplay_popup"})
+                else:
+                    EventMesh.publish("load_screen", {"screen": "no_valied_num_screen"})#无效的号码 请重新输入
 
+            self.is_sliding = 0
     def done_return(self):
         EventMesh.publish("load_screen", {"screen": "main_menu"})
 
@@ -1003,14 +1030,14 @@ class DialingScreen(Screen):
             dialing_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
 
             dialing_name = lv.label(dialing_screen)
-            dialing_name.set_pos(0, 120)
+            dialing_name.set_pos(0, 110)
             dialing_name.set_size(LCD_SIZE_W, 50)
             dialing_name.set_text(" ")
             dialing_name.set_style_text_align(lv.TEXT_ALIGN.CENTER, 0)
             dialing_name.add_style(style_font_youyuan_20, lv.PART.MAIN | lv.STATE.DEFAULT)
 
             dialing_call_label = lv.label(dialing_screen)
-            dialing_call_label.set_pos(0, 174)
+            dialing_call_label.set_pos(0, 170)
             dialing_call_label.set_size(LCD_SIZE_W, 50)
             dialing_call_label.set_text("正在等待对方接\n听电话")
             dialing_call_label.set_style_text_align(lv.TEXT_ALIGN.CENTER, 0)
@@ -1021,7 +1048,7 @@ class DialingScreen(Screen):
             hangup_imgbtn.set_src("E:/static/hang_up.png")
             hangup_imgbtn.add_flag(lv.obj.FLAG.CLICKABLE)
             hangup_imgbtn.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
-            hangup_imgbtn.set_pos(80, 250)
+            hangup_imgbtn.set_pos(80, 210)
             hangup_imgbtn.add_event_cb(lambda e: EventMesh.callback_wrapper(self.hangup(e)),
                                     lv.EVENT.CLICKED, None)
             self.meta = dialing_screen
@@ -1037,7 +1064,14 @@ class DialingScreen(Screen):
         EventMesh.publish("set_UI_high_priority", 0)
         EventMesh.publish("set_hangup_mode", 1)
         voiceCall.callEnd()
-        self.timer.start(5000,0,self.call_end)
+        EventMesh.publish("set_interrup_incall",0)
+        EventMesh.publish("set_UI_high_priority",0)
+        
+
+        screen_NAME = EventMesh.publish("get_screen_NAME")
+        if screen_NAME != None:
+            if screen_NAME != "dialing_noplay_popup":
+                EventMesh.publish("load_screen", {"screen": "main_menu"})  
 
     def Close(self):
         self.timer.stop()
@@ -1444,14 +1478,14 @@ class DialingNoPlayPopupScreen(Screen):#正在拨号中...未打出
             dialing_popup_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
 
             dialing_popup_name = lv.label(dialing_popup_screen)
-            dialing_popup_name.set_pos(0, 120)
+            dialing_popup_name.set_pos(0, 110)
             dialing_popup_name.set_size(LCD_SIZE_W, 50)
             dialing_popup_name.set_text(" ")
             dialing_popup_name.set_style_text_align(lv.TEXT_ALIGN.CENTER, 0)
             dialing_popup_name.add_style(style_font_youyuan_20, lv.PART.MAIN | lv.STATE.DEFAULT)
 
             dialing_popup_call = lv.label(dialing_popup_screen)
-            dialing_popup_call.set_pos(0, 180)
+            dialing_popup_call.set_pos(0, 170)
             dialing_popup_call.set_size(LCD_SIZE_W, 50)
             dialing_popup_call.set_text("正在拨号中")
             dialing_popup_call.set_style_text_align(lv.TEXT_ALIGN.CENTER, 0)
@@ -1462,7 +1496,7 @@ class DialingNoPlayPopupScreen(Screen):#正在拨号中...未打出
             dialing_popup_hangup_imgbtn.set_src("E:/static/hang_up.png")
             dialing_popup_hangup_imgbtn.add_flag(lv.obj.FLAG.CLICKABLE)
             dialing_popup_hangup_imgbtn.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
-            dialing_popup_hangup_imgbtn.set_pos(80, 250)
+            dialing_popup_hangup_imgbtn.set_pos(80, 210)
             dialing_popup_hangup_imgbtn.add_event_cb(lambda e: EventMesh.callback_wrapper(self.hangup(e)),
                                     lv.EVENT.CLICKED, None)
             self.meta = dialing_popup_screen
@@ -1542,8 +1576,8 @@ class DialingNoPlayPopupScreen(Screen):#正在拨号中...未打出
             self.time_count = 0
             EventMesh.publish("set_UI_high_priority", 0)
             EventMesh.publish("set_sos_info_call") 
-
-            EventMesh.publish("load_screen", {"screen": "dial_no_connect_popup"})
+            EventMesh.publish("load_screen", {"screen": "dialing"})
+            # EventMesh.publish("load_screen", {"screen": "dial_no_connect_popup"})
 
     def hangup(self,e):
         EventMesh.publish("set_UI_high_priority", 0)
@@ -1553,7 +1587,10 @@ class DialingNoPlayPopupScreen(Screen):#正在拨号中...未打出
             EventMesh.publish("set_sos_flag",0)
             EventMesh.publish("set_sos_num",0)
             EventMesh.publish("set_hangup_mode",0)
-        EventMesh.publish("return_prev_screen") #返回上一级
+        EventMesh.publish("set_interrup_incall",0)
+        EventMesh.publish("set_UI_high_priority",0)
+
+        EventMesh.publish("load_screen", {"screen": "main_menu"})  
 
     def Close(self):
         self.timer1.stop()
@@ -1941,8 +1978,8 @@ msg_list_t = None
 msg_list_t_done_img = None
 no_msg_text = None
 msg_cont_list_screen = None
-SMS_LIST_ONE_ICON = 65
-SMS_LIST_ONE_LABEL_SIZE = 28
+SMS_LIST_ONE_ICON = 70#短信每一项的列表高度
+SMS_LIST_ONE_LABEL_SIZE = 28#文本大小
 class PopupScreen(Screen):
     NAME = "popup"
 
@@ -1999,7 +2036,7 @@ class PopupScreen(Screen):
             msg_list_t_done_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
 
             no_msg_text = lv.label(msg_cont_list_screen)
-            no_msg_text.set_pos(0, 210)
+            no_msg_text.set_pos(0, 180)
             no_msg_text.set_size(LCD_SIZE_W, 40)
             no_msg_text.set_text("暂无信息")
             no_msg_text.set_long_mode(lv.label.LONG.WRAP)
@@ -2153,7 +2190,6 @@ class PopupScreen(Screen):
         count = 0
         j = 0
         print("self.msg_nums:{}".format(self.msg_nums))
-        self.msg_nums = 10
         if self.msg_nums > 0 :
             
 
@@ -2162,102 +2198,102 @@ class PopupScreen(Screen):
                 msg_list_t_done_img.clear_flag(lv.obj.FLAG.HIDDEN)
                 no_msg_text.clear_flag(lv.obj.FLAG.HIDDEN)
                 no_msg_text.set_text("正在加载···")
-            # if self.sms_detail_list != None:
-            #     self.sms_detail_list.add_flag(lv.obj.FLAG.HIDDEN)
-            # SMS_lis={}
-            # SMS_lis_count = 0
-            # #self.sms_data = [] #短信数组
-            # if self.sms_data == [] :
-            #     for i in range(self.msg_nums):
-            #         EventMesh.publish("system_sleep_rest")#防止黑屏
-            #         message=self.sms_get_message_info(self.msg_nums-i-1)
-            #         if message == -1:
-            #             break
-            #         #print("self.msg_nums:{} message:{} {} {}".format(self.msg_nums-i-1,message[0],message[1],message[2]))
-            #         #message:[253, 3, 1, 100, 140, '751F4EA776EE524D6D4']
-            #         if message[1]>1 :#长短信
-            #             if message[0] in SMS_lis:#存在列表
-            #                 SMS_lis[message[0]].append(message)
-
-            #             else :#列表是新的
-            #                 SMS_lis[message[0]] = [message]#新增列表
-            #                 #print("SMS_lis:{}".format(SMS_lis))
-            #                 #SMS_lis[message[0]].append(message)#新增列表数据
-            #             if len(SMS_lis[message[0]]) == message[1]:#存满一条
-            #                 SMS_lis_tmp = SMS_lis[message[0]]
-            #                 data = ""
-            #                 message_pdu = []
-            #                 for k in range(len(SMS_lis_tmp)):
-            #                     for j in range(len(SMS_lis_tmp)): #排序
-            #                         if SMS_lis_tmp[j][2] == k+1:
-            #                             message_pdu = sms.decodePdu(SMS_lis_tmp[j][5],20)
-            #                             if(message_pdu!=-1):
-            #                                 data += message_pdu[1]
-            #                             break
-            #                 #print("data:{}".format(data))
-            #                 data_tmp = []
-            #                 data_tmp.append(message_pdu[0])
-            #                 data_tmp.append(data)
-            #                 self.sms_data.append(data_tmp)
-            #                 SMS_lis_count += 1
-            #                 if(SMS_lis_count >= MSG_MAX):
-            #                     break
-            #         else :
-            #             SMS_lis_count += 1
-            #             message_pdu = sms.decodePdu(message[5],20)
-            #             data = message_pdu[1]
-            #             data_tmp = []
-            #             data_tmp.append(message_pdu[0])
-            #             data_tmp.append(data)
-            #             self.sms_data.append(data_tmp)
-            #             print("data:{}".format(data))
-            #             if(SMS_lis_count >= MSG_MAX):
-            #                 break
+            if self.sms_detail_list != None:
+                self.sms_detail_list.add_flag(lv.obj.FLAG.HIDDEN)
+            SMS_lis={}
+            SMS_lis_count = 0
+            #self.sms_data = [] #短信数组
+            if self.sms_data == [] :
+                for i in range(self.msg_nums):
+                    EventMesh.publish("system_sleep_rest")#防止黑屏
+                    message=self.sms_get_message_info(self.msg_nums-i-1)
+                    if message == -1:
+                        break
+                    #print("self.msg_nums:{} message:{} {} {}".format(self.msg_nums-i-1,message[0],message[1],message[2]))
+                    #message:[253, 3, 1, 100, 140, '751F4EA776EE524D6D4']
+                    if message[1]>1 :#长短信
+                        if message[0] in SMS_lis:#存在列表
+                            SMS_lis[message[0]].append(message)
+
+                        else :#列表是新的
+                            SMS_lis[message[0]] = [message]#新增列表
+                            #print("SMS_lis:{}".format(SMS_lis))
+                            #SMS_lis[message[0]].append(message)#新增列表数据
+                        if len(SMS_lis[message[0]]) == message[1]:#存满一条
+                            SMS_lis_tmp = SMS_lis[message[0]]
+                            data = ""
+                            message_pdu = []
+                            for k in range(len(SMS_lis_tmp)):
+                                for j in range(len(SMS_lis_tmp)): #排序
+                                    if SMS_lis_tmp[j][2] == k+1:
+                                        message_pdu = sms.decodePdu(SMS_lis_tmp[j][5],20)
+                                        if(message_pdu!=-1):
+                                            data += message_pdu[1]
+                                        break
+                            #print("data:{}".format(data))
+                            data_tmp = []
+                            data_tmp.append(message_pdu[0])
+                            data_tmp.append(data)
+                            self.sms_data.append(data_tmp)
+                            SMS_lis_count += 1
+                            if(SMS_lis_count >= MSG_MAX):
+                                break
+                    else :
+                        SMS_lis_count += 1
+                        message_pdu = sms.decodePdu(message[5],20)
+                        data = message_pdu[1]
+                        data_tmp = []
+                        data_tmp.append(message_pdu[0])
+                        data_tmp.append(data)
+                        self.sms_data.append(data_tmp)
+                        print("data:{}".format(data))
+                        if(SMS_lis_count >= MSG_MAX):
+                            break
             
             
-            # MSG_nums = len (self.sms_data)
+            MSG_nums = len (self.sms_data)
             for i in range(MSG_MAX):
-                if i >= 10 :
+                if i >= MSG_nums :
                     self.sms_detail_list_dict[i]["msg_btn"].add_flag(lv.obj.FLAG.HIDDEN)
                     continue
-                tmp =0
+                tmp = self.sms_data[i]
                 if tmp != -1:
                     #msg_btn = lv.btn(self.sms_detail_list)
                     self.sms_detail_list_dict[i]["msg_btn"].set_size(LCD_SIZE_W-10,SMS_LIST_ONE_ICON)
-                    self.sms_detail_list_dict[i]["msg_btn"].set_pos(0,(SMS_LIST_ONE_ICON+5)*count)
+                    self.sms_detail_list_dict[i]["msg_btn"].set_pos(0,(SMS_LIST_ONE_ICON+4)*count)
                     #self.sms_detail_list_dict[i]["msg_btn"].add_style(style_sms_bg_btn, lv.PART.MAIN | lv.STATE.DEFAULT)
                     # self.sms_detail_list_dict[i]["msg_btn"].add_event_cb(lambda e: EventMesh.callback_wrapper(self.sms_cb(e)),
                     #                         lv.EVENT.CLICKED, None)
                 
-                    title = "tmp[0] "
+                    title = tmp[0]
                     # print("title:{}".format(title))
                     #_btn_label2 = lv.label(msg_btn)
                     self.sms_detail_list_dict[i]["_btn_label2"].set_pos(0, 0)
                     self.sms_detail_list_dict[i]["_btn_label2"].set_size(0, 0)
-                    self.sms_detail_list_dict[i]["_btn_label2"].set_text("127979+++++++++HIHSI")
+                    self.sms_detail_list_dict[i]["_btn_label2"].set_text(title)
                     # _btn_label2.set_long_mode(lv.label.LONG.DOT)
                     # _btn_label2.add_style(style_font_youyuan_20_black, lv.PART.MAIN | lv.STATE.DEFAULT)
                     #
-                    detail = "tmp[1]"
+                    detail = tmp[1]
                     #_btn_label3 = lv.label(msg_btn)
                     self.sms_detail_list_dict[i]["_btn_label3"].set_pos(0, 0)
                     self.sms_detail_list_dict[i]["_btn_label3"].set_size(0, 0)
-                    self.sms_detail_list_dict[i]["_btn_label3"].set_text("hi hihi hi是hi hi是奉公守法")
+                    self.sms_detail_list_dict[i]["_btn_label3"].set_text(detail)
                     # _btn_label3.add_style(style_font_youyuan_20_black, lv.PART.MAIN | lv.STATE.DEFAULT)
 
-                    detail1 = "tmp[1]"
+                    detail1 = tmp[1]
                     #_btn_label4 = lv.label(msg_btn)
-                    self.sms_detail_list_dict[i]["_btn_label4"].set_pos(0, 34)
+                    self.sms_detail_list_dict[i]["_btn_label4"].set_pos(0, 40)
                     self.sms_detail_list_dict[i]["_btn_label4"].set_size(LCD_SIZE_W-10, SMS_LIST_ONE_LABEL_SIZE)
-                    self.sms_detail_list_dict[i]["_btn_label4"].set_text("反对非法33333333fdddv反对")
+                    self.sms_detail_list_dict[i]["_btn_label4"].set_text(detail1)
                     self.sms_detail_list_dict[i]["_btn_label4"].set_long_mode(lv.label.LONG.DOT)
                     #self.sms_detail_list_dict[i]["_btn_label4"].add_style(style_font_youyuan_20_black, lv.PART.MAIN | lv.STATE.DEFAULT)
 
-                    title1 = "tmp[0]"
+                    title1 = tmp[0]
                     #_btn_label5 = lv.label(msg_btn)
-                    self.sms_detail_list_dict[i]["_btn_label5"].set_pos(0, 5)
+                    self.sms_detail_list_dict[i]["_btn_label5"].set_pos(0, 10)
                     self.sms_detail_list_dict[i]["_btn_label5"].set_size(LCD_SIZE_W-10, SMS_LIST_ONE_LABEL_SIZE)
-                    self.sms_detail_list_dict[i]["_btn_label5"].set_text("hi hihi hi是hi hi是奉公守法")
+                    self.sms_detail_list_dict[i]["_btn_label5"].set_text(title1)
                     self.sms_detail_list_dict[i]["_btn_label5"].set_long_mode(lv.label.LONG.DOT)
                     #self.sms_detail_list_dict[i]["_btn_label5"].add_style(style_font_youyuan_20_black, lv.PART.MAIN | lv.STATE.DEFAULT)
                     
@@ -2283,11 +2319,6 @@ class PopupScreen(Screen):
             
     def sms_cb(self, e):
         code = e.get_code()
-        EventMesh.publish("publish_message_event_ui",{"func":self.sms_cb_do,"data":code})  
-    def sms_cb_do(self, data):
-        code = data
-
-        #print("code!!!!!!!!",code,msg)
         if code == lv.EVENT.PRESSING:
             #print("PRESSING")
             self.is_sliding += 1
@@ -2296,14 +2327,14 @@ class PopupScreen(Screen):
             #utime.sleep_ms(10)
             print("1self.is_sliding",self.is_sliding)
             if self.is_sliding <= 5 and self.is_sliding != 0:#如果是在滑动中则不需要点击事件
-                print("tp test!!!!!!!!!!!!!!")
-                #上传标题和内容
-                _name = code.get_target().get_child(0).get_text()
+                self.is_sliding = 0
+                _name = e.get_target().get_child(0).get_text()
                 EventMesh.publish("save_msg_name", _name)       
-                content = code.get_target().get_child(1).get_text()
+                content = e.get_target().get_child(1).get_text()
                 EventMesh.publish("save_msg_content", content) 
                 EventMesh.publish("load_screen", {"screen": "msg_detail"})
-            self.is_sliding = 0
+            self.is_sliding =0
+
     
     def done_return(self):
         EventMesh.publish("load_screen", {"screen": "main_menu"})
@@ -2337,15 +2368,15 @@ class MsgDetailScreen(Screen):
             msg_detail_screen.add_style(style_white_screen, lv.PART.MAIN | lv.STATE.DEFAULT)
 
             msg_detail_title = lv.label(msg_detail_screen)
-            msg_detail_title.set_pos(0, 10)
+            msg_detail_title.set_pos(0, 20)
             msg_detail_title.set_size(LCD_SIZE_W, 35)
-            msg_detail_title.set_long_mode(lv.label.LONG.WRAP)
+            msg_detail_title.set_long_mode(lv.label.LONG.DOT)
             msg_detail_title.set_style_text_align(lv.TEXT_ALIGN.CENTER, 0)
             msg_detail_title.add_style(style_font_28_black_bg_gray, lv.PART.MAIN | lv.STATE.DEFAULT)
 
             msg_detail_cont_obj = lv.obj(msg_detail_screen)
-            msg_detail_cont_obj.set_pos(0, 45)
-            msg_detail_cont_obj.set_size(LCD_SIZE_W, 270)
+            msg_detail_cont_obj.set_pos(0, 55)
+            msg_detail_cont_obj.set_size(LCD_SIZE_W, LCD_SIZE_H-55)
             msg_detail_cont_obj.add_style(style_white_screen, lv.PART.MAIN | lv.STATE.DEFAULT)
             msg_detail_cont = lv.label(msg_detail_cont_obj)
             msg_detail_cont.set_pos(0, 5)
@@ -2710,14 +2741,21 @@ toolbox_cont_style.set_pad_right(0)
 toolbox_cont_style.set_pad_top(0)
 toolbox_cont_style.set_pad_bottom(0)
 
+TOOL_ICON_OFFSET_SIZE = 84
+TOOL_ICON_W_SIZE = 220
+TOOL_ICON_H_SIZE = 65
+TOOL_BG_ICON_W_SIZE = 230
+TOOL_BG_ICON_H_SIZE = 78
 class ToolboxScreen(Screen):
     NAME = "toolbox"
 
     def __init__(self):
         super().__init__()
         self.meta = None
+        self.is_sliding =0
 
     def initialization(self):
+        self.is_sliding =0
         global toolbox_screen,toolbox_text_img,toolbox_cont,toolbox_step_img,toolbox_weather_img ,toolbox_alarm_img  ,\
             toolbox_countdown_img,toolbox_stopwatch_img
         if toolbox_screen == None:
@@ -2728,37 +2766,61 @@ class ToolboxScreen(Screen):
             toolbox_screen.set_scrollbar_mode(0)
 
             toolbox_text_img = lv.img(toolbox_screen)
-            toolbox_text_img.set_pos(75, 10)
-            toolbox_text_img.set_size(90, 30)
+            toolbox_text_img.set_pos(0, 10)
+            toolbox_text_img.set_size(232, 34)
             toolbox_text_img.set_src("E:/static/tool/tool_text.png")
             toolbox_text_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
 
             toolbox_cont = lv.obj(toolbox_screen)
             toolbox_cont.set_pos(0, 50)
-            toolbox_cont.set_size(LCD_SIZE_W, 270)
+            toolbox_cont.set_size(LCD_SIZE_W, LCD_SIZE_H-50)
             toolbox_cont.add_style(toolbox_cont_style,lv.PART.MAIN | lv.STATE.DEFAULT)
 
 
+            toolbox_step_bg_img = lv.img(toolbox_cont)
+            toolbox_step_bg_img.set_pos(0, tool_set_y)
+            toolbox_step_bg_img.set_size(TOOL_BG_ICON_W_SIZE, TOOL_BG_ICON_H_SIZE)
+            toolbox_step_bg_img.add_flag(lv.obj.FLAG.CLICKABLE)
+            toolbox_step_bg_img.set_src("E:/static/list_bg.png")
+            toolbox_step_bg_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
+
+
             toolbox_step_img = lv.img(toolbox_cont)
-            toolbox_step_img.set_pos(4, tool_set_y)
-            toolbox_step_img.set_size(232, 80)
-            toolbox_step_img.add_flag(lv.obj.FLAG.CLICKABLE)
+            toolbox_step_img.set_pos(8, tool_set_y+6)
+            toolbox_step_img.set_size(TOOL_ICON_W_SIZE, TOOL_ICON_H_SIZE)
+            # toolbox_step_img.add_flag(lv.obj.FLAG.CLICKABLE)
             toolbox_step_img.set_src("E:/static/tool/IMAGE_SECMENU_STEP.png")
             toolbox_step_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
-            tool_set_y+=90
+            tool_set_y+=TOOL_ICON_OFFSET_SIZE
+
+            toolbox_weather_bg_img = lv.img(toolbox_cont)
+            toolbox_weather_bg_img.set_pos(0, tool_set_y)
+            toolbox_weather_bg_img.set_size(TOOL_BG_ICON_W_SIZE, TOOL_BG_ICON_H_SIZE)
+            toolbox_weather_bg_img.add_flag(lv.obj.FLAG.CLICKABLE)
+            toolbox_weather_bg_img.set_src("E:/static/list_bg.png")
+            toolbox_weather_bg_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
 
             toolbox_weather_img = lv.img(toolbox_cont)
-            toolbox_weather_img.set_pos(4, tool_set_y)
-            toolbox_weather_img.set_size(232, 80)
-            toolbox_weather_img.add_flag(lv.obj.FLAG.CLICKABLE)
+            toolbox_weather_img.set_pos(8, tool_set_y+6)
+            toolbox_weather_img.set_size(TOOL_ICON_W_SIZE, TOOL_ICON_H_SIZE)
+            # toolbox_weather_img.add_flag(lv.obj.FLAG.CLICKABLE)
             toolbox_weather_img.set_src("E:/static/tool/IMAGE_SECMENU_WEATHER.png")
             toolbox_weather_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
 
-            tool_set_y+=90
+            tool_set_y+=TOOL_ICON_OFFSET_SIZE
+
+
+            toolbox_alarm_bg_img = lv.img(toolbox_cont)
+            toolbox_alarm_bg_img.set_pos(0, tool_set_y)
+            toolbox_alarm_bg_img.set_size(TOOL_BG_ICON_W_SIZE, TOOL_BG_ICON_H_SIZE)
+            toolbox_alarm_bg_img.add_flag(lv.obj.FLAG.CLICKABLE)
+            toolbox_alarm_bg_img.set_src("E:/static/list_bg.png")
+            toolbox_alarm_bg_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
+
             toolbox_alarm_img = lv.img(toolbox_cont)
-            toolbox_alarm_img.set_pos(4, tool_set_y)
-            toolbox_alarm_img.set_size(232, 80)
-            toolbox_alarm_img.add_flag(lv.obj.FLAG.CLICKABLE)
+            toolbox_alarm_img.set_pos(8, tool_set_y+6)
+            toolbox_alarm_img.set_size(TOOL_ICON_W_SIZE, TOOL_ICON_H_SIZE)
+            # toolbox_alarm_img.add_flag(lv.obj.FLAG.CLICKABLE)
             toolbox_alarm_img.set_src("E:/static/tool/IMAGE_SECMENU_ALARM.png")
             toolbox_alarm_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
 
@@ -2771,30 +2833,67 @@ class ToolboxScreen(Screen):
             # toolbox_sms_img.set_src("E:/static/tool/sms_setting.png")
             # toolbox_sms_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
 
-            tool_set_y+=90
+            tool_set_y+=TOOL_ICON_OFFSET_SIZE
+            toolbox_countdown_bg_img = lv.img(toolbox_cont)
+            toolbox_countdown_bg_img.set_pos(0, tool_set_y)
+            toolbox_countdown_bg_img.set_size(TOOL_BG_ICON_W_SIZE, TOOL_BG_ICON_H_SIZE)
+            # toolbox_countdown_bg_img.add_flag(lv.obj.FLAG.CLICKABLE)
+            toolbox_countdown_bg_img.set_src("E:/static/list_bg.png")
+            toolbox_countdown_bg_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
+
             toolbox_countdown_img = lv.img(toolbox_cont)
-            toolbox_countdown_img.set_pos(4, tool_set_y)
-            toolbox_countdown_img.set_size(232, 80)
-            toolbox_countdown_img.add_flag(lv.obj.FLAG.CLICKABLE)
+            toolbox_countdown_img.set_pos(8, tool_set_y+6)
+            toolbox_countdown_img.set_size(TOOL_ICON_W_SIZE, TOOL_ICON_H_SIZE)
+            # toolbox_countdown_img.add_flag(lv.obj.FLAG.CLICKABLE)
             toolbox_countdown_img.set_src("E:/static/tool/IMAGE_SECMENU_COUNTDOWN.png")
             toolbox_countdown_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
 
-            tool_set_y+=90
+            tool_set_y+=TOOL_ICON_OFFSET_SIZE
+
+            toolbox_stopwatch_bg_img = lv.img(toolbox_cont)
+            toolbox_stopwatch_bg_img.set_pos(0, tool_set_y)
+            toolbox_stopwatch_bg_img.set_size(TOOL_BG_ICON_W_SIZE, TOOL_BG_ICON_H_SIZE)
+            toolbox_stopwatch_bg_img.add_flag(lv.obj.FLAG.CLICKABLE)
+            toolbox_stopwatch_bg_img.set_src("E:/static/list_bg.png")
+            toolbox_stopwatch_bg_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
+
             toolbox_stopwatch_img = lv.img(toolbox_cont)
-            toolbox_stopwatch_img.set_pos(4, tool_set_y)
-            toolbox_stopwatch_img.set_size(232, 80)
-            toolbox_stopwatch_img.add_flag(lv.obj.FLAG.CLICKABLE)
+            toolbox_stopwatch_img.set_pos(8, tool_set_y+6)
+            toolbox_stopwatch_img.set_size(TOOL_ICON_W_SIZE, TOOL_ICON_H_SIZE)
+            # toolbox_stopwatch_img.add_flag(lv.obj.FLAG.CLICKABLE)
             toolbox_stopwatch_img.set_src("E:/static/tool/IMAGE_SECMENU_STOPWATCH.png")
             toolbox_stopwatch_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
 
-            toolbox_step_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.load_screen(e, {"screen": "step"})), lv.EVENT.CLICKED, None)
-            toolbox_weather_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.load_screen(e, {"screen": "weather"})), lv.EVENT.CLICKED, None)
-            toolbox_alarm_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.load_screen(e, {"screen": "clk_list"})), lv.EVENT.CLICKED, None)
+            toolbox_step_bg_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.tool_cb(e, "step")), lv.EVENT.CLICKED, None)
+            toolbox_weather_bg_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.tool_cb(e, "weather")), lv.EVENT.CLICKED, None)
+            toolbox_alarm_bg_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.tool_cb(e, "clk_list")), lv.EVENT.CLICKED, None)
+            # toolbox_sms_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.load_screen(e, {"screen": "popup"})), lv.EVENT.CLICKED, None)
+            toolbox_countdown_bg_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.tool_cb(e, "countdown")), lv.EVENT.CLICKED, None)
+            toolbox_stopwatch_bg_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.tool_cb(e, "stopwatch")), lv.EVENT.CLICKED, None)
+
+            toolbox_step_bg_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.tool_cb(e, "step")), lv.EVENT.PRESSING, None)
+            toolbox_weather_bg_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.tool_cb(e, "weather")), lv.EVENT.PRESSING, None)
+            toolbox_alarm_bg_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.tool_cb(e, "clk_list")), lv.EVENT.PRESSING, None)
             # toolbox_sms_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.load_screen(e, {"screen": "popup"})), lv.EVENT.CLICKED, None)
-            toolbox_countdown_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.load_screen(e, {"screen": "countdown"})), lv.EVENT.CLICKED, None)
-            toolbox_stopwatch_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.load_screen(e, {"screen": "stopwatch"})), lv.EVENT.CLICKED, None)
+            toolbox_countdown_bg_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.tool_cb(e, "countdown")), lv.EVENT.PRESSING, None)
+            toolbox_stopwatch_bg_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.tool_cb(e, "stopwatch")), lv.EVENT.PRESSING, None)
             self.meta = toolbox_screen
 
+    def tool_cb(self,e,msg):
+        code = e.get_code()
+        if code == lv.EVENT.PRESSING:
+            #print("PRESSING")
+            self.is_sliding += 1
+
+        elif  code == lv.EVENT.CLICKED:
+            #utime.sleep_ms(10)
+            print("1self.is_sliding",self.is_sliding)
+            if self.is_sliding <= 5 and self.is_sliding != 0:#如果是在滑动中则不需要点击事件
+                self.is_sliding = 0
+                EventMesh.publish("load_screen",  {"screen": "{}".format(msg)})
+                
+            self.is_sliding =0
+
     def done_return(self):
         EventMesh.publish("load_screen", {"screen": "main_menu"})
 
@@ -3007,7 +3106,14 @@ class IncomingCallScreen(Screen):
         self.aud.stop()
         self.call_timer.stop()
         voiceCall.callEnd()
+        EventMesh.publish("set_interrup_incall",0)
+        EventMesh.publish("set_UI_high_priority",0)
+        
 
+        screen_NAME = EventMesh.publish("get_screen_NAME")
+        if screen_NAME != None:
+            if screen_NAME != "dialing_noplay_popup":
+                EventMesh.publish("load_screen", {"screen": "main_menu"})  
 
     def btn1_release(self):
         pass
@@ -3272,7 +3378,7 @@ class OnCallScreen(Screen):
 
             on_call_phone_start = lv.img(on_call_screen_tab)
             on_call_phone_start.set_size(76, 50)
-            on_call_phone_start.set_src("E:/static/IMAGE_NUMBER_KEYSTAR_ICON.png")
+            on_call_phone_start.set_src("E:/static/IMAGE_BUTTON_DIAL.png")
             on_call_phone_start.add_flag(lv.obj.FLAG.CLICKABLE)
             on_call_phone_start.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
             on_call_phone_start.set_pos(3, 266)
@@ -3286,7 +3392,7 @@ class OnCallScreen(Screen):
 
             on_call_phone_hash = lv.img(on_call_screen_tab)
             on_call_phone_hash.set_size(76, 50)
-            on_call_phone_hash.set_src("E:/static/IMAGE_NUMBER_KEYHASH_ICON.png")
+            on_call_phone_hash.set_src("E:/static/IMAGE_BUTTON_DELKEY.png")
             on_call_phone_hash.add_flag(lv.obj.FLAG.CLICKABLE)
             on_call_phone_hash.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
             on_call_phone_hash.set_pos(161, 266)
@@ -3571,7 +3677,15 @@ class OnCallScreen(Screen):
         EventMesh.publish("set_UI_high_priority", 0)
         self.timer.stop()
         voiceCall.callEnd()
+        EventMesh.publish("set_interrup_incall",0)
+        EventMesh.publish("set_UI_high_priority",0)
         
+
+        screen_NAME = EventMesh.publish("get_screen_NAME")
+        if screen_NAME != None:
+            if screen_NAME != "dialing_noplay_popup":
+                EventMesh.publish("load_screen", {"screen": "main_menu"})  
+
     def Close(self):
         self.timer.stop()
 
@@ -6077,7 +6191,7 @@ class SystemInitScreen(Screen):
             system_init_screen.add_style(style_screen, lv.PART.MAIN | lv.STATE.DEFAULT)
        
             system_init_label = lv.label(system_init_screen)
-            system_init_label.set_pos(0, 150)
+            system_init_label.set_pos(0, (LCD_SIZE_H//2)-10)
             system_init_label.set_size(LCD_SIZE_W, 40)
             system_init_label.set_text("系统初始化中")
             system_init_label.add_style(style_font_youyuan_20, lv.PART.MAIN | lv.STATE.DEFAULT)
@@ -6131,7 +6245,7 @@ class chargeInScreen(Screen):
             #进入图片
 
             charge_in_screen_label = lv.label(charge_in_screen)
-            charge_in_screen_label.set_pos(0, 170)
+            charge_in_screen_label.set_pos(0, (LCD_SIZE_H//2)-10)
             charge_in_screen_label.set_size(LCD_SIZE_W, 20)
             charge_in_screen_label.set_text(" ")
             charge_in_screen_label.add_style(style_font_youyuan_20, lv.PART.MAIN | lv.STATE.DEFAULT)
@@ -6214,14 +6328,13 @@ class chargeOutScreen(Screen):
             #进入图片
 
             charge_out_screen_label = lv.label(charge_out_screen)
-            charge_out_screen_label.set_pos(0, 170)
+            charge_out_screen_label.set_pos(0, (LCD_SIZE_H//2)-10)
             charge_out_screen_label.set_size(LCD_SIZE_W, 20)
             charge_out_screen_label.set_text(" ")
             charge_out_screen_label.add_style(style_font_youyuan_20, lv.PART.MAIN | lv.STATE.DEFAULT)
             charge_out_screen_label.set_long_mode(lv.label.LONG.WRAP)
             charge_out_screen_label.set_style_text_align(lv.TEXT_ALIGN.CENTER, 0)
 
-
             self.meta = charge_out_screen
  
         
@@ -6469,7 +6582,7 @@ class UI(object):
 
         if self.level == None:
             self.level = 6
-        self.PWM_backlight = PWM(PWM.PWM1, PWM.ABOVE_MS, self.level, 10)
+        self.PWM_backlight = PWM(PWM.PWM1, PWM.ABOVE_10US, self.level*100, 1000)
         self.PWM_backlight.open()
         self.sleep_lock = 0
 
@@ -6675,7 +6788,7 @@ class UI(object):
                 self.level = 10
             elif self.level <= 0:
                 self.level = 1
-            self.PWM_backlight = PWM(PWM.PWM1, PWM.ABOVE_MS, self.level, 10)
+            self.PWM_backlight = PWM(PWM.PWM1, PWM.ABOVE_10US, self.level*100, 1000)
             self.PWM_backlight.open()
             self.sleep_lock = 0
             
@@ -6692,7 +6805,7 @@ class UI(object):
                 utime.sleep_ms(200)
             self.sleep_lock = 1
             self.sleep_flag = 0
-            self.PWM_backlight = PWM(PWM.PWM1, PWM.ABOVE_MS, 0, 1)
+            self.PWM_backlight = PWM(PWM.PWM1, PWM.ABOVE_10US, 0, 1000)
             self.PWM_backlight.open()
             #lcd_ctrl.write(0)
             #
index 5f901fa..28ab093 100644 (file)
@@ -4,7 +4,7 @@ import lvgl as lv
 import EventMesh
 import osTimer
 import constants
-from ui import Screen,style_screen
+from ui import Screen,style_screen,style_font_youyuan_28
 import ql_fs
 import ujson
 from machine import RTC
@@ -22,10 +22,7 @@ watchface_style_default.set_text_color(lv.color_make(0xff, 0xff, 0xff))
 watchface_style_default.set_text_font_v2("font_28.bin",28,0)
 
 
-style_font_youyuan_28 = lv.style_t()
-style_font_youyuan_28.init()
-style_font_youyuan_28.set_text_color(lv.color_make(0xFF, 0xFF, 0xFF))
-style_font_youyuan_28.set_text_font(lv.font_28_dial)
+
 
 power_line_points = [{"x":0,"y":0},{"x":0,"y":16}]
 power_line_red = lv.style_t()
index ba3cf5a..86836ef 100644 (file)
@@ -9,8 +9,15 @@ import osTimer
 import audio
 from machine import Pin
 import ujson
-from lcd import style_font_youyuan_40
-# -------------------------------------------setting screen----------------------------------------------------------
+from lcd import style_font_youyuan_40,LCD_SIZE_H,LCD_SIZE_W
+HEALTH_ICON_W_SIZE = 220
+HEALTH_ICON_H_SIZE = 65
+HEALTH_ICON_OFFSET_SIZE = 84
+HEALTH_BG_ICON_W_SIZE = 230
+HEALTH_BG_ICON_H_SIZE = 78
+# -------------------------------------------healt screen----------------------------------------------------------
+
+
 
 style_bar = lv.style_t() 
 style_bar.init()
@@ -45,8 +52,8 @@ health_screen.set_scrollbar_mode(lv.SCROLLBAR_MODE.OFF)
 health_screen.add_style(style_screen, lv.PART.MAIN | lv.STATE.DEFAULT)
 
 health_title_img = lv.img(health_screen)
-health_title_img.set_pos(58, 10)
-health_title_img.set_size(124, 30)
+health_title_img.set_pos(4, 10)
+health_title_img.set_size(232, 34)
 health_title_img.set_src("E:/static/health/health_text.png")
 health_title_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
 
@@ -65,74 +72,63 @@ setting_cont_style.set_pad_right(0)
 setting_cont_style.set_pad_top(0)
 setting_cont_style.set_pad_bottom(0)
 
-health_list_screen = lv.obj(health_screen)
-health_list_screen.set_pos(0, 50)
-health_list_screen.set_size(240, 270)
-health_list_screen.set_scrollbar_mode(lv.SCROLLBAR_MODE.OFF)
-health_list_screen.add_style(setting_cont_style,lv.PART.MAIN | lv.STATE.DEFAULT)
-
-setting_cont = lv.obj(health_list_screen)
-setting_cont.set_pos(0, 0)
-setting_cont.set_scrollbar_mode(lv.SCROLLBAR_MODE.OFF)
-setting_cont.set_size(240, 271)
-setting_cont.add_style(setting_cont_style,lv.PART.MAIN | lv.STATE.DEFAULT)
-
-
-health_hr = lv.btn(setting_cont)
-health_hr.set_pos(0, health_cont_y)
-health_hr.set_size(0, 0)
-health_hr_label = lv.label(health_hr)
-health_hr_label.set_text("心率")
-health_hr.set_style_pad_all(0, lv.STATE.DEFAULT)
-health_hr_label.align(lv.ALIGN.LEFT_MID, 70, 0)
-health_hr_label.set_style_text_color(lv.color_make(0xff, 0xff, 0xff), lv.STATE.DEFAULT)
-health_hr_label.add_style(style_font_youyuan_20, lv.PART.MAIN | lv.STATE.DEFAULT)
-health_hr.add_style(style_btn, lv.PART.MAIN | lv.STATE.DEFAULT)
-health_hr_img = lv.img(setting_cont)
-health_hr_img.set_pos(0, health_cont_y)
-health_hr_img.set_size(232, 80)
+healt_cont = lv.obj(health_screen)
+healt_cont.set_pos(0, 50)
+healt_cont.set_size(LCD_SIZE_W, LCD_SIZE_H-50)
+healt_cont.set_scrollbar_mode(lv.SCROLLBAR_MODE.OFF)
+healt_cont.add_style(setting_cont_style,lv.PART.MAIN | lv.STATE.DEFAULT)
+
+# healt_cont = lv.obj(health_list_screen)
+# healt_cont.set_pos(0, 0)
+# # healt_cont.set_scrollbar_mode(lv.SCROLLBAR_MODE.OFF)
+# healt_cont.set_size(LCD_SIZE_W, LCD_SIZE_H-50+1)
+# healt_cont.add_style(setting_cont_style,lv.PART.MAIN | lv.STATE.DEFAULT)
+
+health_hr_bg_img = lv.img(healt_cont)
+health_hr_bg_img.set_pos(0, health_cont_y)
+health_hr_bg_img.set_size(HEALTH_BG_ICON_W_SIZE, HEALTH_BG_ICON_H_SIZE)
+health_hr_bg_img.add_flag(lv.obj.FLAG.CLICKABLE)
+health_hr_bg_img.set_src("E:/static/list_bg.png")
+health_hr_bg_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
+
+health_hr_img = lv.img(healt_cont)
+health_hr_img.set_pos(8, health_cont_y+6)
+health_hr_img.set_size(HEALTH_ICON_W_SIZE, HEALTH_ICON_H_SIZE)
 health_hr_img.add_flag(lv.obj.FLAG.CLICKABLE)
 health_hr_img.set_src("E:/static/health/health_hr.png")
 health_hr_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
-health_cont_y+=90
-
-
-
-health_spo2 = lv.btn(setting_cont)
-health_spo2.set_pos(0, health_cont_y)
-health_spo2.set_size(0, 0)
-health_spo2_label = lv.label(health_spo2)
-health_spo2_label.set_text("血氧")
-health_spo2.set_style_pad_all(0, lv.STATE.DEFAULT)
-health_spo2_label.align(lv.ALIGN.LEFT_MID, 70, 0)
-health_spo2_label.set_style_text_color(lv.color_make(0xff, 0xff, 0xff), lv.STATE.DEFAULT)
-health_spo2_label.add_style(style_font_youyuan_20, lv.PART.MAIN | lv.STATE.DEFAULT)
-health_spo2.add_style(style_btn, lv.PART.MAIN | lv.STATE.DEFAULT)
-health_spo2_img = lv.img(setting_cont)
-health_spo2_img.set_pos(0, health_cont_y)
-health_spo2_img.set_size(232, 80)
-health_spo2_img.add_flag(lv.obj.FLAG.CLICKABLE)
+health_cont_y+=HEALTH_ICON_OFFSET_SIZE
+
+
+hhealth_spo2_bg_img = lv.img(healt_cont)
+hhealth_spo2_bg_img.set_pos(0, health_cont_y)
+hhealth_spo2_bg_img.set_size(HEALTH_BG_ICON_W_SIZE, HEALTH_BG_ICON_H_SIZE)
+hhealth_spo2_bg_img.add_flag(lv.obj.FLAG.CLICKABLE)
+hhealth_spo2_bg_img.set_src("E:/static/list_bg.png")
+hhealth_spo2_bg_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
+
+health_spo2_img = lv.img(healt_cont)
+health_spo2_img.set_pos(8, health_cont_y+6)
+health_spo2_img.set_size(HEALTH_ICON_W_SIZE, HEALTH_ICON_H_SIZE)
+# health_spo2_img.add_flag(lv.obj.FLAG.CLICKABLE)
 health_spo2_img.set_src("E:/static/health/health_spo2.png")
 health_spo2_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
-health_cont_y+=90
-
-health_temp = lv.btn(setting_cont)
-health_temp.set_pos(0, health_cont_y)
-health_temp.set_size(0, 0)
-health_temp_label = lv.label(health_temp)
-health_temp_label.set_text("体温")
-health_temp.set_style_pad_all(0, lv.STATE.DEFAULT)
-health_temp_label.align(lv.ALIGN.LEFT_MID, 70, 0)
-health_temp_label.set_style_text_color(lv.color_make(0xff, 0xff, 0xff), lv.STATE.DEFAULT)
-health_temp_label.add_style(style_font_youyuan_20, lv.PART.MAIN | lv.STATE.DEFAULT)
-health_temp.add_style(style_btn, lv.PART.MAIN | lv.STATE.DEFAULT)
-health_temp_img = lv.img(setting_cont)
-health_temp_img.set_pos(0, health_cont_y)
-health_temp_img.set_size(232, 80)
+health_cont_y+=HEALTH_ICON_OFFSET_SIZE
+
+health_temp_bg_img = lv.img(healt_cont)
+health_temp_bg_img.set_pos(0, health_cont_y)
+health_temp_bg_img.set_size(HEALTH_BG_ICON_W_SIZE, HEALTH_BG_ICON_H_SIZE)
+health_temp_bg_img.add_flag(lv.obj.FLAG.CLICKABLE)
+health_temp_bg_img.set_src("E:/static/list_bg.png")
+health_temp_bg_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
+
+health_temp_img = lv.img(healt_cont)
+health_temp_img.set_pos(8, health_cont_y+6)
+health_temp_img.set_size(HEALTH_ICON_W_SIZE, HEALTH_ICON_H_SIZE)
 health_temp_img.add_flag(lv.obj.FLAG.CLICKABLE)
 health_temp_img.set_src("E:/static/health/health_temp.png")
 health_temp_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
-health_cont_y+=90
+health_cont_y+=HEALTH_ICON_OFFSET_SIZE
 
 
 
@@ -143,11 +139,33 @@ class HealthScreen(Screen):#健康测量
     def __init__(self):
         super().__init__()
         self.meta = health_screen
+        self.is_sliding = 0
         # setting_language.add_event_cb(lambda e: self.load_screen(e, {"screen": "language"}), lv.EVENT.CLICKED, None)
-        health_hr_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.load_screen(e, {"screen": "heartrate"})), lv.EVENT.CLICKED, None)
+        health_hr_bg_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.healt_cb(e, "heartrate")), lv.EVENT.CLICKED, None)
+        # setting_themeswitch.add_event_cb(lambda e: self.load_screen(e, {"screen": "themeswitch"}), lv.EVENT.CLICKED, None)
+        hhealth_spo2_bg_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.healt_cb(e, "spo2")), lv.EVENT.CLICKED, None)
+        health_temp_bg_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.healt_cb(e, "temperature")), lv.EVENT.CLICKED, None)
+
+        health_hr_bg_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.healt_cb(e, "heartrate")), lv.EVENT.PRESSING, None)
         # setting_themeswitch.add_event_cb(lambda e: self.load_screen(e, {"screen": "themeswitch"}), lv.EVENT.CLICKED, None)
-        health_spo2_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.load_screen(e, {"screen": "spo2"})), lv.EVENT.CLICKED, None)
-        health_temp_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.load_screen(e, {"screen": "temperature"})), lv.EVENT.CLICKED, None)
+        hhealth_spo2_bg_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.healt_cb(e,"spo2")), lv.EVENT.PRESSING, None)
+        health_temp_bg_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.healt_cb(e, "temperature")), lv.EVENT.PRESSING, None)
+    
+    def initialization(self):
+        self.is_sliding = 0
+
+    def healt_cb(self,e,msg):
+        code = e.get_code()
+        if code == lv.EVENT.PRESSING:
+            self.is_sliding += 1
+
+        elif  code == lv.EVENT.CLICKED:
+            print("1self.is_sliding",self.is_sliding)
+            if self.is_sliding <= 5 and self.is_sliding != 0:#如果是在滑动中则不需要点击事件
+                self.is_sliding = 0
+                EventMesh.publish("load_screen",  {"screen": "{}".format(msg)})
+                
+            self.is_sliding =0
 
     def done_return(self):
         EventMesh.publish("load_screen", {"screen": "main_menu"})
index 546cc49..3763b49 100644 (file)
@@ -9,9 +9,14 @@ import osTimer
 import audio
 from machine import Pin
 import ujson
-from lcd import style_font_youyuan_40
+from lcd import style_font_youyuan_40,LCD_SIZE_W,LCD_SIZE_H
 # -------------------------------------------setting screen----------------------------------------------------------
+SETTING_ICON_W_SIZE = 220
+SETTING_ICON_H_SIZE = 65
+SETTING_ICON_OFFSET_SIZE = 84
 
+TOOL_BG_ICON_W_SIZE = 230
+TOOL_BG_ICON_H_SIZE = 78
 
 
 style_volume_btn =  lv.style_t()
@@ -28,8 +33,8 @@ print("setting_screen")
 setting_screen.add_style(style_screen, lv.PART.MAIN | lv.STATE.DEFAULT)
 
 setting_imei_img = lv.img(setting_screen)
-setting_imei_img.set_pos(75, 10)
-setting_imei_img.set_size(90, 30)
+setting_imei_img.set_pos(4, 10)
+setting_imei_img.set_size(232, 34)
 setting_imei_img.set_src("E:/static/setting/setting_text.png")
 setting_imei_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
 # setting_title = lv.label(setting)
@@ -55,7 +60,7 @@ setting_cont_style.set_pad_bottom(0)
 
 setting_cont = lv.obj(setting_screen)
 setting_cont.set_pos(0, 50)
-setting_cont.set_size(240, 270)
+setting_cont.set_size(LCD_SIZE_W, LCD_SIZE_H-50)
 setting_cont.add_style(setting_cont_style,lv.PART.MAIN | lv.STATE.DEFAULT)
 
 # setting_language = lv.btn(setting_cont)
@@ -76,23 +81,20 @@ setting_cont.add_style(setting_cont_style,lv.PART.MAIN | lv.STATE.DEFAULT)
 # setting_language_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
 #setting_cont_y += 60
 
-setting_dialswitch = lv.btn(setting_cont)
-setting_dialswitch.set_pos(0, setting_cont_y)
-setting_dialswitch.set_size(0, 0)
-setting_dialswitch_label = lv.label(setting_dialswitch)
-setting_dialswitch_label.set_text("表盘切换")
-setting_dialswitch.set_style_pad_all(0, lv.STATE.DEFAULT)
-setting_dialswitch_label.align(lv.ALIGN.LEFT_MID, 70, 0)
-setting_dialswitch_label.set_style_text_color(lv.color_make(0xff, 0xff, 0xff), lv.STATE.DEFAULT)
-setting_dialswitch_label.add_style(style_font_youyuan_20, lv.PART.MAIN | lv.STATE.DEFAULT)
-setting_dialswitch.add_style(style_btn, lv.PART.MAIN | lv.STATE.DEFAULT)
+setting_dialswitch_bg_img = lv.img(setting_cont)
+setting_dialswitch_bg_img.set_pos(0, setting_cont_y)
+setting_dialswitch_bg_img.set_size(TOOL_BG_ICON_W_SIZE, TOOL_BG_ICON_H_SIZE)
+setting_dialswitch_bg_img.add_flag(lv.obj.FLAG.CLICKABLE)
+setting_dialswitch_bg_img.set_src("E:/static/list_bg.png")
+setting_dialswitch_bg_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
+
 setting_dialswitch_img = lv.img(setting_cont)
-setting_dialswitch_img.set_pos(0, setting_cont_y)
-setting_dialswitch_img.set_size(232, 80)
-setting_dialswitch_img.add_flag(lv.obj.FLAG.CLICKABLE)
+setting_dialswitch_img.set_pos(8, setting_cont_y+6)
+setting_dialswitch_img.set_size(SETTING_ICON_W_SIZE, SETTING_ICON_H_SIZE)
+# setting_dialswitch_img.add_flag(lv.obj.FLAG.CLICKABLE)
 setting_dialswitch_img.set_src("E:/static/setting/menu_watch_switch.png")
 setting_dialswitch_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
-setting_cont_y+=90
+setting_cont_y+=SETTING_ICON_OFFSET_SIZE
 
 
 # setting_themeswitch = lv.btn(setting_cont)
@@ -112,147 +114,123 @@ setting_cont_y+=90
 # setting_themeswitch_img.set_src("E:/static/menu_theme_switch.png")
 # setting_themeswitch_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
 #setting_cont_y+=60
+setting_imei_bg_img = lv.img(setting_cont)
+setting_imei_bg_img.set_pos(0, setting_cont_y)
+setting_imei_bg_img.set_size(TOOL_BG_ICON_W_SIZE, TOOL_BG_ICON_H_SIZE)
+setting_imei_bg_img.add_flag(lv.obj.FLAG.CLICKABLE)
+setting_imei_bg_img.set_src("E:/static/list_bg.png")
+setting_imei_bg_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
 
-setting_imei = lv.btn(setting_cont)
-setting_imei.set_pos(0, setting_cont_y)
-setting_imei.set_size(0, 0)
-setting_imei_label = lv.label(setting_imei)
-setting_imei_label.set_text("设备IMEI号")
-setting_imei.set_style_pad_all(0, lv.STATE.DEFAULT)
-setting_imei_label.align(lv.ALIGN.LEFT_MID, 70, 0)
-setting_imei_label.set_style_text_color(lv.color_make(0xff, 0xff, 0xff), lv.STATE.DEFAULT)
-setting_imei_label.add_style(style_font_youyuan_20, lv.PART.MAIN | lv.STATE.DEFAULT)
-setting_imei.add_style(style_btn, lv.PART.MAIN | lv.STATE.DEFAULT)
 setting_imei_img = lv.img(setting_cont)
-setting_imei_img.set_pos(0, setting_cont_y)
-setting_imei_img.set_size(232, 80)
-setting_imei_img.add_flag(lv.obj.FLAG.CLICKABLE)
+setting_imei_img.set_pos(8, setting_cont_y+6)
+setting_imei_img.set_size(SETTING_ICON_W_SIZE, SETTING_ICON_H_SIZE)
+# setting_imei_img.add_flag(lv.obj.FLAG.CLICKABLE)
 setting_imei_img.set_src("E:/static/setting/menu_imei_qrcode.png")
 setting_imei_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
-setting_cont_y+=90
-
-setting_app = lv.btn(setting_cont)
-setting_app.set_pos(0, setting_cont_y)
-setting_app.set_size(0, 0)
-setting_app_label = lv.label(setting_app)
-setting_app_label.set_text("手机安装APP")
-setting_app.set_style_pad_all(0, lv.STATE.DEFAULT)
-setting_app_label.align(lv.ALIGN.LEFT_MID, 70, 0)
-setting_app_label.set_style_text_color(lv.color_make(0xff, 0xff, 0xff), lv.STATE.DEFAULT)
-setting_app_label.add_style(style_font_youyuan_20, lv.PART.MAIN | lv.STATE.DEFAULT)
-setting_app.add_style(style_btn, lv.PART.MAIN | lv.STATE.DEFAULT)
+setting_cont_y+=SETTING_ICON_OFFSET_SIZE
+
+setting_app_bg_img = lv.img(setting_cont)
+setting_app_bg_img.set_pos(0, setting_cont_y)
+setting_app_bg_img.set_size(TOOL_BG_ICON_W_SIZE, TOOL_BG_ICON_H_SIZE)
+setting_app_bg_img.add_flag(lv.obj.FLAG.CLICKABLE)
+setting_app_bg_img.set_src("E:/static/list_bg.png")
+setting_app_bg_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
+
 setting_app_img = lv.img(setting_cont)
-setting_app_img.set_pos(0, setting_cont_y)
-setting_app_img.set_size(232, 80)
-setting_app_img.add_flag(lv.obj.FLAG.CLICKABLE)
+setting_app_img.set_pos(8, setting_cont_y+6)
+setting_app_img.set_size(SETTING_ICON_W_SIZE, SETTING_ICON_H_SIZE)
+# setting_app_img.add_flag(lv.obj.FLAG.CLICKABLE)
 setting_app_img.set_src("E:/static/setting/menu_app_qrcode.png")
 setting_app_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
-setting_cont_y+=90
-
-setting_bright = lv.btn(setting_cont)
-setting_bright.set_pos(0, setting_cont_y)
-setting_bright.set_size(0, 0)
-setting_bright_label = lv.label(setting_bright)
-setting_bright_label.set_text("屏幕调节")
-setting_bright.set_style_pad_all(0, lv.STATE.DEFAULT)
-setting_bright_label.align(lv.ALIGN.LEFT_MID, 70, 0)
-setting_bright_label.set_style_text_color(lv.color_make(0xff, 0xff, 0xff), lv.STATE.DEFAULT)
-setting_bright_label.add_style(style_font_youyuan_20, lv.PART.MAIN | lv.STATE.DEFAULT)
-setting_bright.add_style(style_btn, lv.PART.MAIN | lv.STATE.DEFAULT)
+setting_cont_y+=SETTING_ICON_OFFSET_SIZE
+
+setting_bright_bg_img = lv.img(setting_cont)
+setting_bright_bg_img.set_pos(0, setting_cont_y)
+setting_bright_bg_img.set_size(TOOL_BG_ICON_W_SIZE, TOOL_BG_ICON_H_SIZE)
+setting_bright_bg_img.add_flag(lv.obj.FLAG.CLICKABLE)
+setting_bright_bg_img.set_src("E:/static/list_bg.png")
+setting_bright_bg_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
+
 setting_bright_img = lv.img(setting_cont)
-setting_bright_img.set_pos(0, setting_cont_y)
-setting_bright_img.set_size(232, 80)
-setting_bright_img.add_flag(lv.obj.FLAG.CLICKABLE)
+setting_bright_img.set_pos(8, setting_cont_y+6)
+setting_bright_img.set_size(SETTING_ICON_W_SIZE, SETTING_ICON_H_SIZE)
+# setting_bright_img.add_flag(lv.obj.FLAG.CLICKABLE)
 setting_bright_img.set_src("E:/static/setting/menu_bright.png")
 setting_bright_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
-setting_cont_y+=90
-
-setting_volume = lv.btn(setting_cont)
-setting_volume.set_pos(0, setting_cont_y)
-setting_volume.set_size(0, 0)
-setting_volume_label = lv.label(setting_volume)
-setting_volume_label.set_text("铃声")
-setting_volume.set_style_pad_all(0, lv.STATE.DEFAULT)
-setting_volume_label.align(lv.ALIGN.LEFT_MID, 70, 0)
-setting_volume_label.set_style_text_color(lv.color_make(0xff, 0xff, 0xff), lv.STATE.DEFAULT)
-setting_volume_label.add_style(style_font_youyuan_20, lv.PART.MAIN | lv.STATE.DEFAULT)
-setting_volume.add_style(style_btn, lv.PART.MAIN | lv.STATE.DEFAULT)
+setting_cont_y+=SETTING_ICON_OFFSET_SIZE
+
+setting_volume_bg_img = lv.img(setting_cont)
+setting_volume_bg_img.set_pos(0, setting_cont_y)
+setting_volume_bg_img.set_size(TOOL_BG_ICON_W_SIZE, TOOL_BG_ICON_H_SIZE)
+setting_volume_bg_img.add_flag(lv.obj.FLAG.CLICKABLE)
+setting_volume_bg_img.set_src("E:/static/list_bg.png")
+setting_volume_bg_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
+
 setting_volume_img = lv.img(setting_cont)
-setting_volume_img.set_pos(0, setting_cont_y)
-setting_volume_img.set_size(232, 80)
-setting_volume_img.add_flag(lv.obj.FLAG.CLICKABLE)
+setting_volume_img.set_pos(8, setting_cont_y+6)
+setting_volume_img.set_size(SETTING_ICON_W_SIZE, SETTING_ICON_H_SIZE)
+# setting_volume_img.add_flag(lv.obj.FLAG.CLICKABLE)
 setting_volume_img.set_src("E:/static/setting/menu_volume.png")
 setting_volume_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
-setting_cont_y+=90
-
-setting_restore = lv.btn(setting_cont)
-setting_restore.set_pos(0, setting_cont_y)
-setting_restore.set_size(0, 0)
-setting_restore_label = lv.label(setting_restore)
-setting_restore_label.set_text("恢复出厂设置")
-setting_restore.set_style_pad_all(0, lv.STATE.DEFAULT)
-setting_restore_label.align(lv.ALIGN.LEFT_MID, 70, 0)
-setting_restore_label.set_style_text_color(lv.color_make(0xff, 0xff, 0xff), lv.STATE.DEFAULT)
-setting_restore_label.add_style(style_font_youyuan_20, lv.PART.MAIN | lv.STATE.DEFAULT)
-setting_restore.add_style(style_btn, lv.PART.MAIN | lv.STATE.DEFAULT)
+setting_cont_y+=SETTING_ICON_OFFSET_SIZE
+
+setting_restore_bg_img = lv.img(setting_cont)
+setting_restore_bg_img.set_pos(0, setting_cont_y)
+setting_restore_bg_img.set_size(TOOL_BG_ICON_W_SIZE, TOOL_BG_ICON_H_SIZE)
+setting_restore_bg_img.add_flag(lv.obj.FLAG.CLICKABLE)
+setting_restore_bg_img.set_src("E:/static/list_bg.png")
+setting_restore_bg_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
+
 setting_restore_img = lv.img(setting_cont)
-setting_restore_img.set_pos(0, setting_cont_y)
-setting_restore_img.set_size(232, 80)
-setting_restore_img.add_flag(lv.obj.FLAG.CLICKABLE)
+setting_restore_img.set_pos(8, setting_cont_y+6)
+setting_restore_img.set_size(SETTING_ICON_W_SIZE, SETTING_ICON_H_SIZE)
+# setting_restore_img.add_flag(lv.obj.FLAG.CLICKABLE)
 setting_restore_img.set_src("E:/static/setting/menu_restore.png")
 setting_restore_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
-setting_cont_y+=90
-
-setting_poweroff = lv.btn(setting_cont)
-setting_poweroff.set_pos(0, setting_cont_y)
-setting_poweroff.set_size(0, 0)
-setting_poweroff_label = lv.label(setting_poweroff)
-setting_poweroff_label.set_text("关机")
-setting_poweroff.set_style_pad_all(0, lv.STATE.DEFAULT)
-setting_poweroff_label.align(lv.ALIGN.LEFT_MID, 70, 0)
-setting_poweroff_label.set_style_text_color(lv.color_make(0xff, 0xff, 0xff), lv.STATE.DEFAULT)
-setting_poweroff_label.add_style(style_font_youyuan_20, lv.PART.MAIN | lv.STATE.DEFAULT)
-setting_poweroff.add_style(style_btn, lv.PART.MAIN | lv.STATE.DEFAULT)
+setting_cont_y+=SETTING_ICON_OFFSET_SIZE
+
+setting_poweroff_bg_img = lv.img(setting_cont)
+setting_poweroff_bg_img.set_pos(0, setting_cont_y)
+setting_poweroff_bg_img.set_size(TOOL_BG_ICON_W_SIZE, TOOL_BG_ICON_H_SIZE)
+setting_poweroff_bg_img.add_flag(lv.obj.FLAG.CLICKABLE)
+setting_poweroff_bg_img.set_src("E:/static/list_bg.png")
+setting_poweroff_bg_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
+
 setting_poweroff_img = lv.img(setting_cont)
-setting_poweroff_img.set_pos(0, setting_cont_y)
-setting_poweroff_img.set_size(232, 80)
-setting_poweroff_img.add_flag(lv.obj.FLAG.CLICKABLE)
+setting_poweroff_img.set_pos(8, setting_cont_y+6)
+setting_poweroff_img.set_size(SETTING_ICON_W_SIZE, SETTING_ICON_H_SIZE)
+# setting_poweroff_img.add_flag(lv.obj.FLAG.CLICKABLE)
 setting_poweroff_img.set_src("E:/static/setting/menu_poweroff.png")
 setting_poweroff_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
-setting_cont_y+=90
-
-setting_version = lv.btn(setting_cont)
-setting_version.set_pos(0, setting_cont_y)
-setting_version.set_size(0, 0)
-setting_version_label = lv.label(setting_version)
-setting_version_label.set_text("关于设备")
-setting_version.set_style_pad_all(0, lv.STATE.DEFAULT)
-setting_version_label.align(lv.ALIGN.LEFT_MID, 70, 0)
-setting_version_label.set_style_text_color(lv.color_make(0xff, 0xff, 0xff), lv.STATE.DEFAULT)
-setting_version_label.add_style(style_font_youyuan_20, lv.PART.MAIN | lv.STATE.DEFAULT)
-setting_version.add_style(style_btn, lv.PART.MAIN | lv.STATE.DEFAULT)
+setting_cont_y+=SETTING_ICON_OFFSET_SIZE
+
+setting_version_bg_img = lv.img(setting_cont)
+setting_version_bg_img.set_pos(0, setting_cont_y)
+setting_version_bg_img.set_size(TOOL_BG_ICON_W_SIZE, TOOL_BG_ICON_H_SIZE)
+setting_version_bg_img.add_flag(lv.obj.FLAG.CLICKABLE)
+setting_version_bg_img.set_src("E:/static/list_bg.png")
+setting_version_bg_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
+
 setting_version_img = lv.img(setting_cont)
-setting_version_img.set_pos(0, setting_cont_y)
-setting_version_img.set_size(232, 80)
-setting_version_img.add_flag(lv.obj.FLAG.CLICKABLE)
+setting_version_img.set_pos(8, setting_cont_y+6)
+setting_version_img.set_size(SETTING_ICON_W_SIZE, SETTING_ICON_H_SIZE)
+# setting_version_img.add_flag(lv.obj.FLAG.CLICKABLE)
 setting_version_img.set_src("E:/static/setting/menu_version.png")
 setting_version_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
-setting_cont_y+=90
-
-setting_update = lv.btn(setting_cont)
-setting_update.set_pos(0, setting_cont_y)
-setting_update.set_size(0, 0)
-setting_update_label = lv.label(setting_update)
-setting_update_label.set_text("系统升级")
-setting_update.set_style_pad_all(0, lv.STATE.DEFAULT)
-setting_update_label.align(lv.ALIGN.LEFT_MID, 70, 0)
-setting_update_label.set_style_text_color(lv.color_make(0xff, 0xff, 0xff), lv.STATE.DEFAULT)
-setting_update_label.add_style(style_font_youyuan_20, lv.PART.MAIN | lv.STATE.DEFAULT)
-setting_update.add_style(style_btn, lv.PART.MAIN | lv.STATE.DEFAULT)
+setting_cont_y+=SETTING_ICON_OFFSET_SIZE
+
+
+setting_update_bg_img = lv.img(setting_cont)
+setting_update_bg_img.set_pos(0, setting_cont_y)
+setting_update_bg_img.set_size(TOOL_BG_ICON_W_SIZE, TOOL_BG_ICON_H_SIZE)
+setting_update_bg_img.add_flag(lv.obj.FLAG.CLICKABLE)
+setting_update_bg_img.set_src("E:/static/list_bg.png")
+setting_update_bg_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
+
 setting_update_img = lv.img(setting_cont)
-setting_update_img.set_pos(0, setting_cont_y)
-setting_update_img.set_size(232, 80)
-setting_update_img.add_flag(lv.obj.FLAG.CLICKABLE)
+setting_update_img.set_pos(8, setting_cont_y+6)
+setting_update_img.set_size(SETTING_ICON_W_SIZE, SETTING_ICON_H_SIZE)
+# setting_update_img.add_flag(lv.obj.FLAG.CLICKABLE)
 setting_update_img.set_src("E:/static/setting/menu_upgrade.png")
 setting_update_img.add_style(style_img, lv.PART.MAIN | lv.STATE.DEFAULT)
 
@@ -260,34 +238,51 @@ class SettingScreen(Screen):
     NAME = "setting"
 
     def __init__(self):
+        self.is_sliding =0
         super().__init__()
         self.meta = setting_screen
-        # setting_language.add_event_cb(lambda e: self.load_screen(e, {"screen": "language"}), lv.EVENT.CLICKED, None)
-        setting_dialswitch.add_event_cb(lambda e: EventMesh.callback_wrapper(self.load_screen(e, {"screen": "dialswitch"})), lv.EVENT.CLICKED, None)
-        # setting_themeswitch.add_event_cb(lambda e: self.load_screen(e, {"screen": "themeswitch"}), lv.EVENT.CLICKED, None)
-        setting_imei.add_event_cb(lambda e: EventMesh.callback_wrapper(self.load_screen(e, {"screen": "imei"})), lv.EVENT.CLICKED, None)
-        setting_app.add_event_cb(lambda e: EventMesh.callback_wrapper(self.load_screen(e, {"screen": "app"})), lv.EVENT.CLICKED, None)
-        setting_bright.add_event_cb(lambda e: EventMesh.callback_wrapper(self.load_screen(e, {"screen": "brightness"})), lv.EVENT.CLICKED, None)
-        setting_volume.add_event_cb(lambda e: EventMesh.callback_wrapper(self.load_screen(e, {"screen": "totalvolume"})), lv.EVENT.CLICKED, None)
-        setting_restore.add_event_cb(lambda e: EventMesh.callback_wrapper(self.load_screen(e, {"screen": "restore"})), lv.EVENT.CLICKED, None)
-        setting_poweroff.add_event_cb(lambda e: EventMesh.callback_wrapper(self.load_screen(e, {"screen": "poweroff"})), lv.EVENT.CLICKED, None)
-        setting_update.add_event_cb(lambda e: EventMesh.callback_wrapper(self.load_screen(e, {"screen": "update"})), lv.EVENT.CLICKED, None)
-        setting_version.add_event_cb(lambda e: EventMesh.callback_wrapper(self.load_screen(e, {"screen": "version"})), lv.EVENT.CLICKED, None)
 
         # img regist btton
         # setting_language.add_event_cb(lambda e: self.load_screen(e, {"screen": "language"}), lv.EVENT.CLICKED, None)
-        setting_dialswitch_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.load_screen(e, {"screen": "dialswitch"})), lv.EVENT.CLICKED, None)
+        setting_dialswitch_bg_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.setting_cb(e, "dialswitch")), lv.EVENT.CLICKED, None)
         # setting_themeswitch.add_event_cb(lambda e: self.load_screen(e, {"screen": "themeswitch"}), lv.EVENT.CLICKED, None)
-        setting_imei_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.load_screen(e, {"screen": "imei"})), lv.EVENT.CLICKED, None)
-        setting_app_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.load_screen(e, {"screen": "app"})), lv.EVENT.CLICKED, None)
-        setting_bright_img.add_event_cb(lambda e:EventMesh.callback_wrapper( self.load_screen(e, {"screen": "brightness"})), lv.EVENT.CLICKED, None)
-        setting_volume_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.load_screen(e, {"screen": "totalvolume"})), lv.EVENT.CLICKED, None)
-        setting_restore_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.load_screen(e, {"screen": "restore"})), lv.EVENT.CLICKED, None)
-        setting_poweroff_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.load_screen(e, {"screen": "poweroff"})), lv.EVENT.CLICKED, None)
-        setting_update_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.load_screen(e, {"screen": "update"})), lv.EVENT.CLICKED, None)
-        setting_version_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.load_screen(e, {"screen": "version"})), lv.EVENT.CLICKED, None)
+        setting_imei_bg_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.setting_cb(e, "imei")), lv.EVENT.CLICKED, None)
+        setting_app_bg_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.setting_cb(e, "app")), lv.EVENT.CLICKED, None)
+        setting_bright_bg_img.add_event_cb(lambda e:EventMesh.callback_wrapper( self.setting_cb(e, "brightness")), lv.EVENT.CLICKED, None)
+        setting_volume_bg_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.setting_cb(e, "totalvolume")), lv.EVENT.CLICKED, None)
+        setting_restore_bg_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.setting_cb(e, "restore")), lv.EVENT.CLICKED, None)
+        setting_poweroff_bg_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.setting_cb(e, "poweroff")), lv.EVENT.CLICKED, None)
+        setting_update_bg_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.setting_cb(e, "update")), lv.EVENT.CLICKED, None)
+        setting_version_bg_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.setting_cb(e, "version")), lv.EVENT.CLICKED, None)
+
+        setting_dialswitch_bg_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.setting_cb(e, "dialswitch")), lv.EVENT.PRESSING, None)
+        # setting_themeswitch.add_event_cb(lambda e: self.load_screen(e, {"screen": "themeswitch"}), lv.EVENT.CLICKED, None)
+        setting_imei_bg_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.setting_cb(e, "imei")), lv.EVENT.PRESSING, None)
+        setting_app_bg_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.setting_cb(e, "app")), lv.EVENT.PRESSING, None)
+        setting_bright_bg_img.add_event_cb(lambda e:EventMesh.callback_wrapper( self.setting_cb(e, "brightness")), lv.EVENT.PRESSING, None)
+        setting_volume_bg_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.setting_cb(e, "totalvolume")), lv.EVENT.PRESSING, None)
+        setting_restore_bg_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.setting_cb(e, "restore")), lv.EVENT.PRESSING, None)
+        setting_poweroff_bg_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.setting_cb(e, "poweroff")), lv.EVENT.PRESSING, None)
+        setting_update_bg_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.setting_cb(e, "update")), lv.EVENT.PRESSING, None)
+        setting_version_bg_img.add_event_cb(lambda e: EventMesh.callback_wrapper(self.setting_cb(e, "version")), lv.EVENT.PRESSING, None)
 
-    
+    def initialization(self):
+        self.is_sliding = 0
+
+    def setting_cb(self,e,msg):
+        code = e.get_code()
+        if code == lv.EVENT.PRESSING:
+            #print("PRESSING")
+            self.is_sliding += 1
+
+        elif  code == lv.EVENT.CLICKED:
+            #utime.sleep_ms(10)
+            print("1self.is_sliding",self.is_sliding)
+            if self.is_sliding <= 5 and self.is_sliding != 0:#如果是在滑动中则不需要点击事件
+                self.is_sliding = 0
+                EventMesh.publish("load_screen",  {"screen": "{}".format(msg)})
+                
+            self.is_sliding =0
 
     def done_return(self):
         EventMesh.publish("load_screen", {"screen": "main_menu"})
@@ -1044,7 +1039,7 @@ class PowerOnScreen(Screen):
                 if self.count >= 9:#在上一个界面在播放音频时切换界面则关闭 以免一直播放
                     self.count = 0
                     self.timer.stop()
-                    EventMesh.publish("load_screen", {"screen": "main_menu"})
+                    EventMesh.publish("load_screen", {"screen": "health"})
                     return
         self.count+=1