diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Body.cpp | 6 | ||||
-rw-r--r-- | src/QuickMedia.cpp | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/Body.cpp b/src/Body.cpp index 74646fd..2cf6f78 100644 --- a/src/Body.cpp +++ b/src/Body.cpp @@ -453,10 +453,11 @@ namespace QuickMedia { float item_height = get_item_height(item.get(), size.x); prev_pos.y -= (item_height + spacing_y); - if(prev_pos.y + item_height + spacing_y <= start_y) { + if(prev_pos.y < start_y) items_cut_off = true; + + if(prev_pos.y + item_height + spacing_y <= start_y) break; - } // This is needed here rather than above the loop, since update_dirty_text cant be called inside scissor because it corrupts the text for some reason glEnable(GL_SCISSOR_TEST); @@ -495,6 +496,7 @@ namespace QuickMedia { if(after_pos.y - start_y > size.y) { last_item_fully_visible = false; + items_cut_off = true; } else { last_fully_visible_item = i; } diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp index 590eb86..644ed6f 100644 --- a/src/QuickMedia.cpp +++ b/src/QuickMedia.cpp @@ -3116,7 +3116,7 @@ namespace QuickMedia { pinned_tab.body = std::make_unique<Body>(this, loading_icon); pinned_tab.body->thumbnail_max_size = CHAT_MESSAGE_THUMBNAIL_MAX_SIZE; pinned_tab.body->thumbnail_mask_shader = &circle_mask_shader; - pinned_tab.body->attach_side = AttachSide::TOP; + pinned_tab.body->attach_side = AttachSide::BOTTOM; //pinned_tab.body->line_separator_color = sf::Color::Transparent; pinned_tab.text = sf::Text("Pinned messages", *FontLoader::get_font(FontLoader::FontType::LATIN), tab_text_size); tabs.push_back(std::move(pinned_tab)); |