fix: compress top run toolbar

This commit is contained in:
2026-04-02 22:44:20 +08:00
parent cd03465cd0
commit 2f9b416b22

View File

@@ -17,10 +17,10 @@ namespace Editor {
namespace { namespace {
constexpr float kRunToolbarHeight = 28.0f; constexpr float kRunToolbarHeight = 24.0f;
constexpr float kRunToolbarButtonExtent = 24.0f; constexpr float kRunToolbarButtonExtent = 20.0f;
constexpr float kRunToolbarButtonSpacing = 8.0f; constexpr float kRunToolbarButtonSpacing = 6.0f;
constexpr float kRunToolbarIconInset = 3.0f; constexpr float kRunToolbarIconInset = 2.0f;
std::string BuildRunToolbarIconPath(const char* fileName) { std::string BuildRunToolbarIconPath(const char* fileName) {
const std::filesystem::path exeDir( const std::filesystem::path exeDir(
@@ -135,7 +135,7 @@ void MenuBar::RenderRunToolbar() {
ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoMove |
ImGuiWindowFlags_NoNavFocus; ImGuiWindowFlags_NoNavFocus;
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(12.0f, 1.0f)); ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(12.0f, 0.0f));
ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, 0.0f); ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, 0.0f);
ImGui::PushStyleVar(ImGuiStyleVar_WindowBorderSize, 0.0f); ImGui::PushStyleVar(ImGuiStyleVar_WindowBorderSize, 0.0f);
ImGui::PushStyleColor(ImGuiCol_WindowBg, UI::ToolbarBackgroundColor()); ImGui::PushStyleColor(ImGuiCol_WindowBg, UI::ToolbarBackgroundColor());