Added automatically scaling GUI

This commit is contained in:
Yousef Khadadeh 2025-09-27 17:59:56 +03:00
parent 4327a73c62
commit cbd9e802c8
3 changed files with 24 additions and 4 deletions

View file

@ -199,7 +199,6 @@ void DrawingProgram::toolbar_gui() {
if(t.gui.svg_icon_button("LassoSelect Toolbar Button", "data/icons/lassoselect.svg", drawTool->get_type() == DrawingProgramToolType::LASSOSELECT)) { switch_to_tool(DrawingProgramToolType::LASSOSELECT); }
if(t.gui.svg_icon_button("Edit Toolbar Button", "data/icons/cursor.svg", drawTool->get_type() == DrawingProgramToolType::EDIT)) { switch_to_tool(DrawingProgramToolType::EDIT); }
if(t.gui.svg_icon_button("Eyedropper Toolbar Button", "data/icons/eyedropper.svg", drawTool->get_type() == DrawingProgramToolType::EYEDROPPER)) { switch_to_tool(DrawingProgramToolType::EYEDROPPER); }
if(t.gui.svg_icon_button("Screenshot Toolbar Button", "data/icons/camera.svg", drawTool->get_type() == DrawingProgramToolType::SCREENSHOT)) { switch_to_tool(DrawingProgramToolType::SCREENSHOT); }
CLAY({.layout = {.sizing = {.width = CLAY_SIZING_FIXED(40), .height = CLAY_SIZING_FIXED(40)}}}) {
if(t.gui.color_button("Foreground Color", &controls.foregroundColor, &controls.foregroundColor == t.colorLeft)) {
t.color_selector_left(&controls.foregroundColor == t.colorLeft ? nullptr : &controls.foregroundColor);