fix: isolate and enlarge run toolbar

This commit is contained in:
2026-04-02 23:07:36 +08:00
parent 307e8dbd0e
commit c63dcf2229
2 changed files with 8 additions and 7 deletions

View File

@@ -339,7 +339,7 @@ inline ImVec4 ProjectBrowserPaneBackgroundColor() {
}
inline ImVec4 ToolbarBackgroundColor() {
return ImVec4(0.1f, 0.1f, 0.1f, 1.0f);
return ImVec4(0.19f, 0.19f, 0.19f, 1.0f);
}
inline ImVec2 SearchFieldFramePadding() {

View File

@@ -17,10 +17,11 @@ namespace Editor {
namespace {
constexpr float kRunToolbarHeight = 24.0f;
constexpr float kRunToolbarButtonExtent = 20.0f;
constexpr float kRunToolbarButtonSpacing = 6.0f;
constexpr float kRunToolbarIconInset = 2.0f;
constexpr float kRunToolbarHeight = 32.0f;
constexpr float kRunToolbarButtonExtent = 24.0f;
constexpr float kRunToolbarButtonSpacing = 8.0f;
constexpr float kRunToolbarIconInset = 3.0f;
constexpr ImVec4 kRunToolbarBackgroundColor(0.1f, 0.1f, 0.1f, 1.0f);
std::string BuildRunToolbarIconPath(const char* fileName) {
const std::filesystem::path exeDir(
@@ -137,10 +138,10 @@ void MenuBar::RenderRunToolbar() {
ImGuiWindowFlags_NoMove |
ImGuiWindowFlags_NoNavFocus;
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(12.0f, 0.0f));
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(12.0f, 1.0f));
ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, 0.0f);
ImGui::PushStyleVar(ImGuiStyleVar_WindowBorderSize, 0.0f);
ImGui::PushStyleColor(ImGuiCol_WindowBg, UI::ToolbarBackgroundColor());
ImGui::PushStyleColor(ImGuiCol_WindowBg, kRunToolbarBackgroundColor);
const bool open =
ImGui::BeginViewportSideBar("##MainRunToolbar", viewport, ImGuiDir_Up, kRunToolbarHeight, kWindowFlags);
ImGui::PopStyleColor();