diff --git a/shaders/model.frag b/shaders/model.frag index c462de2..17b0ab9 100644 --- a/shaders/model.frag +++ b/shaders/model.frag @@ -28,7 +28,7 @@ void main() { // with plain diffuse only (no specular/rim) so there is no shimmer, while the // printed button labels still read. float diff = max(dot(N, L), 0.0); - float amb = 0.18 + 0.12 * (N.y * 0.5 + 0.5); - outColor = vec4(tex.rgb * (amb + 0.75 * diff) * pc.color.rgb, + float amb = 0.08 + 0.07 * (N.y * 0.5 + 0.5); + outColor = vec4(tex.rgb * (amb + 0.55 * diff) * pc.color.rgb, tex.a * pc.color.a); } diff --git a/src/app/app.cpp b/src/app/app.cpp index 88971c1..f3f495c 100644 --- a/src/app/app.cpp +++ b/src/app/app.cpp @@ -533,9 +533,10 @@ int App::run() { downloadToast_ = nowT + std::chrono::seconds(10); } const bool dlRecent = browser_.downloadActive() || nowT < downloadToast_; - const std::string dlLine = - browser_.downloadActive() ? downloadToastText_ : browser_.status(); - renderer_.setDownloadStatus(!browser_.isOpen() && dlRecent, dlLine); + // Head-locked line only while a download is actually running; the + // completion is shown by the Downloads window / green button badge. + renderer_.setDownloadStatus(!browser_.isOpen() && browser_.downloadActive(), + browser_.downloadText()); renderer_.setDownloadsBadge(browser_.downloadActive(), !browser_.downloadActive() && browser_.hasDownloads() && dlRecent); @@ -578,10 +579,10 @@ int App::run() { rows.reserve(browser_.entries().size()); for (const auto& e : browser_.entries()) { std::string name = e.label; - if (name.size() > 32) name = name.substr(0, 31) + "~"; + if (name.size() > 44) name = name.substr(0, 43) + "~"; std::string row = name; if (!e.detail.empty()) { - while (row.size() < 36) row += ' '; + while (row.size() < 50) row += ' '; row += e.detail; } rows.push_back(std::move(row)); diff --git a/src/gfx/vulkan_renderer.cpp b/src/gfx/vulkan_renderer.cpp index 635bb43..48b6550 100644 --- a/src/gfx/vulkan_renderer.cpp +++ b/src/gfx/vulkan_renderer.cpp @@ -50,7 +50,7 @@ struct TextPush { // Shared UI panel layout (panel-local metres), used by both the browser render // and the pointer raycast so the cursor and highlight line up exactly. -constexpr float kPanelW = 0.7f; +constexpr float kPanelW = 1.0f; constexpr float kPanelTop = 0.8f; constexpr float kRowH = 0.09f; constexpr int kMaxRows = 13; @@ -1738,11 +1738,11 @@ void VulkanRenderer::renderView(uint32_t viewIndex, uint32_t imageIndex, for (int i = first; i < lastRow; ++i) { const float ry = panelTop - 0.2f - (i - first) * rowH; drawString(-panelW + 0.05f, ry, sc, white2, - browserRows_[static_cast(i)].substr(0, 46)); + browserRows_[static_cast(i)].substr(0, 62)); } if (!browserStatus_.empty()) { drawString(-panelW + 0.04f, -panelTop + 0.05f, sc * 0.85f, dim, - browserStatus_.substr(0, 46)); + browserStatus_.substr(0, 70)); } } @@ -1822,11 +1822,11 @@ void VulkanRenderer::renderView(uint32_t viewIndex, uint32_t imageIndex, (i < static_cast(settingsEnabled_.size()) && settingsEnabled_[i] != 0); drawString(-panelW + 0.05f, ry, sc, en ? white2 : disabledCol, - settingsRows_[static_cast(i)].substr(0, 46)); + settingsRows_[static_cast(i)].substr(0, 62)); } if (!settingsStatus_.empty()) { drawString(-panelW + 0.04f, -panelTop + 0.05f, sc * 0.82f, dim, - settingsStatus_.substr(0, 52)); + settingsStatus_.substr(0, 70)); } } @@ -1879,11 +1879,11 @@ void VulkanRenderer::renderView(uint32_t viewIndex, uint32_t imageIndex, downloadsTitle_.substr(0, 42)); for (std::size_t i = 0; i < downloadsRows_.size(); ++i) { const float ry = panelTop - 0.2f - static_cast(i) * rowH; - drawString(-panelW + 0.05f, ry, sc, white2, downloadsRows_[i].substr(0, 46)); + drawString(-panelW + 0.05f, ry, sc, white2, downloadsRows_[i].substr(0, 62)); } if (!downloadsStatus_.empty()) { drawString(-panelW + 0.04f, -panelTop + 0.05f, sc * 0.82f, dim, - downloadsStatus_.substr(0, 52)); + downloadsStatus_.substr(0, 70)); } } @@ -1956,7 +1956,6 @@ void VulkanRenderer::renderView(uint32_t viewIndex, uint32_t imageIndex, !modelNodeStates_.empty() && !modelNodeStates_[0].name.empty(); for (std::size_t si = 0; si < modelSubmeshes_.size(); ++si) { const ModelSubmesh& sm = modelSubmeshes_[si]; - if (sm.nodeName == "status") continue; // full-atlas screen node const float* np = identityPos; const float* nq = identityQuat; if (haveNames) { diff --git a/src/ui/browser.cpp b/src/ui/browser.cpp index 5bb685b..4231cec 100644 --- a/src/ui/browser.cpp +++ b/src/ui/browser.cpp @@ -443,7 +443,7 @@ void Browser::startDownloadFile(const std::string& uri, const std::string& local dlActive_.store(false); return; } - std::vector buf(1 << 20); + std::vector buf(1 << 18); // small chunks so the SMB lock is freed ssize_t n = 0; long long got = 0; for (;;) { @@ -455,6 +455,7 @@ void Browser::startDownloadFile(const std::string& uri, const std::string& local std::fwrite(buf.data(), 1, static_cast(n), out); got += n; dlBytes_.store(got); + std::this_thread::yield(); // let the browser's scan take the lock } std::fclose(out); { @@ -518,7 +519,7 @@ void Browser::startDownloadFolder(const std::string& uri, ok = false; return; } - std::vector buf(1 << 20); + std::vector buf(1 << 18); // small chunks: yield the SMB lock for (;;) { ssize_t n = 0; { @@ -529,6 +530,7 @@ void Browser::startDownloadFolder(const std::string& uri, std::fwrite(buf.data(), 1, static_cast(n), out); got += n; dlBytes_.store(got); + std::this_thread::yield(); } std::fclose(out); {