Ken Van Hoeylandt 0f12fcce53
New themes (#677)
- Implemented themes with LSS: material, material mono
- Implemented grid-based navigation
- Added new Launcher
- Updated Appearance app to add theme configuration
- Updated various apps to improve UX/UI
- Added LVGL widgets: cards, badges, chips, icon buttons
- Added support for round/rounded displays
- Added the concept of insets to LVGL and implemented it in toolbar + statusbar
- Terminal app now hides toolbar by default, but tapping the terminal toggles visibility
- File browsing now opens the configured user-data location by default
- Added missing licenses to subprojects
- Updated README.md screenshots and intro text
2026-10-07 23:00:09 +02:00

49 lines
1.4 KiB
C

// SPDX-License-Identifier: Apache-2.0
#pragma once
#include <lvgl.h>
#ifdef __cplusplus
extern "C" {
#endif
/** User-configurable theme settings */
typedef struct {
bool is_dark;
/** Use the monochrome theme, also on colour displays. Monochrome and greyscale displays always use it. */
bool is_mono;
/** Slow-refresh displays (e.g. e-paper) never show animations */
bool animations_enabled;
lv_color_t color_primary;
lv_color_t color_secondary;
lv_color_t color_error;
} LvglThemeSettings;
/**
* @brief Gets the theme settings, or the defaults when no settings were set.
* @param[out] settings the current theme settings
*/
void lvgl_theme_get_settings(LvglThemeSettings* settings);
/**
* @brief Gets the default theme settings for this device.
* @param[out] settings the default theme settings
*/
void lvgl_theme_get_default_settings(LvglThemeSettings* settings);
/**
* @brief Checks whether the active theme is the monochrome theme: on monochrome and greyscale displays, or when selected in the settings.
* @return true when the monochrome theme is active
*/
bool lvgl_theme_is_mono(void);
/**
* @brief Sets the theme settings. They are used for displays that are added afterwards, e.g. when LVGL (re)starts.
* @param[in] settings the theme settings
*/
void lvgl_theme_set_settings(const LvglThemeSettings* settings);
#ifdef __cplusplus
}
#endif