diff options
author | George Hazan <george.hazan@gmail.com> | 2024-10-22 20:33:56 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-10-22 20:33:56 +0300 |
commit | 29be1661e4f294cc1056a1d315001f25acfbb21f (patch) | |
tree | fb82c9ca81e26dea9ec26dbe68677aeca7efd6bb /plugins/NewStory/src/templates.cpp | |
parent | 57f3aa3dbcefdd94a4f26a71adccfe8ebe988eab (diff) |
fixes #4602 (NewStory: сделать опцию для ограничения максимальной высоты превьюшки изображения)
Diffstat (limited to 'plugins/NewStory/src/templates.cpp')
-rw-r--r-- | plugins/NewStory/src/templates.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/NewStory/src/templates.cpp b/plugins/NewStory/src/templates.cpp index 36c6cedadb..e915e468ae 100644 --- a/plugins/NewStory/src/templates.cpp +++ b/plugins/NewStory/src/templates.cpp @@ -45,7 +45,7 @@ static wchar_t* font2html(LOGFONTA &lf, wchar_t *dest) return dest;
}
-static void AppendImage(CMStringW &buf, const CMStringW &wszUrl, const CMStringW &wszDescr, ItemData *pItem, UINT uMaxHeight = 300)
+static void AppendImage(CMStringW &buf, const CMStringW &wszUrl, const CMStringW &wszDescr, ItemData *pItem, UINT uMaxHeight)
{
if (g_plugin.bShowPreview) {
pItem->pOwner->webPage.load_image(wszUrl, pItem);
@@ -150,7 +150,7 @@ static void AppendString(CMStringW &buf, const wchar_t *p, ItemData *pItem) if (auto *p2 = wcsstr(p1, L"[/img]")) {
CMStringW wszDescr(p1, int(p2 - p1));
- AppendImage(buf, wszUrl, wszDescr, pItem, iMaxHeight ? iMaxHeight : 300);
+ AppendImage(buf, wszUrl, wszDescr, pItem, iMaxHeight ? iMaxHeight : g_iPreviewHeight);
p = p2 + 5;
}
}
@@ -161,7 +161,7 @@ static void AppendString(CMStringW &buf, const wchar_t *p, ItemData *pItem) if (auto *p1 = wcsstr(p, L"[/img]")) {
CMStringW wszUrl(p, int(p1 - p));
- AppendImage(buf, wszUrl, L"", pItem);
+ AppendImage(buf, wszUrl, L"", pItem, g_iPreviewHeight);
p = p1 + 5;
}
else p--;
|