From 398eeeca691a14dd883c33fde16de55fe1ed6a4f Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 22 May 2021 13:37:07 +0200 Subject: Fix 4chan and other html plugins for ubuntu, make movement smooth with 60fps as well, readd updateGeometry --- include/Body.hpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'include/Body.hpp') diff --git a/include/Body.hpp b/include/Body.hpp index e74d459..2d18bdd 100644 --- a/include/Body.hpp +++ b/include/Body.hpp @@ -280,8 +280,6 @@ namespace QuickMedia { int get_previous_visible_item(int start_index); // Returns -1 if not found int get_next_visible_item(int start_index); - float get_offset_to_first_visible_item(sf::Vector2f body_size); - float get_offset_to_last_visible_item(sf::Vector2f body_size); private: enum class DirtyState { FALSE, @@ -289,6 +287,12 @@ namespace QuickMedia { FORCE_TRUE }; + enum class TargetSetState { + NOT_SET, + SET, + APPLIED + }; + Program *program; int selected_item; int prev_selected_item; @@ -338,6 +342,7 @@ namespace QuickMedia { bool render_selected_item_bg = true; float item_background_target_pos_y = 0.0f; float item_background_target_height = 0.0f; + TargetSetState target_y_set = TargetSetState::NOT_SET; // TODO: Instead of using this, add functions for modifying |items| and apply the filter on those new items DirtyState items_dirty = DirtyState::FALSE; std::string current_filter; -- cgit v1.2.3