diff options
author | dec05eba <dec05eba@protonmail.com> | 2018-05-17 06:09:24 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2018-05-17 06:09:27 +0200 |
commit | 73a8952e3dd2eae66f01721a6aec2053d185c6a8 (patch) | |
tree | 8d9979d5bf05fc43751b85f6a23f7239b9d57999 /src/Text.cpp | |
parent | 55a5713c0ad2553ca9a253d641bd98dd4b72bc60 (diff) |
Update libpreview, also render page description
Diffstat (limited to 'src/Text.cpp')
-rw-r--r-- | src/Text.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Text.cpp b/src/Text.cpp index 5191ca5..7503d61 100644 --- a/src/Text.cpp +++ b/src/Text.cpp @@ -845,6 +845,7 @@ namespace dchat } */ + states.transform.translate(pos); states.texture = &font->getTexture(characterSize); target.draw(vertices, states); @@ -951,6 +952,15 @@ namespace dchat contentByUrlResult.webPagePreview->title.setLineSpacing(0.0f); contentByUrlResult.webPagePreview->title.setFillColor(URL_COLOR); contentByUrlResult.webPagePreview->title.draw(target, cache); + + pos.y += contentByUrlResult.webPagePreview->title.getHeight(); + + contentByUrlResult.webPagePreview->description.setCharacterSize(characterSize); + contentByUrlResult.webPagePreview->description.setMaxWidth(previewWidth); + contentByUrlResult.webPagePreview->description.setPosition(pos); + contentByUrlResult.webPagePreview->description.setLineSpacing(0.0f); + contentByUrlResult.webPagePreview->description.setFillColor(color); + contentByUrlResult.webPagePreview->description.draw(target, cache); break; } } |