Просмотр исходного кода

[FL-2249] Bluetooth: update status bar icon #985

あく 3 лет назад
Родитель
Сommit
2876499c4f

+ 4 - 4
applications/bt/bt_service/bt.c

@@ -16,9 +16,9 @@ static void bt_draw_statusbar_callback(Canvas* canvas, void* context) {
 
     Bt* bt = context;
     if(bt->status == BtStatusAdvertising) {
-        canvas_draw_icon(canvas, 0, 0, &I_Bluetooth_5x8);
+        canvas_draw_icon(canvas, 0, 0, &I_Bluetooth_Idle_5x8);
     } else if(bt->status == BtStatusConnected) {
-        canvas_draw_icon(canvas, 0, 0, &I_BT_Pair_9x8);
+        canvas_draw_icon(canvas, 0, 0, &I_Bluetooth_Connected_16x8);
     }
 }
 
@@ -257,10 +257,10 @@ static void bt_on_key_storage_change_callback(uint8_t* addr, uint16_t size, void
 
 static void bt_statusbar_update(Bt* bt) {
     if(bt->status == BtStatusAdvertising) {
-        view_port_set_width(bt->statusbar_view_port, icon_get_width(&I_Bluetooth_5x8));
+        view_port_set_width(bt->statusbar_view_port, icon_get_width(&I_Bluetooth_Idle_5x8));
         view_port_enabled_set(bt->statusbar_view_port, true);
     } else if(bt->status == BtStatusConnected) {
-        view_port_set_width(bt->statusbar_view_port, icon_get_width(&I_BT_Pair_9x8));
+        view_port_set_width(bt->statusbar_view_port, icon_get_width(&I_Bluetooth_Connected_16x8));
         view_port_enabled_set(bt->statusbar_view_port, true);
     } else {
         view_port_enabled_set(bt->statusbar_view_port, false);

+ 7 - 7
assets/compiled/assets_icons.c

@@ -525,9 +525,6 @@ const uint8_t *_I_Cry_dolph_55x52[] = {_I_Cry_dolph_55x52_0};
 const uint8_t _I_Attention_5x8_0[] = {0x00,0x0E,0x0A,0x0A,0x0A,0x0E,0x04,0x00,0x0E,};
 const uint8_t *_I_Attention_5x8[] = {_I_Attention_5x8_0};
 
-const uint8_t _I_BT_Pair_9x8_0[] = {0x00,0x11,0x01,0x35,0x00,0x58,0x01,0x31,0x00,0x30,0x01,0x59,0x00,0x34,0x01,0x11,0x01,};
-const uint8_t *_I_BT_Pair_9x8[] = {_I_BT_Pair_9x8_0};
-
 const uint8_t _I_Background_128x11_0[] = {0x01,0x00,0x70,0x00,0xff,0x40,0x40,0xc9,0xe0,0xff,0x80,0x06,0x1e,0x08,0x38,0x0c,0x0c,0x1e,0x93,0x00,0x19,0x46,0x01,0x07,0x7d,0x83,0x03,0xd2,0x31,0xff,0xdb,0xd5,0x66,0x20,0x83,0xc0,0xff,0x05,0x24,0x00,0x1c,0x78,0x28,0xbc,0x40,0x72,0xbf,0xcf,0x47,0xeb,0x40,0xdb,0x7a,0xbf,0xf0,0x40,0x39,0x60,0x28,0x3f,0xe0,0xa0,0xea,0x80,0x63,0x3f,0x0b,0x17,0xe4,0x3e,0x5a,0xbc,0xf9,0x99,0x70,0x1f,0x81,0x50,0xc0,0x80,0xe7,0x3e,0x1e,0x9d,0x57,0xfb,0x7f,0x23,0x15,0xb0,0x12,0x5b,0x5b,0x02,0x1d,0x8c,0xc3,0x80,0x24,0x9e,0x03,0x80,0x5e,0x40,0x00,0xa1,0x88,0x0e,0x98,0x00,0x7b,0x07,0x08,0xb2,0x44,0x41,};
 const uint8_t *_I_Background_128x11[] = {_I_Background_128x11_0};
 
@@ -540,8 +537,11 @@ const uint8_t *_I_Battery_19x8[] = {_I_Battery_19x8_0};
 const uint8_t _I_Battery_26x8_0[] = {0x01,0x00,0x13,0x00,0xff,0x7f,0xef,0xf0,0x08,0x0c,0x03,0x00,0x03,0x38,0x18,0x0c,0xa0,0x40,0x36,0x05,0x98,0x6d,0x00,};
 const uint8_t *_I_Battery_26x8[] = {_I_Battery_26x8_0};
 
-const uint8_t _I_Bluetooth_5x8_0[] = {0x00,0x04,0x0D,0x16,0x0C,0x0C,0x16,0x0D,0x04,};
-const uint8_t *_I_Bluetooth_5x8[] = {_I_Bluetooth_5x8_0};
+const uint8_t _I_Bluetooth_Connected_16x8_0[] = {0x00,0x04,0x00,0x0D,0x00,0x16,0x60,0x4C,0x97,0x4C,0x97,0x16,0x60,0x0D,0x00,0x04,0x00,};
+const uint8_t *_I_Bluetooth_Connected_16x8[] = {_I_Bluetooth_Connected_16x8_0};
+
+const uint8_t _I_Bluetooth_Idle_5x8_0[] = {0x00,0x04,0x0D,0x16,0x0C,0x0C,0x16,0x0D,0x04,};
+const uint8_t *_I_Bluetooth_Idle_5x8[] = {_I_Bluetooth_Idle_5x8_0};
 
 const uint8_t _I_Charging_lightning_9x10_0[] = {0x00,0x40,0x01,0xA0,0x00,0x50,0x00,0xE8,0x01,0x84,0x00,0x42,0x00,0x2F,0x00,0x14,0x00,0x0A,0x00,0x05,0x00,};
 const uint8_t *_I_Charging_lightning_9x10[] = {_I_Charging_lightning_9x10_0};
@@ -753,12 +753,12 @@ const Icon I_SDError_43x35 = {.width=43,.height=35,.frame_count=1,.frame_rate=0,
 const Icon I_SDQuestion_35x43 = {.width=35,.height=43,.frame_count=1,.frame_rate=0,.frames=_I_SDQuestion_35x43};
 const Icon I_Cry_dolph_55x52 = {.width=55,.height=52,.frame_count=1,.frame_rate=0,.frames=_I_Cry_dolph_55x52};
 const Icon I_Attention_5x8 = {.width=5,.height=8,.frame_count=1,.frame_rate=0,.frames=_I_Attention_5x8};
-const Icon I_BT_Pair_9x8 = {.width=9,.height=8,.frame_count=1,.frame_rate=0,.frames=_I_BT_Pair_9x8};
 const Icon I_Background_128x11 = {.width=128,.height=11,.frame_count=1,.frame_rate=0,.frames=_I_Background_128x11};
 const Icon I_BadUsb_9x8 = {.width=9,.height=8,.frame_count=1,.frame_rate=0,.frames=_I_BadUsb_9x8};
 const Icon I_Battery_19x8 = {.width=19,.height=8,.frame_count=1,.frame_rate=0,.frames=_I_Battery_19x8};
 const Icon I_Battery_26x8 = {.width=26,.height=8,.frame_count=1,.frame_rate=0,.frames=_I_Battery_26x8};
-const Icon I_Bluetooth_5x8 = {.width=5,.height=8,.frame_count=1,.frame_rate=0,.frames=_I_Bluetooth_5x8};
+const Icon I_Bluetooth_Connected_16x8 = {.width=16,.height=8,.frame_count=1,.frame_rate=0,.frames=_I_Bluetooth_Connected_16x8};
+const Icon I_Bluetooth_Idle_5x8 = {.width=5,.height=8,.frame_count=1,.frame_rate=0,.frames=_I_Bluetooth_Idle_5x8};
 const Icon I_Charging_lightning_9x10 = {.width=9,.height=10,.frame_count=1,.frame_rate=0,.frames=_I_Charging_lightning_9x10};
 const Icon I_Charging_lightning_mask_9x10 = {.width=9,.height=10,.frame_count=1,.frame_rate=0,.frames=_I_Charging_lightning_mask_9x10};
 const Icon I_Lock_8x8 = {.width=8,.height=8,.frame_count=1,.frame_rate=0,.frames=_I_Lock_8x8};

+ 2 - 2
assets/compiled/assets_icons.h

@@ -136,12 +136,12 @@ extern const Icon I_SDError_43x35;
 extern const Icon I_SDQuestion_35x43;
 extern const Icon I_Cry_dolph_55x52;
 extern const Icon I_Attention_5x8;
-extern const Icon I_BT_Pair_9x8;
 extern const Icon I_Background_128x11;
 extern const Icon I_BadUsb_9x8;
 extern const Icon I_Battery_19x8;
 extern const Icon I_Battery_26x8;
-extern const Icon I_Bluetooth_5x8;
+extern const Icon I_Bluetooth_Connected_16x8;
+extern const Icon I_Bluetooth_Idle_5x8;
 extern const Icon I_Charging_lightning_9x10;
 extern const Icon I_Charging_lightning_mask_9x10;
 extern const Icon I_Lock_8x8;

BIN
assets/icons/StatusBar/BT_Pair_9x8.png


BIN
assets/icons/StatusBar/Bluetooth_Connected_16x8.png


+ 0 - 0
assets/icons/StatusBar/Bluetooth_5x8.png → assets/icons/StatusBar/Bluetooth_Idle_5x8.png