Fixed some layout problems
This commit is contained in:
parent
2ad5684594
commit
2abe7271a8
3 changed files with 13 additions and 1 deletions
|
|
@ -20,6 +20,7 @@ void RotateWheel::layout(double* rotateAngle, const std::function<void()>& onCha
|
||||||
.layout = {
|
.layout = {
|
||||||
.sizing = {.width = CLAY_SIZING_GROW(0), .height = CLAY_SIZING_GROW(0)}
|
.sizing = {.width = CLAY_SIZING_GROW(0), .height = CLAY_SIZING_GROW(0)}
|
||||||
},
|
},
|
||||||
|
.aspectRatio = {1.0f},
|
||||||
.custom = { .customData = this }
|
.custom = { .customData = this }
|
||||||
}) {
|
}) {
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -237,7 +237,7 @@ void GUIManager::set_to_layout() {
|
||||||
void GUIManager::layout_if_necessary() {
|
void GUIManager::layout_if_necessary() {
|
||||||
if(setToLayout) {
|
if(setToLayout) {
|
||||||
layout();
|
layout();
|
||||||
setToLayout = false;
|
setToLayout = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -667,6 +667,7 @@ void Toolbar::top_toolbar() {
|
||||||
bool layerMenuPopUpJustOpen = false;
|
bool layerMenuPopUpJustOpen = false;
|
||||||
auto icon_button_top_toolbar = [&](const char* id, const std::string& svgPath, bool isSelected, const std::function<void()>& onClick) {
|
auto icon_button_top_toolbar = [&](const char* id, const std::string& svgPath, bool isSelected, const std::function<void()>& onClick) {
|
||||||
svg_icon_button(gui, id, svgPath, {
|
svg_icon_button(gui, id, svgPath, {
|
||||||
|
.drawType = SelectableButton::DrawType::TRANSPARENT_ALL,
|
||||||
.isSelected = isSelected,
|
.isSelected = isSelected,
|
||||||
.onClick = onClick
|
.onClick = onClick
|
||||||
});
|
});
|
||||||
|
|
@ -679,6 +680,16 @@ void Toolbar::top_toolbar() {
|
||||||
menuPopUpJustOpen = true;
|
menuPopUpJustOpen = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// Temporary gap between buttons while tab list is being fixed
|
||||||
|
CLAY_AUTO_ID({
|
||||||
|
.layout = {
|
||||||
|
.sizing = {.width = CLAY_SIZING_GROW(0), .height = CLAY_SIZING_FIT(0) },
|
||||||
|
}
|
||||||
|
}) { }
|
||||||
|
|
||||||
|
|
||||||
//std::vector<std::pair<std::string, std::string>> tabNames;
|
//std::vector<std::pair<std::string, std::string>> tabNames;
|
||||||
//for(size_t i = 0; i < main.worlds.size(); i++) {
|
//for(size_t i = 0; i < main.worlds.size(); i++) {
|
||||||
// auto& w = main.worlds[i];
|
// auto& w = main.worlds[i];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue