Theme system (#2164)

* Themes instead of Styles
* Colors changed to theme colors
* Reworked style management
* Theme settings app
* warn, menu dual set
* Added Aqua style
This commit is contained in:
Totoo 2024-05-27 21:02:52 +02:00 committed by GitHub
parent a8203a6372
commit ced8012783
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
143 changed files with 1566 additions and 1154 deletions

View file

@ -26,7 +26,6 @@
#include "ui.hpp"
#include "ui_navigation.hpp"
#include "ui_painter.hpp"
#include "ui_styles.hpp"
#include "ui_widget.hpp"
#include "app_settings.hpp"
@ -159,61 +158,61 @@ class TextEditorMenu : public View {
Rectangle rect_frame{
{0 * 8, 0 * 8, 23 * 8, 23 * 8},
Color::dark_grey()};
Theme::getInstance()->fg_dark->foreground};
NewButton button_home{
{1 * 8, 1 * 8, 7 * 8, 7 * 8},
"Home",
&bitmap_arrow_left,
Color::dark_grey()};
Theme::getInstance()->fg_dark->foreground};
NewButton button_end{
{8 * 8, 1 * 8, 7 * 8, 7 * 8},
"End",
&bitmap_arrow_right,
Color::dark_grey()};
Theme::getInstance()->fg_dark->foreground};
NewButton button_zoom{
{15 * 8, 1 * 8, 7 * 8, 7 * 8},
"Zoom",
&bitmap_icon_search,
Color::orange()};
Theme::getInstance()->fg_orange->foreground};
NewButton button_delline{
{1 * 8, 8 * 8, 7 * 8, 7 * 8},
"-Line",
&bitmap_icon_delete,
Color::dark_red()};
Theme::getInstance()->fg_red->foreground};
NewButton button_edit{
{8 * 8, 8 * 8, 7 * 8, 7 * 8},
"Edit",
&bitmap_icon_rename,
Color::dark_blue()};
Theme::getInstance()->fg_blue->foreground};
NewButton button_addline{
{15 * 8, 8 * 8, 7 * 8, 7 * 8},
"+Line",
&bitmap_icon_scanner,
Color::dark_blue()};
Theme::getInstance()->fg_blue->foreground};
NewButton button_open{
{1 * 8, 15 * 8, 7 * 8, 7 * 8},
"Open",
&bitmap_icon_load,
Color::green()};
Theme::getInstance()->fg_green->foreground};
NewButton button_save{
{8 * 8, 15 * 8, 7 * 8, 7 * 8},
"Save",
&bitmap_icon_save,
Color::green()};
Theme::getInstance()->fg_green->foreground};
NewButton button_exit{
{15 * 8, 15 * 8, 7 * 8, 7 * 8},
"Exit",
&bitmap_icon_previous,
Color::dark_red()};
Theme::getInstance()->fg_red->foreground};
};
/* View viewing and minor edits on a text file. */
@ -269,7 +268,7 @@ class TextEditorView : public View {
{26 * 8, 34 * 8, 4 * 8, 4 * 8},
{},
&bitmap_icon_controls,
Color::dark_grey(),
Theme::getInstance()->bg_dark->background,
/*vcenter*/ true};
Text text_position{