| 726 | } |
| 727 | |
| 728 | void PhoneDrawingProgramScreen::default_bottom_toolbar() { |
| 729 | auto& gui = main.g.gui; |
| 730 | auto& io = gui.io; |
| 731 | CLAY_AUTO_ID({ |
| 732 | .layout = { |
| 733 | .sizing = {.width = CLAY_SIZING_FIT(0), .height = CLAY_SIZING_FIT(0) }, |
| 734 | .childGap = io.theme->childGap1, |
| 735 | .childAlignment = { .x = CLAY_ALIGN_X_LEFT, .y = CLAY_ALIGN_Y_BOTTOM}, |
| 736 | .layoutDirection = CLAY_TOP_TO_BOTTOM |
| 737 | } |
| 738 | }) { |
| 739 | CLAY_AUTO_ID({ |
| 740 | .layout = { |
| 741 | .sizing = {.width = CLAY_SIZING_GROW(0), .height = CLAY_SIZING_FIT(0) }, |
| 742 | .childAlignment = { .x = CLAY_ALIGN_X_LEFT, .y = CLAY_ALIGN_Y_BOTTOM}, |
| 743 | .layoutDirection = CLAY_LEFT_TO_RIGHT |
| 744 | } |
| 745 | }) { |
| 746 | switch(settingsMenuPopup) { |
| 747 | case SettingsMenuPopup::NONE: |
| 748 | reset_color_picker_popup_data(); |
| 749 | colorPickerPtr = nullptr; |
| 750 | break; |
| 751 | case SettingsMenuPopup::SETTINGS: |
| 752 | if(colorPickerPtr != &backgroundColorTemporary) |
| 753 | colorPickerPtr = main.world->drawProg.color_picker_color(colorPickerPtr); |
| 754 | if(colorPickerPtr) { |
| 755 | if(colorPickerPopupData.screenType == ColorPickerPopupData::ScreenType::NORMAL) { |
| 756 | CLAY_AUTO_ID({ |
| 757 | .layout = { |
| 758 | .sizing = {.width = CLAY_SIZING_GROW(0), .height = CLAY_SIZING_FIT(0) }, |
| 759 | } |
| 760 | }) {} |
| 761 | } |
| 762 | color_settings_popup(colorPickerPtr, colorPickerData, [&] { |
| 763 | colorPickerPtr = nullptr; |
| 764 | }); |
| 765 | } |
| 766 | else { |
| 767 | CLAY_AUTO_ID({ |
| 768 | .layout = { |
| 769 | .sizing = {.width = CLAY_SIZING_GROW(0), .height = CLAY_SIZING_FIT(0) }, |
| 770 | } |
| 771 | }) {} |
| 772 | reset_color_picker_popup_data(); |
| 773 | tool_settings_popup(); |
| 774 | } |
| 775 | break; |
| 776 | case SettingsMenuPopup::COLOR_CHANGE: |
| 777 | if(colorPickerPopupData.screenType == ColorPickerPopupData::ScreenType::NORMAL) { |
| 778 | CLAY_AUTO_ID({ |
| 779 | .layout = { |
| 780 | .sizing = {.width = CLAY_SIZING_GROW(0), .height = CLAY_SIZING_FIT(0) }, |
| 781 | } |
| 782 | }) {} |
| 783 | } |
| 784 | color_settings_popup(colorPickerPtr, colorPickerData, nullptr); |
| 785 | break; |
nothing calls this directly
no test coverage detected