Switch to dark theme (#278)
This commit is contained in:
@@ -101,6 +101,8 @@ public:
|
||||
lv_dropdown_set_options(uartDropdown, uart_options.c_str());
|
||||
lv_obj_align(uartDropdown, LV_ALIGN_TOP_RIGHT, 0, 0);
|
||||
lv_obj_set_width(uartDropdown, LV_PCT(50));
|
||||
lv_obj_set_style_border_color(uartDropdown, lv_color_hex(0xFAFAFA), LV_PART_MAIN);
|
||||
lv_obj_set_style_border_width(uartDropdown, 1, LV_PART_MAIN);
|
||||
|
||||
auto* uart_label = lv_label_create(uart_wrapper);
|
||||
lv_obj_align(uart_label, LV_ALIGN_TOP_LEFT, 0, 10);
|
||||
@@ -121,6 +123,8 @@ public:
|
||||
lv_dropdown_set_options(modelDropdown, model_options.c_str());
|
||||
lv_obj_align(modelDropdown, LV_ALIGN_TOP_RIGHT, 0, 0);
|
||||
lv_obj_set_width(modelDropdown, LV_PCT(50));
|
||||
lv_obj_set_style_border_color(modelDropdown, lv_color_hex(0xFAFAFA), LV_PART_MAIN);
|
||||
lv_obj_set_style_border_width(modelDropdown, 1, LV_PART_MAIN);
|
||||
|
||||
auto* model_label = lv_label_create(model_wrapper);
|
||||
lv_obj_align(model_label, LV_ALIGN_TOP_LEFT, 0, 10);
|
||||
@@ -139,6 +143,8 @@ public:
|
||||
lv_dropdown_set_options(baudDropdown, baudRatesDropdownValues);
|
||||
lv_obj_align(baudDropdown, LV_ALIGN_TOP_RIGHT, 0, 0);
|
||||
lv_obj_set_width(baudDropdown, LV_PCT(50));
|
||||
lv_obj_set_style_border_color(baudDropdown, lv_color_hex(0xFAFAFA), LV_PART_MAIN);
|
||||
lv_obj_set_style_border_width(baudDropdown, 1, LV_PART_MAIN);
|
||||
|
||||
auto* baud_rate_label = lv_label_create(baud_wrapper);
|
||||
lv_obj_align(baud_rate_label, LV_ALIGN_TOP_LEFT, 0, 10);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include <Tactility/app/AppManifest.h>
|
||||
#include <Tactility/lvgl/Toolbar.h>
|
||||
#include <Tactility/Assets.h>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <lvgl.h>
|
||||
@@ -208,6 +209,7 @@ class CalculatorApp : public App {
|
||||
lv_obj_set_style_pad_row(btnm, 10, LV_PART_MAIN);
|
||||
lv_obj_set_style_pad_column(btnm, 5, LV_PART_MAIN);
|
||||
lv_obj_set_style_border_width(btnm, 0, LV_PART_MAIN);
|
||||
lv_obj_set_style_bg_color(btnm, lv_palette_main(LV_PALETTE_BLUE), LV_PART_ITEMS);
|
||||
|
||||
lv_obj_set_style_border_width(btnm, 0, LV_PART_MAIN);
|
||||
if (lv_display_get_horizontal_resolution(nullptr) <= 240 || lv_display_get_vertical_resolution(nullptr) <= 240) { //small screens
|
||||
@@ -224,6 +226,7 @@ class CalculatorApp : public App {
|
||||
extern const AppManifest manifest = {
|
||||
.id = "Calculator",
|
||||
.name = "Calculator",
|
||||
.icon = TT_ASSETS_APP_ICON_CALCULATOR,
|
||||
.createApp = create<CalculatorApp>
|
||||
};
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
#include <Tactility/app/AppManifest.h>
|
||||
#include <Tactility/lvgl/Toolbar.h>
|
||||
#include <Tactility/Assets.h>
|
||||
#include <Tactility/service/espnow/EspNow.h>
|
||||
|
||||
#include "Tactility/service/gui/Gui.h"
|
||||
@@ -115,7 +116,7 @@ public:
|
||||
msg_list = lv_list_create(parent);
|
||||
lv_obj_set_size(msg_list, lv_pct(75), lv_pct(43));
|
||||
lv_obj_align(msg_list, LV_ALIGN_TOP_LEFT, 5, toolbar_height + 45);
|
||||
lv_obj_set_style_bg_color(msg_list, lv_color_hex(0xEEEEEE), 0);
|
||||
lv_obj_set_style_bg_color(msg_list, lv_color_hex(0x262626), 0);
|
||||
lv_obj_set_style_border_width(msg_list, 1, 0);
|
||||
lv_obj_set_style_pad_all(msg_list, 5, 0);
|
||||
|
||||
@@ -171,6 +172,7 @@ public:
|
||||
extern const AppManifest manifest = {
|
||||
.id = "Chat",
|
||||
.name = "Chat",
|
||||
.icon = TT_ASSETS_APP_ICON_CHAT,
|
||||
.createApp = create<ChatApp>
|
||||
};
|
||||
|
||||
|
||||
@@ -185,6 +185,8 @@ public:
|
||||
}
|
||||
|
||||
lv_obj_align(orientation_dropdown, LV_ALIGN_TOP_RIGHT, 0, 0);
|
||||
lv_obj_set_style_border_color(orientation_dropdown, lv_color_hex(0xFAFAFA), LV_PART_MAIN);
|
||||
lv_obj_set_style_border_width(orientation_dropdown, 1, LV_PART_MAIN);
|
||||
lv_obj_add_event_cb(orientation_dropdown, onOrientationSet, LV_EVENT_VALUE_CHANGED, nullptr);
|
||||
uint32_t orientation_selected = displayOrientationToOrientationSetting(
|
||||
lv_display_get_rotation(lv_display_get_default())
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "Tactility/service/loader/Loader.h"
|
||||
#include "Tactility/lvgl/Toolbar.h"
|
||||
|
||||
#include <Tactility/Assets.h>
|
||||
#include <Tactility/app/gpio/GpioHal.h>
|
||||
#include <Tactility/lvgl/LvglSync.h>
|
||||
#include <Tactility/Mutex.h>
|
||||
@@ -170,6 +170,7 @@ void GpioApp::onHide(AppContext& app) {
|
||||
extern const AppManifest manifest = {
|
||||
.id = "Gpio",
|
||||
.name = "GPIO",
|
||||
.icon = TT_ASSETS_APP_ICON_GPIO,
|
||||
.type = Type::System,
|
||||
.createApp = create<GpioApp>
|
||||
};
|
||||
|
||||
@@ -125,6 +125,8 @@ void I2cScannerApp::onShow(AppContext& app, lv_obj_t* parent) {
|
||||
lv_dropdown_set_options(port_dropdown, dropdown_items.c_str());
|
||||
lv_obj_set_width(port_dropdown, LV_PCT(48));
|
||||
lv_obj_align(port_dropdown, LV_ALIGN_TOP_RIGHT, 0, 0);
|
||||
lv_obj_set_style_border_color(port_dropdown, lv_color_hex(0xFAFAFA), LV_PART_MAIN);
|
||||
lv_obj_set_style_border_width(port_dropdown, 1, LV_PART_MAIN);
|
||||
lv_obj_add_event_cb(port_dropdown, onSelectBusCallback, LV_EVENT_VALUE_CHANGED, this);
|
||||
auto selected_bus = getLastBusIndex();
|
||||
lv_dropdown_set_selected(port_dropdown, selected_bus);
|
||||
|
||||
@@ -30,7 +30,7 @@ static lv_obj_t* createAppButton(lv_obj_t* parent, const char* title, const char
|
||||
lv_obj_set_style_pad_bottom(apps_button, 16, 0);
|
||||
lv_obj_set_style_shadow_width(apps_button, 0, 0);
|
||||
lv_obj_set_style_border_width(apps_button, 0, 0);
|
||||
lv_obj_set_style_bg_color(apps_button, lv_color_white(), 0);
|
||||
lv_obj_set_style_bg_opa(apps_button, 0, LV_PART_MAIN);
|
||||
|
||||
auto* button_image = lv_image_create(apps_button);
|
||||
lv_image_set_src(button_image, imageFile);
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include <Tactility/file/File.h>
|
||||
#include <Tactility/lvgl/Keyboard.h>
|
||||
#include <Tactility/lvgl/Toolbar.h>
|
||||
#include <Tactility/Assets.h>
|
||||
#include <lvgl.h>
|
||||
|
||||
#include <dirent.h>
|
||||
@@ -343,6 +344,8 @@ class NotesApp : public App {
|
||||
lv_dropdown_set_text(uiDropDownMenu, "Menu");
|
||||
lv_dropdown_set_symbol(uiDropDownMenu, LV_SYMBOL_DOWN);
|
||||
lv_dropdown_set_selected_highlight(uiDropDownMenu, false);
|
||||
lv_obj_set_style_border_color(uiDropDownMenu, lv_color_hex(0xFAFAFA), LV_PART_MAIN);
|
||||
lv_obj_set_style_border_width(uiDropDownMenu, 1, LV_PART_MAIN);
|
||||
lv_obj_align(uiDropDownMenu, LV_ALIGN_RIGHT_MID, 0, 0);
|
||||
lv_obj_add_event_cb(uiDropDownMenu, [](lv_event_t* e) {
|
||||
auto *self = static_cast<NotesApp *>(lv_event_get_user_data(e));
|
||||
@@ -363,13 +366,13 @@ class NotesApp : public App {
|
||||
lv_obj_set_width(uiNoteText, LV_PCT(100));
|
||||
lv_obj_set_height(uiNoteText, LV_PCT(86));
|
||||
lv_textarea_set_password_mode(uiNoteText, false);
|
||||
lv_obj_set_style_bg_color(uiNoteText, lv_color_make(254, 255, 156), LV_PART_MAIN);
|
||||
lv_textarea_set_text(uiNoteText, "This is some random notes\nHere's some more notes!\nThis is some random notes\nHere's some more notes!");
|
||||
lv_obj_set_style_bg_color(uiNoteText, lv_color_hex(0x262626), LV_PART_MAIN);
|
||||
lv_textarea_set_placeholder_text(uiNoteText, "Notes...");
|
||||
|
||||
lv_obj_t* footer = lv_obj_create(wrapper);
|
||||
lv_obj_set_flex_flow(footer, LV_FLEX_FLOW_ROW);
|
||||
lv_obj_set_flex_align(footer, LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_CENTER, LV_FLEX_ALIGN_CENTER);
|
||||
lv_obj_set_style_bg_color(footer, lv_color_make(206, 206, 206), LV_PART_MAIN);
|
||||
lv_obj_set_style_bg_color(footer, lv_color_hex(0x262626), LV_PART_MAIN);
|
||||
lv_obj_set_width(footer, LV_PCT(100));
|
||||
lv_obj_set_height(footer, LV_PCT(14));
|
||||
lv_obj_set_style_pad_all(footer, 0, LV_PART_MAIN);
|
||||
@@ -395,6 +398,7 @@ class NotesApp : public App {
|
||||
extern const AppManifest manifest = {
|
||||
.id = "Notes",
|
||||
.name = "Notes",
|
||||
.icon = TT_ASSETS_APP_ICON_NOTES,
|
||||
.createApp = create<NotesApp>
|
||||
};
|
||||
} // namespace tt::app::notes
|
||||
@@ -168,6 +168,8 @@ void ScreenshotApp::createModeSettingWidgets(lv_obj_t* parent) {
|
||||
modeDropdown = lv_dropdown_create(mode_wrapper);
|
||||
lv_dropdown_set_options(modeDropdown, "Timer\nApp start");
|
||||
lv_obj_align_to(modeDropdown, mode_label, LV_ALIGN_OUT_RIGHT_MID, 8, 0);
|
||||
lv_obj_set_style_border_color(modeDropdown, lv_color_hex(0xFAFAFA), LV_PART_MAIN);
|
||||
lv_obj_set_style_border_width(modeDropdown, 1, LV_PART_MAIN);
|
||||
lv_obj_add_event_cb(modeDropdown, onModeSetCallback, LV_EVENT_VALUE_CHANGED, nullptr);
|
||||
service::screenshot::Mode mode = service->getMode();
|
||||
if (mode == service::screenshot::Mode::Apps) {
|
||||
|
||||
Reference in New Issue
Block a user