From 566cde637788723b021afb89d49175a9aff63a91 Mon Sep 17 00:00:00 2001 From: justnullname <51329027+justnullname@users.noreply.github.com> Date: Fri, 27 Mar 2026 14:53:34 +0000 Subject: [PATCH 1/3] Update AutoFit label across multiple languages Shorten Settings_Option_AutoFit string from "Auto (100% for small, Fit for large)" to "Auto (100% / Fit)" and updated translations to prevent wrapping in settings menu. Also updated corresponding comment in main.cpp. --- QuickView/AppStrings.cpp | 14 +++++++------- QuickView/main.cpp | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/QuickView/AppStrings.cpp b/QuickView/AppStrings.cpp index 317cb22..f55599c 100644 --- a/QuickView/AppStrings.cpp +++ b/QuickView/AppStrings.cpp @@ -602,7 +602,7 @@ struct EN { L"Fullscreen Zoom Mode"; static constexpr const wchar_t *Settings_Option_FitScreen = L"Fit to Screen"; static constexpr const wchar_t *Settings_Option_AutoFit = - L"Auto (100% for small, Fit for large)"; + L"Auto (100% / Fit)"; static constexpr const wchar_t *Settings_Label_InvertWheel = L"Invert Wheel"; static constexpr const wchar_t *Settings_Label_ZoomSnapDamping = L"Zoom 100% Snap Damping"; @@ -913,7 +913,7 @@ struct CN { L"全屏时缩放模式"; static constexpr const wchar_t *Settings_Option_FitScreen = L"适应屏幕"; static constexpr const wchar_t *Settings_Option_AutoFit = - L"自动 (小图100% / 大图适应)"; + L"自动 (100% / 适应)"; static constexpr const wchar_t *Settings_Label_InvertWheel = L"反转滚轮"; static constexpr const wchar_t *Settings_Label_ZoomSnapDamping = L"缩放 100% 吸附阻尼"; @@ -1437,7 +1437,7 @@ struct TW { L"全螢幕縮放模式"; static constexpr const wchar_t *Settings_Option_FitScreen = L"適應螢幕"; static constexpr const wchar_t *Settings_Option_AutoFit = - L"自動 (小圖100% / 大圖適應)"; + L"自動 (100% / 適應)"; static constexpr const wchar_t *Settings_Label_InvertWheel = L"反轉滾輪"; static constexpr const wchar_t *Settings_Label_ZoomSnapDamping = L"縮放 100% 吸附阻尼"; @@ -1864,7 +1864,7 @@ struct JA { L"全画面ズームモード"; static constexpr const wchar_t *Settings_Option_FitScreen = L"画面に合わせる"; static constexpr const wchar_t *Settings_Option_AutoFit = - L"自動 (小さい画像は100% / 大きい画像は合わせる)"; + L"自動 (100% / 合わせる)"; static constexpr const wchar_t *Settings_Label_InvertWheel = L"ホイール反転"; static constexpr const wchar_t *Settings_Label_ZoomSnapDamping = L"100%ズーム吸着ダンピング"; @@ -2320,7 +2320,7 @@ struct RU { static constexpr const wchar_t *Settings_Option_FitScreen = L"По размеру экрана"; static constexpr const wchar_t *Settings_Option_AutoFit = - L"Авто (100% для мелких, по размеру для крупных)"; + L"Авто (100% / По размеру)"; static constexpr const wchar_t *Settings_Label_InvertWheel = L"Инвертировать колесо"; static constexpr const wchar_t *Settings_Label_ZoomSnapDamping = @@ -2783,7 +2783,7 @@ struct DE { static constexpr const wchar_t *Settings_Option_FitScreen = L"An Bildschirm anpassen"; static constexpr const wchar_t *Settings_Option_AutoFit = - L"Auto (100% für kleine, anpassen für große)"; + L"Auto (100% / Anpassen)"; static constexpr const wchar_t *Settings_Label_InvertWheel = L"Mausrad invertieren"; static constexpr const wchar_t *Settings_Label_ZoomSnapDamping = @@ -3244,7 +3244,7 @@ struct ES { static constexpr const wchar_t *Settings_Option_FitScreen = L"Ajustar a pantalla"; static constexpr const wchar_t *Settings_Option_AutoFit = - L"Auto (100% para pequeñas, ajustar para grandes)"; + L"Auto (100% / Ajustar)"; static constexpr const wchar_t *Settings_Label_InvertWheel = L"Invertir rueda"; static constexpr const wchar_t *Settings_Label_ZoomSnapDamping = diff --git a/QuickView/main.cpp b/QuickView/main.cpp index ad60691..a0b4c7a 100644 --- a/QuickView/main.cpp +++ b/QuickView/main.cpp @@ -552,7 +552,7 @@ void ApplyFullScreenZoomMode(HWND hwnd) { if (g_config.FullScreenZoomMode == 0) { // Fit g_viewState.Zoom = 1.0f; - } else { // Auto (100% for small, Fit for large) + } else { // Auto (100% / Fit) D2D1_SIZE_F effSize = GetVisualImageSize(); float imgW = effSize.width; float imgH = effSize.height; From fdc8bca8d03f46944b983cf2fbc0843f0e819343 Mon Sep 17 00:00:00 2001 From: justnullname <51329027+justnullname@users.noreply.github.com> Date: Sat, 28 Mar 2026 02:52:39 +0000 Subject: [PATCH 2/3] Update CmsIntent labels to prevent wrapping Shorten Settings_Option_CmsIntentRelative and Settings_Option_CmsIntentPerceptual by removing descriptive parentheses from multiple languages to fix text wrapping issues in the settings menu. --- QuickView/AppStrings.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/QuickView/AppStrings.cpp b/QuickView/AppStrings.cpp index f55599c..7a1e27f 100644 --- a/QuickView/AppStrings.cpp +++ b/QuickView/AppStrings.cpp @@ -655,9 +655,9 @@ struct EN { static constexpr const wchar_t *Settings_Option_CmsProPhoto = L"ProPhoto RGB"; static constexpr const wchar_t *Settings_Label_CmsIntent = L"Rendering Intent"; static constexpr const wchar_t *Settings_Option_CmsIntentRelative = - L"Relative Colorimetric (Accuracy First)"; + L"Relative Colorimetric"; static constexpr const wchar_t *Settings_Option_CmsIntentPerceptual = - L"Perceptual (Perception First)"; + L"Perceptual"; static constexpr const wchar_t *Settings_Action_CheckUpdates = L"Check for Updates"; @@ -961,8 +961,8 @@ struct CN { static constexpr const wchar_t *Settings_Option_CmsGray = L"灰度模式 (影调检查)"; static constexpr const wchar_t *Settings_Option_CmsProPhoto = L"ProPhoto RGB"; static constexpr const wchar_t *Settings_Label_CmsIntent = L"渲染意图"; - static constexpr const wchar_t *Settings_Option_CmsIntentRelative = L"相对色度 (准确优先)"; - static constexpr const wchar_t *Settings_Option_CmsIntentPerceptual = L"感知意图 (感知优先)"; + static constexpr const wchar_t *Settings_Option_CmsIntentRelative = L"相对色度"; + static constexpr const wchar_t *Settings_Option_CmsIntentPerceptual = L"感知意图"; static constexpr const wchar_t *Settings_Action_CheckUpdates = L"检查更新"; static constexpr const wchar_t *Settings_Action_ViewUpdate = L"查看更新"; @@ -1486,8 +1486,8 @@ struct TW { static constexpr const wchar_t *Settings_Option_CmsGray = L"灰度模式 (影調檢查)"; static constexpr const wchar_t *Settings_Option_CmsProPhoto = L"ProPhoto RGB"; static constexpr const wchar_t *Settings_Label_CmsIntent = L"渲染意圖"; - static constexpr const wchar_t *Settings_Option_CmsIntentRelative = L"相對色度 (准确優先)"; - static constexpr const wchar_t *Settings_Option_CmsIntentPerceptual = L"感知意圖 (感知優先)"; + static constexpr const wchar_t *Settings_Option_CmsIntentRelative = L"相對色度"; + static constexpr const wchar_t *Settings_Option_CmsIntentPerceptual = L"感知意圖"; static constexpr const wchar_t *Settings_Action_CheckUpdates = L"檢查更新"; static constexpr const wchar_t *Settings_Action_ViewUpdate = L"檢視更新"; @@ -2020,8 +2020,8 @@ struct JA { static constexpr const wchar_t *Settings_Option_CmsGray = L"グレースケール (トーン確認)"; static constexpr const wchar_t *Settings_Option_CmsProPhoto = L"ProPhoto RGB"; static constexpr const wchar_t *Settings_Label_CmsIntent = L"レンダリングインテント"; - static constexpr const wchar_t *Settings_Option_CmsIntentRelative = L"相対的な色域を維持 (精度優先)"; - static constexpr const wchar_t *Settings_Option_CmsIntentPerceptual = L"知覚的 (知覚優先)"; + static constexpr const wchar_t *Settings_Option_CmsIntentRelative = L"相対的な色域を維持"; + static constexpr const wchar_t *Settings_Option_CmsIntentPerceptual = L"知覚的"; static constexpr const wchar_t *Dialog_UpdateLogHeader = L"更新内容:"; static constexpr const wchar_t *HUD_Group_Physical = L"PHYSICAL ATTRIBUTES"; static constexpr const wchar_t *HUD_Group_Scientific = L"SCIENTIFIC QUALITY"; From 049cfc30b1f8c88c13f058a1cdd0bbe3967f3e88 Mon Sep 17 00:00:00 2001 From: justnullname <51329027+justnullname@users.noreply.github.com> Date: Tue, 31 Mar 2026 04:32:37 +0000 Subject: [PATCH 3/3] Fix text wrapping overlap in Help menu Updated HelpOverlay.cpp to use IDWriteTextLayout for item descriptions instead of static DrawText. This properly measures the multi-line height of wrapped strings and dynamically calculates the next row's Y position to prevent overlapping text. --- QuickView/HelpOverlay.cpp | 28 ++++++++++++++++++++++++---- tests/check_help.cpp | 2 ++ 2 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 tests/check_help.cpp diff --git a/QuickView/HelpOverlay.cpp b/QuickView/HelpOverlay.cpp index 58eed1d..7043c8e 100644 --- a/QuickView/HelpOverlay.cpp +++ b/QuickView/HelpOverlay.cpp @@ -266,14 +266,34 @@ void HelpOverlay::Render(ID2D1RenderTarget* pRT, float winW, float winH) { else { // Key - Value Pair float keyW = 180.0f * s; - // Key (Right Aligned in Col 1) - // Actually Left aligned is better for keys like "Ctrl + Shift + ..." + // Key (Left Aligned in Col 1) pRT->DrawText(item.key.c_str(), (UINT32)item.key.length(), m_fmtKey.Get(), D2D1::RectF(x + 40.0f * s, contentY, x + 40.0f * s + keyW, contentY + rowH), m_brushKey.Get()); // Value - pRT->DrawText(item.desc.c_str(), (UINT32)item.desc.length(), m_fmtDesc.Get(), D2D1::RectF(x + 50.0f * s + keyW, contentY, x + panelW - 24.0f * s, contentY + rowH), m_brushText.Get()); + ComPtr layout; + float descX = x + 50.0f * s + keyW; + FLOAT maxWidth = x + panelW - 24.0f * s - descX; + FLOAT maxHeight = 1000.0f; + + HRESULT hr = m_dwriteFactory->CreateTextLayout( + item.desc.c_str(), (UINT32)item.desc.length(), m_fmtDesc.Get(), + maxWidth, maxHeight, layout.GetAddressOf() + ); + + float itemHeight = 24.0f * s; // default min height + if (SUCCEEDED(hr)) { + DWRITE_TEXT_METRICS metrics; + layout->GetMetrics(&metrics); + pRT->DrawTextLayout(D2D1::Point2F(descX, contentY), layout.Get(), m_brushText.Get()); + if (metrics.height > itemHeight) { + itemHeight = metrics.height + 4.0f * s; // add some padding if multiline + } + } else { + // fallback + pRT->DrawText(item.desc.c_str(), (UINT32)item.desc.length(), m_fmtDesc.Get(), D2D1::RectF(descX, contentY, descX + maxWidth, contentY + rowH), m_brushText.Get()); + } - contentY += 24.0f * s; + contentY += itemHeight; } } diff --git a/tests/check_help.cpp b/tests/check_help.cpp new file mode 100644 index 0000000..fce3197 --- /dev/null +++ b/tests/check_help.cpp @@ -0,0 +1,2 @@ +#include +int main() { return 0; }