-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#234 incorporate logging library new determination. Example updates
- Loading branch information
Showing
17 changed files
with
207 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
/** | ||
* Cool blue modern theme by tcMenu organisation. This is part of the standard themes shipped with TcMenu. | ||
* This file will not be updated by the designer, you can edit. | ||
* See https://www.thecoderscorner.com/products/arduino-libraries/tc-menu/themes/rendering-with-themes-icons-grids/ | ||
*/ | ||
|
||
#ifndef THEME_COOL_BLUE | ||
#define THEME_COOL_BLUE | ||
|
||
#include <graphics/TcThemeBuilder.h> | ||
|
||
const color_t coolBlueTitlePalette[] = {RGB(0,0,0), RGB(20,132,255), RGB(192,192,192), RGB(64, 64, 64)}; | ||
const color_t coolBlueItemPalette[] = {RGB(255, 255, 255), RGB(0,64,135), RGB(20,133,255), RGB(31,100,178)}; | ||
const color_t coolBlueActionPalette[] = {RGB(255, 255, 255), RGB(0,45,120), RGB(20,133,255), RGB(31,100,178)}; | ||
|
||
#define ACTION_BORDER_WIDTH 0 | ||
#define USE_SLIDER_FOR_ANALOG true | ||
|
||
/** | ||
* This is one of the stock themes, you can modify it to meet your requirements, and it will not be updated by tcMenu | ||
* Designer unless you delete it. This sets up the fonts, spacing and padding for all items. | ||
* @param gr the graphical renderer | ||
* @param itemFont the font for items | ||
* @param titleFont the font for titles | ||
* @param needEditingIcons if editing icons are needed | ||
*/ | ||
void installCoolBlueModernTheme(GraphicsDeviceRenderer& gr, const MenuFontDef& itemFont, const MenuFontDef& titleFont, | ||
bool needEditingIcons, BaseGraphicalRenderer::TitleMode titleMode, bool useUnicode) { | ||
|
||
TcThemeBuilder themeBuilder(gr); | ||
|
||
themeBuilder.dimensionsFromRenderer() | ||
.withSelectedColors(RGB(31, 88, 100), RGB(255, 255, 255)) | ||
.withItemPadding(MenuPadding(4, 3, 4, 3)) | ||
.withTitlePadding(MenuPadding(4, 3, 4, 3)) | ||
.withRenderingSettings(titleMode, USE_SLIDER_FOR_ANALOG) | ||
.withPalette(coolBlueItemPalette) | ||
.withNativeFont(itemFont.fontData, itemFont.fontMag) | ||
.withSpacing(2); | ||
|
||
if(needEditingIcons) { | ||
themeBuilder.withStandardMedResCursorIcons(); | ||
} | ||
|
||
if(useUnicode) { | ||
themeBuilder.enableTcUnicode(); | ||
} | ||
|
||
themeBuilder.defaultItemProperties() | ||
.withJustification(GridPosition::JUSTIFY_TITLE_LEFT_VALUE_RIGHT) | ||
.apply(); | ||
|
||
themeBuilder.defaultTitleProperties() | ||
.withJustification(GridPosition::JUSTIFY_CENTER_WITH_VALUE) | ||
.withNativeFont(titleFont.fontData, titleFont.fontMag) | ||
.withPalette(coolBlueTitlePalette) | ||
.withSpacing(3) | ||
.apply(); | ||
|
||
|
||
themeBuilder.defaultActionProperties() | ||
.withJustification(GridPosition::JUSTIFY_CENTER_WITH_VALUE) | ||
.withPalette(coolBlueActionPalette) | ||
.withBorder(MenuBorder(ACTION_BORDER_WIDTH)) | ||
.apply(); | ||
|
||
themeBuilder.apply(); | ||
} | ||
|
||
#endif //THEME_COOL_BLUE |
72 changes: 0 additions & 72 deletions
72
examples/esp/espCapTouchTft/ThemeDarkModeTraditionalBuilder.h
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
#ifndef TCMENU_THEME_MONO_INVERSE | ||
#define TCMENU_THEME_MONO_INVERSE | ||
|
||
#include <graphics/TcThemeBuilder.h> | ||
|
||
color_t defaultItemPaletteMono[] = {1, 0, 1, 1}; | ||
color_t defaultTitlePaletteMono[] = {0, 1, 0, 0}; | ||
|
||
#define TITLE_PADDING 2 | ||
#define TITLE_SPACING 2 | ||
|
||
/** | ||
* This is one of the stock themes, you can modify it to meet your requirements, and it will not be updated by tcMenu | ||
* Designer unless you delete it. This sets up the fonts, spacing and padding for all items. | ||
* @param gr the graphical renderer | ||
* @param itemFont the font for items | ||
* @param titleFont the font for titles | ||
* @param needEditingIcons if editing icons are needed | ||
*/ | ||
void installMonoInverseTitleTheme(GraphicsDeviceRenderer& gr, const MenuFontDef& itemFont, const MenuFontDef& titleFont, | ||
bool needEditingIcons, BaseGraphicalRenderer::TitleMode titleMode, bool useUnicode) { | ||
|
||
// See https://tcmenu.github.io/documentation/arduino-libraries/tc-menu/themes/rendering-with-themes-icons-grids/ | ||
TcThemeBuilder themeBuilder(gr); | ||
themeBuilder.withSelectedColors(0, 2) | ||
.dimensionsFromRenderer() | ||
.withItemPadding(MenuPadding(1)) | ||
.withRenderingSettings(titleMode, false) | ||
.withPalette(defaultItemPaletteMono) | ||
.withNativeFont(itemFont.fontData, itemFont.fontMag) | ||
.withSpacing(1); | ||
|
||
if(needEditingIcons) { | ||
themeBuilder.withStandardLowResCursorIcons(); | ||
} | ||
|
||
if(useUnicode) { | ||
themeBuilder.enableTcUnicode(); | ||
} | ||
|
||
themeBuilder.defaultTitleProperties() | ||
.withNativeFont(titleFont.fontData, titleFont.fontMag) | ||
.withPalette(defaultTitlePaletteMono) | ||
.withPadding(MenuPadding(TITLE_PADDING)) | ||
.withJustification(tcgfx::GridPosition::JUSTIFY_TITLE_LEFT_WITH_VALUE) | ||
.withSpacing(TITLE_SPACING) | ||
.apply(); | ||
|
||
themeBuilder.defaultActionProperties() | ||
.withJustification(tcgfx::GridPosition::JUSTIFY_TITLE_LEFT_WITH_VALUE) | ||
.apply(); | ||
|
||
themeBuilder.defaultItemProperties() | ||
.withJustification(tcgfx::GridPosition::JUSTIFY_TITLE_LEFT_VALUE_RIGHT) | ||
.apply(); | ||
|
||
themeBuilder.apply(); | ||
} | ||
|
||
#endif //TCMENU_THEME_MONO_INVERSE |
Oops, something went wrong.