Added toolbar that goes into unsafe GUI area
This commit is contained in:
parent
b1f6f04d37
commit
667fefa3b4
3 changed files with 152 additions and 7 deletions
|
|
@ -4,6 +4,7 @@
|
|||
#include "Helpers/ConvertVec.hpp"
|
||||
#include "../GUIStuff/Elements/LayoutElement.hpp"
|
||||
#include "../GUIStuff/ElementHelpers/ButtonHelpers.hpp"
|
||||
#include "../GUIStuff/ElementHelpers/LayoutHelpers.hpp"
|
||||
#include "FileSelectScreen.hpp"
|
||||
|
||||
using namespace GUIStuff;
|
||||
|
|
@ -35,17 +36,20 @@ void PhoneDrawingProgramScreen::main_display() {
|
|||
void PhoneDrawingProgramScreen::top_toolbar() {
|
||||
auto& gui = main.g.gui;
|
||||
auto& io = gui.io;
|
||||
gui.element<LayoutElement>("top toolbar", [&](LayoutElement* l, const Clay_ElementId& lId) {
|
||||
CLAY(lId, {
|
||||
|
||||
window_fill_side_bar(gui, "top toolbar", {
|
||||
.dir = WindowFillSideBarConfig::Direction::TOP,
|
||||
.backgroundColor = io.theme->backColor0,
|
||||
.border = {
|
||||
.color = convert_vec4<Clay_Color>(io.theme->frontColor1),
|
||||
.width = {.bottom = 1}
|
||||
}
|
||||
}, [&] {
|
||||
CLAY_AUTO_ID({
|
||||
.layout = {
|
||||
.sizing = {.width = CLAY_SIZING_GROW(0), .height = CLAY_SIZING_FIT(0) },
|
||||
.childAlignment = { .x = CLAY_ALIGN_X_LEFT, .y = CLAY_ALIGN_Y_CENTER},
|
||||
.layoutDirection = CLAY_LEFT_TO_RIGHT
|
||||
},
|
||||
.backgroundColor = convert_vec4<Clay_Color>(io.theme->backColor0),
|
||||
.border = {
|
||||
.color = convert_vec4<Clay_Color>(io.theme->frontColor1),
|
||||
.width = {.bottom = 1}
|
||||
}
|
||||
}) {
|
||||
svg_icon_button(gui, "back exit button", "data/icons/RemixIcon/arrow-left-s-line.svg", {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue