Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tpecholt committed Aug 23, 2024
1 parent db48e7e commit 02c5fed
Show file tree
Hide file tree
Showing 4 changed files with 229 additions and 89 deletions.
2 changes: 1 addition & 1 deletion src/binding.h
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@ struct bindable<dimension> : property_base
return is.eof() || is.tellg() == str.size();
}
bool stretched() const {
return grow;
return grow && has_value();
}
bool has_value() const {
if (empty())
Expand Down
14 changes: 4 additions & 10 deletions src/imrad.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ std::vector<std::pair<std::string, std::vector<TB_Button>>> tbButtons{
{ ICON_FA_ARROW_DOWN_WIDE_SHORT, "CollapsingHeader" },
{ ICON_FA_FOLDER_CLOSED, "TabBar" },
{ ICON_FA_SITEMAP, "TreeNode" },
{ ICON_FA_ARROWS_LEFT_RIGHT_TO_LINE, "Splitter" },
{ ICON_FA_TABLE_COLUMNS, "Splitter" }, //ICON_FA_ARROWS_LEFT_RIGHT_TO_LINE
//{ ICON_FA_CLAPPERBOARD /*ELLIPSIS*/, "MenuBar" },
{ ICON_FA_MESSAGE /*RECEIPT*/, "ContextMenu" },
}}
Expand Down Expand Up @@ -752,7 +752,7 @@ GetCtxColors(const std::string& styleName)
IM_COL32(0, 255, 0, 255),
};
static const std::array<ImU32, UIContext::Color::COUNT> light {
0xb0996633,//IM_COL32(64, 64, 64, 128),
IM_COL32(0, 64, 0, 128), //0xb0996633
IM_COL32(255, 0, 0, 255),
IM_COL32(128, 128, 255, 255),
IM_COL32(255, 0, 255, 255),
Expand Down Expand Up @@ -1823,16 +1823,10 @@ void Work()
{
//don't IsMouseReleased otherwise closing modal popup will fire here too
if (ImGui::IsMouseClicked(ImGuiMouseButton_Left) &&
ctx.rootWin &&
ImRect(ctx.designAreaMin, ctx.designAreaMax).Contains(ImGui::GetMousePos()) &&
!ImRect(ctx.rootWin->Pos, ctx.rootWin->Pos + ctx.rootWin->SizeFull).Contains(ImGui::GetMousePos()))
!ImGui::IsWindowHovered(ImGuiHoveredFlags_AnyWindow))
{
bool skip = false;
for (ImGuiWindow* popup : ctx.activePopups)
if (popup->Rect().Contains(ImGui::GetMousePos()))
skip = true;
if (!skip)
ctx.selected = { ctx.root };
ctx.selected = { ctx.root };
}
if (ImGui::Shortcut(ImGuiMod_Ctrl | ImGuiKey_KeypadAdd, ImGuiInputFlags_RouteGlobal) ||
ImGui::Shortcut(ImGuiMod_Ctrl | ImGuiKey_Equal, ImGuiInputFlags_RouteGlobal))
Expand Down
Loading

0 comments on commit 02c5fed

Please sign in to comment.