aboutsummaryrefslogtreecommitdiff
path: root/src/Body.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2022-11-13 02:05:27 +0100
committerdec05eba <dec05eba@protonmail.com>2022-11-13 02:05:27 +0100
commitaea90e2c43d6dbf8b8276e1209f4d4abe1cea128 (patch)
treea21cd16b95e027d7e277e25089b63b45e2bdb735 /src/Body.cpp
parent01f23292bf2451a0c7b9ada88c6314dcb09509b1 (diff)
Matrix: fix message edits not being applied correctly
Diffstat (limited to 'src/Body.cpp')
-rw-r--r--src/Body.cpp24
1 files changed, 21 insertions, 3 deletions
diff --git a/src/Body.cpp b/src/Body.cpp
index adb774c..9eb3c98 100644
--- a/src/Body.cpp
+++ b/src/Body.cpp
@@ -315,6 +315,15 @@ namespace QuickMedia {
for(size_t i = 0; i < items.size(); ++i) {
if(body_item->get_timestamp() > items[i]->get_timestamp()) {
items.insert(items.begin() + i, std::move(body_item));
+ /*
+ if((int)i <= selected_item) {
+ if(attach_side == AttachSide::TOP)
+ selected_item -= 1;
+ else
+ selected_item += 1;
+ clamp_selection();
+ }
+ */
return i;
}
}
@@ -328,6 +337,15 @@ namespace QuickMedia {
for(size_t i = 0; i < items.size(); ++i) {
if(body_item->get_timestamp() < items[i]->get_timestamp()) {
items.insert(items.begin() + i, std::move(body_item));
+ /*
+ if((int)i <= selected_item) {
+ if(attach_side == AttachSide::TOP)
+ selected_item -= 1;
+ else
+ selected_item += 1;
+ clamp_selection();
+ }
+ */
return i;
}
}
@@ -1631,19 +1649,19 @@ namespace QuickMedia {
if(item->author_text) {
item->author_text->set_position(text_pos);
item->author_text->draw(window);
- text_offset_y += item->author_text->getHeight();
+ text_offset_y += item->author_text->getHeight() + std::floor(5.0f * get_config().scale);
}
if(item->title_text) {
item->title_text->set_position(text_pos + mgl::vec2f(0.0f, text_offset_y));
item->title_text->draw(window);
- text_offset_y += item->title_text->getHeight();
+ text_offset_y += item->title_text->getHeight() + std::floor(5.0f * get_config().scale);
}
if(item->description_text) {
item->description_text->set_position(text_pos + mgl::vec2f(0.0f, text_offset_y));
item->description_text->draw(window);
- text_offset_y += item->description_text->getHeight();
+ text_offset_y += item->description_text->getHeight() + std::floor(5.0f * get_config().scale);
}
const float gradient_height = 5.0f;