aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Body.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/Body.cpp b/src/Body.cpp
index d2af084..e04bc56 100644
--- a/src/Body.cpp
+++ b/src/Body.cpp
@@ -434,7 +434,7 @@ namespace QuickMedia {
if(!bottom_reached && on_bottom_reached)
on_bottom_reached();
return true;
- } else if(rendering_card_view && selected_column > 0 && (event.key.code == sf::Keyboard::Left || (event.key.control && event.key.code == sf::Keyboard::H))) {
+ } else if(rendering_card_view && selected_column > 0 && ((!event.key.control && event.key.code == sf::Keyboard::Left) || (event.key.control && event.key.code == sf::Keyboard::H))) {
render_selected_item_bg = true;
const int new_selected_item = get_previous_visible_item(selected_item);
if(new_selected_item != -1) {
@@ -443,7 +443,7 @@ namespace QuickMedia {
on_top_reached();
}
return true;
- } else if(rendering_card_view && selected_column + 1 < num_columns && (event.key.code == sf::Keyboard::Right || (event.key.control && event.key.code == sf::Keyboard::L))) {
+ } else if(rendering_card_view && selected_column + 1 < num_columns && ((!event.key.control && event.key.code == sf::Keyboard::Right) || (event.key.control && event.key.code == sf::Keyboard::L))) {
render_selected_item_bg = true;
const int new_selected_item = get_next_visible_item(selected_item);
if(new_selected_item != -1) {
@@ -1141,7 +1141,7 @@ namespace QuickMedia {
item_background.set_position(pos + pos_offset);
item_background.set_size(sf::Vector2f(card_width, card_height));
- item_background.set_color(sf::Color(33, 37, 44));
+ item_background.set_color(sf::Color(28, 32, 39));
item_background.set_band(item_background_prev_pos - (pos + pos_offset), item_background_prev_size);
item_background.set_band_color(sf::Color(55, 60, 68));
item_background.draw(window);
@@ -1222,7 +1222,7 @@ namespace QuickMedia {
const float gradient_height = 5.0f;
if(text_offset_y >= text_height - gradient_height) {
const sf::Vector2f card_bottom(text_pos.x, text_height);
- const sf::Color color = item_index == selected_item ? sf::Color(55, 60, 68) : sf::Color(33, 37, 44);
+ const sf::Color color = item_index == selected_item ? sf::Color(55, 60, 68) : sf::Color(28, 32, 39);
sf::Vertex gradient_points[4];
gradient_points[0] = sf::Vertex(card_bottom + sf::Vector2f(0.0f, -gradient_height), sf::Color(color.r, color.g, color.b, 0));
@@ -1549,8 +1549,8 @@ namespace QuickMedia {
item_height = std::max(item_height, image_height);
item_height += (padding_y * 2.0f);
- const bool first_height_set = item->last_loaded_height < 0.01f;
- if(item_index != -1 && (first_height_set || load_texture)) {
+ const bool first_height_set = item->last_loaded_height > 0.01f;
+ if(item_index != -1 && (!first_height_set || load_texture)) {
const float height_diff = item_height - item->prev_last_loaded_height;
//if(attach_side == AttachSide::TOP) {
// if(item_index < selected_item)
@@ -1561,7 +1561,7 @@ namespace QuickMedia {
//}
item->last_loaded_height = item_height;
item->prev_last_loaded_height = item_height;
- if(first_height_set)
+ if(!first_height_set)
item->current_loaded_height = item_height;
}