diff --git a/res/themes/ui.toml b/res/themes/ui.toml index e765bd7..c4db15c 100644 --- a/res/themes/ui.toml +++ b/res/themes/ui.toml @@ -931,7 +931,7 @@ scanline-speed = { size = 40.0 } scanline-height = { size = 36.0 } scanline-alpha = { size = 8.0 } scanline-gap = { size = 2.0 } -scanline-line-alpha = { size = 4.0 } +scanline-line-alpha = { size = 2.0 } scanline-glow-spread = { size = 4.0 } scanline-glow-intensity = { size = 0.6 } scanline-glow-color = { size = 255.0 } diff --git a/src/ui/windows/console_command_executor.cpp b/src/ui/windows/console_command_executor.cpp index aefb863..11249d5 100644 --- a/src/ui/windows/console_command_executor.cpp +++ b/src/ui/windows/console_command_executor.cpp @@ -190,7 +190,12 @@ ConsoleStatusLine FullNodeConsoleExecutor::toolbarStatus() const { ConsoleStatusLine s; daemon::EmbeddedDaemon* d = app_->consoleDaemon(); - if (!d) return s; // empty text -> toolbar shows the generic "no daemon" label + if (!d) { + // No wallet-managed daemon, but a daemon started externally (before the wallet) is still + // reachable over RPC and accepts commands — report it as running rather than "no daemon". + if (app_->isConnected()) { s.text = TR("console_status_running"); s.color = Success(); } + return s; // otherwise empty text -> toolbar shows the generic "no daemon" label + } using DState = daemon::EmbeddedDaemon::State; switch (d->getState()) { case DState::Stopped: s.text = TR("console_status_stopped"); s.color = IM_COL32(150,150,150,255); break; diff --git a/src/ui/windows/console_tab.cpp b/src/ui/windows/console_tab.cpp index 216166b..24e0689 100644 --- a/src/ui/windows/console_tab.cpp +++ b/src/ui/windows/console_tab.cpp @@ -1156,7 +1156,13 @@ void ConsoleTab::renderInput(ConsoleCommandExecutor& exec) // the darkened output panel above. { int darkA = static_cast(schema::UI().drawElement("tabs.console", "bg-darken-alpha").sizeOr(110.0f)); - dlIn->AddRectFilled(inMin, inMax, IM_COL32(0, 0, 0, darkA), Layout::glassRounding()); + const bool barLight = IsLightTheme(); + // Match the output panel: near-white terminal surface on light skins, dark on dark, with a + // 1px glass-rim outline along the bar's own edges (so the outline hugs the input, not inset). + dlIn->AddRectFilled(inMin, inMax, barLight ? IM_COL32(255, 255, 255, 205) : IM_COL32(0, 0, 0, darkA), + Layout::glassRounding()); + dlIn->AddRect(inMin, inMax, barLight ? IM_COL32(0, 0, 0, 45) : IM_COL32(255, 255, 255, 35), + Layout::glassRounding(), 0, 1.0f); } // Center content vertically within glass panel @@ -1223,10 +1229,12 @@ void ConsoleTab::renderInput(ConsoleCommandExecutor& exec) return 0; }; - // Blend the field into the dark terminal bar: transparent frame, subtle hover/active. + // Transparent frame with a subtle hover/active tint (the outline lives on the terminal bar above, + // hugging the input's edges). Colors are theme-aware so they read on the light-skin console too. + const bool inputLight = material::IsLightTheme(); ImGui::PushStyleColor(ImGuiCol_FrameBg, IM_COL32(0, 0, 0, 0)); - ImGui::PushStyleColor(ImGuiCol_FrameBgHovered, IM_COL32(255, 255, 255, 12)); - ImGui::PushStyleColor(ImGuiCol_FrameBgActive, IM_COL32(255, 255, 255, 18)); + ImGui::PushStyleColor(ImGuiCol_FrameBgHovered, inputLight ? IM_COL32(0, 0, 0, 10) : IM_COL32(255, 255, 255, 12)); + ImGui::PushStyleColor(ImGuiCol_FrameBgActive, inputLight ? IM_COL32(0, 0, 0, 16) : IM_COL32(255, 255, 255, 18)); const bool busy = exec.busy(); if (busy) ImGui::BeginDisabled(); @@ -1243,6 +1251,25 @@ void ConsoleTab::renderInput(ConsoleCommandExecutor& exec) } } if (busy) ImGui::EndDisabled(); + + // Blinking terminal caret at the end of the current input. Shown when the field isn't actively + // being edited (ImGui draws its own caret while focused), so the console always reads as a live + // prompt. Monospace font => caret X = frame-padding + charWidth * length. + if (!busy && !ImGui::IsItemActive()) { + if (std::fmod(ImGui::GetTime(), 1.06) < 0.53) { + ImFont* mf = Type().mono(); + float charW = mf->CalcTextSizeA(mf->LegacySize, FLT_MAX, 0, "M").x; + ImVec2 itMin = ImGui::GetItemRectMin(); + ImVec2 itMax = ImGui::GetItemRectMax(); + float caretW = std::max(2.0f, 2.0f * Layout::dpiScale()); + float caretX = itMin.x + ImGui::GetStyle().FramePadding.x + charW * (float)strlen(input_buffer_); + caretX = std::min(caretX, itMax.x - ImGui::GetStyle().FramePadding.x - caretW); + float pad = (itMax.y - itMin.y) * 0.18f; + ImU32 caretCol = inputLight ? IM_COL32(0, 0, 0, 210) : IM_COL32(255, 255, 255, 210); + dlIn->AddRectFilled(ImVec2(caretX, itMin.y + pad), ImVec2(caretX + caretW, itMax.y - pad), caretCol); + } + } + ImGui::PopStyleColor(3); ImGui::PopItemWidth();