aboutsummaryrefslogtreecommitdiff
path: root/src/Body.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-06-05 12:13:08 +0200
committerdec05eba <dec05eba@protonmail.com>2021-06-05 12:28:01 +0200
commit3dce4e2b9200a1cd4eca50147203cb34a31e0ef3 (patch)
tree2106359b362df60ba37032220174de5c0bf32f17 /src/Body.cpp
parenta3c42c7e8b3e78448e5f8ad6d9af389ae6ffda31 (diff)
Add covers to mangadex, remove arrow left/right, require alt
Diffstat (limited to 'src/Body.cpp')
-rw-r--r--src/Body.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Body.cpp b/src/Body.cpp
index 9843492..ce7f4f3 100644
--- a/src/Body.cpp
+++ b/src/Body.cpp
@@ -520,7 +520,7 @@ namespace QuickMedia {
if(!show_drop_shadow)
return;
- const sf::Color color(21, 25, 30);
+ const sf::Color color(0, 0, 0, 50);
const float height = 5.0f;
sf::Vertex gradient_points[4];
@@ -1201,7 +1201,7 @@ namespace QuickMedia {
const float text_height = (card_height - card_padding_y * 2.0f) - image_height - text_padding;
const float underflow_text = text_pos.y - scissor_y;
- const float underflow_height = underflow_text < 0.0f ? text_height + underflow_text : text_height;
+ const float underflow_height = underflow_text < 0.0f ? std::max(0.0f, text_height + underflow_text) : text_height;
sf::View new_view(sf::FloatRect(0.0f, 0.0f, window_size.x, underflow_height));
new_view.setViewport(sf::FloatRect(0.0f, std::max(text_pos.y, scissor_y) / (float)window_size.y, 1.0f, underflow_height / (float)window_size.y));
window.setView(new_view);