diff options
author | dec05eba <dec05eba@protonmail.com> | 2022-11-07 01:01:28 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2022-11-07 14:24:32 +0100 |
commit | ede1a8476acd54941c20b809455ba62b30302a4e (patch) | |
tree | 82160da56025e47484c23e8496f1d59b8ddc084f /src/Body.cpp | |
parent | 8025d1075db0779bde635148f6e38303eb29d6c8 (diff) |
Add option to limit number of lines of text drawn in Text class
Diffstat (limited to 'src/Body.cpp')
-rw-r--r-- | src/Body.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Body.cpp b/src/Body.cpp index 32d5dd5..5bc4f2a 100644 --- a/src/Body.cpp +++ b/src/Body.cpp @@ -872,6 +872,7 @@ namespace QuickMedia { body_item->title_text = std::make_unique<Text>(body_item->get_title(), false, std::floor(get_config().body.title_font_size * get_config().scale * get_config().font_scale), width, title_mark_urls); } body_item->title_text->set_color(body_item->get_title_color()); + body_item->title_text->set_max_lines(body_item->title_max_lines); body_item->title_text->updateGeometry(); } @@ -884,6 +885,7 @@ namespace QuickMedia { body_item->description_text = std::make_unique<Text>(body_item->get_description(), false, std::floor(get_config().body.description_font_size * get_config().scale * get_config().font_scale), width, true); } body_item->description_text->set_color(body_item->get_description_color(), body_item->force_description_color); + body_item->description_text->set_max_lines(body_item->description_max_lines); body_item->description_text->updateGeometry(); } |