aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ImageViewer.cpp6
-rw-r--r--src/plugins/Youtube.cpp1
2 files changed, 3 insertions, 4 deletions
diff --git a/src/ImageViewer.cpp b/src/ImageViewer.cpp
index fcf9519..b567e1b 100644
--- a/src/ImageViewer.cpp
+++ b/src/ImageViewer.cpp
@@ -36,7 +36,7 @@ namespace QuickMedia {
const sf::Vector2<double> image_size = get_page_size(page);
std::unique_ptr<ImageData> &page_image_data = image_data[page];
- sf::Vector2<double> render_pos(std::floor(window_size.x * 0.5 - image_size.x * 0.5), std::floor(- image_size.y * 0.5 + scroll + offset_y));
+ sf::Vector2<double> render_pos(window_size.x * 0.5 - image_size.x * 0.5, - image_size.y * 0.5 + scroll + offset_y);
if(render_pos.y + image_size.y <= 0.0 || render_pos.y >= window_size.y) {
if(page_image_data)
page_image_data->visible_on_screen = false;
@@ -54,7 +54,7 @@ namespace QuickMedia {
sf::Text error_message("Failed to load image for page " + std::to_string(1 + page), *font, 30);
auto text_bounds = error_message.getLocalBounds();
error_message.setFillColor(sf::Color::Black);
- sf::Vector2<double> render_pos_text(std::floor(window_size.x * 0.5 - text_bounds.width * 0.5), std::floor(- text_bounds.height * 0.5 + scroll + offset_y));
+ sf::Vector2<double> render_pos_text(window_size.x * 0.5 - text_bounds.width * 0.5, - text_bounds.height * 0.5 + scroll + offset_y);
sf::RectangleShape background(sf::Vector2f(image_size.x, image_size.y));
background.setFillColor(sf::Color::White);
@@ -73,7 +73,7 @@ namespace QuickMedia {
sf::Text error_message("Downloading page " + page_str, *font, 30);
auto text_bounds = error_message.getLocalBounds();
error_message.setFillColor(sf::Color::Black);
- sf::Vector2<double> render_pos_text(std::floor(window_size.x * 0.5 - text_bounds.width * 0.5), std::floor(- text_bounds.height * 0.5 + scroll + offset_y));
+ sf::Vector2<double> render_pos_text(window_size.x * 0.5 - text_bounds.width * 0.5, - text_bounds.height * 0.5 + scroll + offset_y);
sf::RectangleShape background(sf::Vector2f(image_size.x, image_size.y));
background.setFillColor(sf::Color::White);
diff --git a/src/plugins/Youtube.cpp b/src/plugins/Youtube.cpp
index 3c98f12..c0180d8 100644
--- a/src/plugins/Youtube.cpp
+++ b/src/plugins/Youtube.cpp
@@ -1,5 +1,4 @@
#include "../../plugins/Youtube.hpp"
-#include <quickmedia/HtmlSearch.h>
#include <json/reader.h>
#include <string.h>