1
0
Fork 0

Fix typo in the name of the font "jetbrains_mono_extrabold_compressed" + use it as the default font.

This commit is contained in:
JF 2020-03-01 19:09:59 +01:00
parent 21375eab81
commit 5bc0640b73
7 changed files with 27 additions and 12 deletions

View file

@ -120,6 +120,17 @@ void DisplayApp::Refresh() {
if(!currentScreen->OnButtonPushed()) {
systemTask.PushMessage(System::SystemTask::Messages::GoToSleep);
}
// currentScreen.reset(nullptr);
// if(toggle) {
// modal.Show();
//// currentScreen.reset(new Screens::Tile(this));
// toggle = false;
// } else {
// modal.Hide();
//// currentScreen.reset(new Screens::Clock(this, dateTimeController, batteryController, bleController));
// toggle = true;
// }
break;
}
}

View file

@ -6,11 +6,11 @@
* Opts:
******************************************************************************/
#ifndef JETBRAINS_MONO_EXTRABOLD_COMPRESSEDEXTRABOLD_COMPRESSED
#define JETBRAINS_MONO_EXTRABOLD_COMPRESSEDEXTRABOLD_COMPRESSED 1
#ifndef JETBRAINS_MONO_EXTRABOLD_COMPRESSED
#define JETBRAINS_MONO_EXTRABOLD_COMPRESSED 1
#endif
#if JETBRAINS_MONO_EXTRABOLD_COMPRESSEDEXTRABOLD_COMPRESSED
#if JETBRAINS_MONO_EXTRABOLD_COMPRESSED
/*-----------------
* BITMAPS
@ -492,7 +492,7 @@ static lv_font_fmt_txt_dsc_t font_dsc = {
*----------------*/
/*Initialize a public general font descriptor*/
lv_font_t jetbrains_mono_extrabold_compressedextrabold_compressed = {
lv_font_t jetbrains_mono_extrabold_compressed = {
.get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt, /*Function pointer to get glyph's data*/
.get_glyph_bitmap = lv_font_get_bitmap_fmt_txt, /*Function pointer to get glyph's bitmap*/
.line_height = 60, /*The maximum line height required by the font*/
@ -503,5 +503,5 @@ lv_font_t jetbrains_mono_extrabold_compressedextrabold_compressed = {
.dsc = &font_dsc /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
};
#endif /*#if JETBRAINS_MONO_EXTRABOLD_COMPRESSEDEXTRABOLD_COMPRESSED*/
#endif /*#if JETBRAINS_MONO_EXTRABOLD_COMPRESSED*/

View file

@ -12,6 +12,11 @@
using namespace Pinetime::Components;
extern "C" {
LV_FONT_DECLARE(jetbrains_mono_extrabold_compressed)
LV_FONT_DECLARE(jetbrains_mono_bold_20)
}
static void disp_flush(lv_disp_drv_t * disp_drv, const lv_area_t * area, lv_color_t * color_p) {
auto* lvgl = static_cast<LittleVgl*>(disp_drv->user_data);
lvgl->FlushDisplay(area, color_p);
@ -135,8 +140,7 @@ void LittleVgl::InitTheme() {
}
void LittleVgl::InitBaseTheme() {
if(font == nullptr) font = LV_FONT_DEFAULT;
if(font == nullptr) font = &jetbrains_mono_bold_20;
lv_style_copy(&def, &lv_style_plain); /*Initialize the default style*/
def.text.font = font;

View file

@ -7,7 +7,7 @@
#include "../DisplayApp.h"
using namespace Pinetime::Applications::Screens;
extern lv_font_t jetbrains_mono_extrabold_compressedextrabold_compressed;
extern lv_font_t jetbrains_mono_extrabold_compressed;
extern lv_font_t jetbrains_mono_bold_20;
static void event_handler(lv_obj_t * obj, lv_event_t event) {
@ -33,7 +33,7 @@ Clock::Clock(DisplayApp* app,
labelStyle->text.font = &jetbrains_mono_bold_20;
lv_style_copy(&labelBigStyle, labelStyle);
labelBigStyle.text.font = &jetbrains_mono_extrabold_compressedextrabold_compressed;
labelBigStyle.text.font = &jetbrains_mono_extrabold_compressed;
lv_label_set_style(label_battery, LV_LABEL_STYLE_MAIN, labelStyle);

View file

@ -3,7 +3,7 @@
#include "../DisplayApp.h"
using namespace Pinetime::Applications::Screens;
extern lv_font_t jetbrains_mono_extrabold_compressedextrabold_compressed;
extern lv_font_t jetbrains_mono_extrabold_compressed;
extern lv_font_t jetbrains_mono_bold_20;

View file

@ -3,7 +3,7 @@
#include "../DisplayApp.h"
using namespace Pinetime::Applications::Screens;
extern lv_font_t jetbrains_mono_extrabold_compressedextrabold_compressed;
extern lv_font_t jetbrains_mono_extrabold_compressed;
extern lv_font_t jetbrains_mono_bold_20;

View file

@ -3,7 +3,7 @@
#include "../DisplayApp.h"
using namespace Pinetime::Applications::Screens;
extern lv_font_t jetbrains_mono_extrabold_compressedextrabold_compressed;
extern lv_font_t jetbrains_mono_extrabold_compressed;
extern lv_font_t jetbrains_mono_bold_20;
Modal::Modal(Pinetime::Applications::DisplayApp *app) : Screen(app) {