aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shaders/rounded_rectangle.glsl2
-rw-r--r--shaders/rounded_rectangle_no_shadow.glsl2
-rw-r--r--src/QuickMedia.cpp17
3 files changed, 8 insertions, 13 deletions
diff --git a/shaders/rounded_rectangle.glsl b/shaders/rounded_rectangle.glsl
index 40babe2..92accfd 100644
--- a/shaders/rounded_rectangle.glsl
+++ b/shaders/rounded_rectangle.glsl
@@ -14,5 +14,5 @@ void main() {
float rect_dist = rounded_rect(uv - center, size, radius);
float a = clamp(1.0 - smoothstep(0.0, 1.0, rect_dist), 0.0, 1.0);
float shadow_a = clamp(1.0 - smoothstep(0.0, shadow_offset.x, rect_dist), 0.0, 1.0);
- gl_FragColor = mix(vec4(gl_Color.rgb, a), vec4(0.0, 0.0, 0.0, 0.14), clamp(shadow_a - a, 0.0, 1.0));
+ gl_FragColor = mix(vec4(gl_Color.rgb, gl_Color.a * a), vec4(0.0, 0.0, 0.0, 0.14), clamp(shadow_a - a, 0.0, 1.0));
} \ No newline at end of file
diff --git a/shaders/rounded_rectangle_no_shadow.glsl b/shaders/rounded_rectangle_no_shadow.glsl
index b12b35c..fe8b48f 100644
--- a/shaders/rounded_rectangle_no_shadow.glsl
+++ b/shaders/rounded_rectangle_no_shadow.glsl
@@ -13,5 +13,5 @@ void main() {
float rect_dist = rounded_rect(uv - center, size, radius);
float a = clamp(1.0 - smoothstep(0.0, 1.0, rect_dist), 0.0, 1.0);
- gl_FragColor = vec4(gl_Color.rgb, a);
+ gl_FragColor = vec4(gl_Color.rgb, gl_Color.a * a);
} \ No newline at end of file
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp
index 069378e..594c1e1 100644
--- a/src/QuickMedia.cpp
+++ b/src/QuickMedia.cpp
@@ -2485,7 +2485,9 @@ namespace QuickMedia {
if(event.type == mgl::Event::Resized) {
window_size.x = event.size.width;
window_size.y = event.size.height;
- } else if(event.type == mgl::Event::KeyPressed && event.key.code == mgl::Keyboard::Escape) {
+ } else if(event.type == mgl::Event::KeyPressed
+ && (event.key.code == mgl::Keyboard::Escape || event.key.code == mgl::Keyboard::Backspace))
+ {
task.cancel();
task_result = TaskResult::CANCEL;
goto task_end;
@@ -3149,11 +3151,10 @@ namespace QuickMedia {
// Find video that hasn't been played before in this video session
auto find_next_video = [this, parent_body, move_in_parent, &related_videos, &video_page, &new_video_url]() {
for(auto it = related_videos.begin(), end = related_videos.end(); it != end; ++it) {
- if(!(*it)->url.empty() && watched_videos.find((*it)->url) == watched_videos.end() && !video_page->video_should_be_skipped((*it)->url)) {
- if(parent_body && move_in_parent) {
- parent_body->filter_search_fuzzy("");
+ if((*it)->visible && !(*it)->url.empty() && watched_videos.find((*it)->url) == watched_videos.end() && !video_page->video_should_be_skipped((*it)->url)) {
+ if(parent_body && move_in_parent)
parent_body->set_selected_item(it->get());
- }
+
new_video_url = (*it)->url;
related_videos.erase(it);
break;
@@ -3986,14 +3987,8 @@ namespace QuickMedia {
current_page = PageType::VIDEO_CONTENT;
watched_videos.clear();
thread_page->set_url(selected_item->url);
- BodyItems next_items;
- int prev_selected = thread_body->get_selected_item();
// TODO: Use real title
video_content_page(thread_page, thread_page, "", true, thread_body, thread_body->get_selected_item());
- if(thread_body->get_selected_item() != prev_selected) {
- comment_navigation_stack.clear();
- comment_page_scroll_stack.clear();
- }
redraw = true;
idle_active_handler();
} else {