Fix naming
This commit is contained in:
parent
479a3aca5d
commit
925b56d16e
5 changed files with 14 additions and 14 deletions
|
|
@ -16,7 +16,7 @@
|
|||
* Static variables
|
||||
*/
|
||||
|
||||
static ul_theme current_theme;
|
||||
static bb_theme current_theme;
|
||||
static lv_theme_t lv_theme;
|
||||
|
||||
static struct {
|
||||
|
|
@ -55,7 +55,7 @@ static bool are_styles_initialised = false;
|
|||
*
|
||||
* @param theme theme to derive the styles from
|
||||
*/
|
||||
static void init_styles(const ul_theme *theme);
|
||||
static void init_styles(const bb_theme *theme);
|
||||
|
||||
/**
|
||||
* Initialise or reset a style.
|
||||
|
|
@ -84,7 +84,7 @@ static void keyboard_draw_task_added_cb(lv_event_t *event);
|
|||
* Static functions
|
||||
*/
|
||||
|
||||
static void init_styles(const ul_theme *theme) {
|
||||
static void init_styles(const bb_theme *theme) {
|
||||
reset_style(&(styles.widget));
|
||||
lv_style_set_text_font(&(styles.widget), &font_32);
|
||||
|
||||
|
|
@ -369,7 +369,7 @@ void bb_theme_prepare_keyboard(lv_obj_t *keyboard) {
|
|||
lv_obj_add_flag(keyboard, LV_OBJ_FLAG_SEND_DRAW_TASK_EVENTS);
|
||||
}
|
||||
|
||||
void bb_theme_apply(const ul_theme *theme) {
|
||||
void bb_theme_apply(const bb_theme *theme) {
|
||||
if (!theme) {
|
||||
bb_log(BB_LOG_LEVEL_ERROR, "Could not apply theme from NULL pointer");
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ typedef struct {
|
|||
bb_theme_label label;
|
||||
bb_theme_msgbox msgbox;
|
||||
bb_theme_bar bar;
|
||||
} ul_theme;
|
||||
} bb_theme;
|
||||
|
||||
/**
|
||||
* Prepare a keyboard widget to be themed with a theme.
|
||||
|
|
@ -186,6 +186,6 @@ void bb_theme_prepare_keyboard(lv_obj_t *keyboard);
|
|||
*
|
||||
* @param theme the theme to apply
|
||||
*/
|
||||
void bb_theme_apply(const ul_theme *theme);
|
||||
void bb_theme_apply(const bb_theme *theme);
|
||||
|
||||
#endif /* BB_THEME_H */
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
|
||||
/* Breezy light (based on KDE Breeze color palette, see https://develop.kde.org/hig/style/color/default/) */
|
||||
static const ul_theme bb_themes_breezy_light = {
|
||||
static const bb_theme bb_themes_breezy_light = {
|
||||
.name = "breezy-light",
|
||||
.window = {
|
||||
.bg_color = 0xeff0f1
|
||||
|
|
@ -174,7 +174,7 @@ static const ul_theme bb_themes_breezy_light = {
|
|||
|
||||
|
||||
/* Breezy dark (based on KDE Breeze Dark color palette, see https://develop.kde.org/hig/style/color/dark/) */
|
||||
static const ul_theme bb_themes_breezy_dark = {
|
||||
static const bb_theme bb_themes_breezy_dark = {
|
||||
.name = "breezy-dark",
|
||||
.window = {
|
||||
.bg_color = 0x31363b
|
||||
|
|
@ -331,7 +331,7 @@ static const ul_theme bb_themes_breezy_dark = {
|
|||
};
|
||||
|
||||
/* pmOS light (based on palette https://coolors.co/009900-395e66-db504a-e3b505-ebf5ee) */
|
||||
static const ul_theme bb_themes_pmos_light = {
|
||||
static const bb_theme bb_themes_pmos_light = {
|
||||
.name = "pmos-light",
|
||||
.window = {
|
||||
.bg_color = 0xf2f7f8,
|
||||
|
|
@ -488,7 +488,7 @@ static const ul_theme bb_themes_pmos_light = {
|
|||
};
|
||||
|
||||
/* pmOS dark (based on palette https://coolors.co/009900-395e66-db504a-e3b505-ebf5ee) */
|
||||
static const ul_theme bb_themes_pmos_dark = {
|
||||
static const bb_theme bb_themes_pmos_dark = {
|
||||
.name = "pmos-dark",
|
||||
.window = {
|
||||
.bg_color = 0x070c0d
|
||||
|
|
@ -649,7 +649,7 @@ static const ul_theme bb_themes_pmos_dark = {
|
|||
*/
|
||||
|
||||
const int bb_themes_num_themes = 4;
|
||||
const ul_theme *bb_themes_themes[] = {
|
||||
const bb_theme *bb_themes_themes[] = {
|
||||
&bb_themes_breezy_light,
|
||||
&bb_themes_breezy_dark,
|
||||
&bb_themes_pmos_light,
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ typedef enum {
|
|||
|
||||
/* Themes */
|
||||
extern const int bb_themes_num_themes;
|
||||
extern const ul_theme *bb_themes_themes[];
|
||||
extern const bb_theme *bb_themes_themes[];
|
||||
|
||||
/**
|
||||
* Find the first theme with a given name.
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ static void set_theme(bool is_alternate);
|
|||
*
|
||||
* @param is_alternate true if the alternate theme should be selected, false if the default theme should be selected
|
||||
*/
|
||||
static const ul_theme * get_theme(bool is_alternate);
|
||||
static const bb_theme * get_theme(bool is_alternate);
|
||||
|
||||
/**
|
||||
* Handle LV_EVENT_CLICKED events from the show/hide password toggle button.
|
||||
|
|
@ -223,7 +223,7 @@ static void set_theme(bool is_alternate) {
|
|||
bb_theme_apply(get_theme(is_alternate));
|
||||
}
|
||||
|
||||
static const ul_theme * get_theme(bool is_alternate) {
|
||||
static const bb_theme * get_theme(bool is_alternate) {
|
||||
return bb_themes_themes[is_alternate ? conf_opts.theme.alternate_id : conf_opts.theme.default_id];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue