diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Body.cpp | 11 | ||||
-rw-r--r-- | src/QuickMedia.cpp | 6 |
2 files changed, 8 insertions, 9 deletions
diff --git a/src/Body.cpp b/src/Body.cpp index e60a691..a779c09 100644 --- a/src/Body.cpp +++ b/src/Body.cpp @@ -43,7 +43,7 @@ namespace QuickMedia { embedded_item_load_text("", *font, 14), draw_thumbnails(false), wrap_around(false), - line_seperator_color(sf::Color(32, 37, 43, 255)), + line_separator_color(sf::Color(32, 37, 43, 255)), body_item_render_callback(nullptr), thumbnail_mask_shader(nullptr), program(program), @@ -279,7 +279,7 @@ namespace QuickMedia { //item_background.setFillColor(front_color); //item_background.setOutlineThickness(1.0f); //item_background.setOutlineColor(sf::Color(13, 15, 17)); - item_background_shadow.setFillColor(line_seperator_color); + item_separator.setFillColor(line_separator_color); num_visible_items = 0; last_item_fully_visible = true; last_fully_visible_item = -1; @@ -333,6 +333,7 @@ namespace QuickMedia { prev_selected_item = selected_item; } + update_dirty_state(items[selected_item].get(), size); float selected_item_height = get_item_height(items[selected_item].get()) + spacing_y; if(page_scroll > size.y - selected_item_height) { page_scroll = size.y - selected_item_height; @@ -547,9 +548,9 @@ namespace QuickMedia { item_pos.x = std::floor(pos.x); item_pos.y = std::floor(pos.y); - item_background_shadow.setSize(sf::Vector2f(std::max(0.0f, size.x - 20.0f), 1.0f)); - item_background_shadow.setPosition(item_pos + sf::Vector2f(10.0f, std::floor(item_height + spacing_y * 0.5f))); - window.draw(item_background_shadow); + item_separator.setSize(sf::Vector2f(std::max(0.0f, size.x - 20.0f), 1.0f)); + item_separator.setPosition(item_pos + sf::Vector2f(10.0f, std::floor(item_height + spacing_y * 0.5f))); + window.draw(item_separator); if(item_index == selected_item) { item_background.setPosition(item_pos); diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp index dc7e6f3..6e4ee51 100644 --- a/src/QuickMedia.cpp +++ b/src/QuickMedia.cpp @@ -2946,7 +2946,7 @@ namespace QuickMedia { messages_tab.body->thumbnail_resize_target_size.x = 600; messages_tab.body->thumbnail_resize_target_size.y = 337; messages_tab.body->thumbnail_mask_shader = &circle_mask_shader; - //messages_tab.body->line_seperator_color = sf::Color::Transparent; + //messages_tab.body->line_separator_color = sf::Color::Transparent; messages_tab.text = sf::Text("Messages", *font, tab_text_size); tabs.push_back(std::move(messages_tab)); @@ -2954,7 +2954,7 @@ namespace QuickMedia { rooms_tab.type = ChatTabType::ROOMS; rooms_tab.body = std::make_unique<Body>(this, font.get(), bold_font.get(), cjk_font.get()); rooms_tab.body->draw_thumbnails = true; - //rooms_tab.body->line_seperator_color = sf::Color::Transparent; + //rooms_tab.body->line_separator_color = sf::Color::Transparent; rooms_tab.body->thumbnail_mask_shader = &circle_mask_shader; rooms_tab.text = sf::Text("Rooms", *font, tab_text_size); tabs.push_back(std::move(rooms_tab)); @@ -3475,8 +3475,6 @@ namespace QuickMedia { tabs[selected_tab].body->select_next_page(); } else if(event.key.code == sf::Keyboard::End) { tabs[selected_tab].body->select_last_item(); - } else if(event.key.code == sf::Keyboard::Escape) { - current_page = PageType::EXIT; } else if((event.key.code == sf::Keyboard::Left || event.key.code == sf::Keyboard::H) && synced) { tabs[selected_tab].body->clear_cache(); selected_tab = std::max(0, selected_tab - 1); |