fix: isolate and enlarge run toolbar
This commit is contained in:
@@ -339,7 +339,7 @@ inline ImVec4 ProjectBrowserPaneBackgroundColor() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
inline ImVec4 ToolbarBackgroundColor() {
|
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() {
|
inline ImVec2 SearchFieldFramePadding() {
|
||||||
|
|||||||
@@ -17,10 +17,11 @@ namespace Editor {
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
constexpr float kRunToolbarHeight = 24.0f;
|
constexpr float kRunToolbarHeight = 32.0f;
|
||||||
constexpr float kRunToolbarButtonExtent = 20.0f;
|
constexpr float kRunToolbarButtonExtent = 24.0f;
|
||||||
constexpr float kRunToolbarButtonSpacing = 6.0f;
|
constexpr float kRunToolbarButtonSpacing = 8.0f;
|
||||||
constexpr float kRunToolbarIconInset = 2.0f;
|
constexpr float kRunToolbarIconInset = 3.0f;
|
||||||
|
constexpr ImVec4 kRunToolbarBackgroundColor(0.1f, 0.1f, 0.1f, 1.0f);
|
||||||
|
|
||||||
std::string BuildRunToolbarIconPath(const char* fileName) {
|
std::string BuildRunToolbarIconPath(const char* fileName) {
|
||||||
const std::filesystem::path exeDir(
|
const std::filesystem::path exeDir(
|
||||||
@@ -137,10 +138,10 @@ void MenuBar::RenderRunToolbar() {
|
|||||||
ImGuiWindowFlags_NoMove |
|
ImGuiWindowFlags_NoMove |
|
||||||
ImGuiWindowFlags_NoNavFocus;
|
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_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, kRunToolbarBackgroundColor);
|
||||||
const bool open =
|
const bool open =
|
||||||
ImGui::BeginViewportSideBar("##MainRunToolbar", viewport, ImGuiDir_Up, kRunToolbarHeight, kWindowFlags);
|
ImGui::BeginViewportSideBar("##MainRunToolbar", viewport, ImGuiDir_Up, kRunToolbarHeight, kWindowFlags);
|
||||||
ImGui::PopStyleColor();
|
ImGui::PopStyleColor();
|
||||||
|
|||||||
Reference in New Issue
Block a user