aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/QuickMedia.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp
index c515719..5abc71a 100644
--- a/src/QuickMedia.cpp
+++ b/src/QuickMedia.cpp
@@ -492,6 +492,7 @@ namespace QuickMedia {
return tabs;
};
+ no_video = force_no_video;
init(parent_window, program_path);
if(strcmp(plugin_name, "download") == 0) {
@@ -2284,7 +2285,7 @@ namespace QuickMedia {
} else if(event.type == sf::Event::KeyPressed && event.key.code == sf::Keyboard::C && event.key.control) {
save_video_url_to_clipboard();
} else if(event.type == sf::Event::KeyPressed && event.key.code == sf::Keyboard::S && event.key.control) {
- download_async_gui(original_video_url, true, no_video);
+ download_async_gui(original_video_url, !is_matrix, no_video);
}
}
handle_window_close();
@@ -2301,7 +2302,7 @@ namespace QuickMedia {
} else if(pressed_keysym == XK_f && pressing_ctrl) {
window_set_fullscreen(disp, window.getSystemHandle(), WindowFullscreenState::TOGGLE);
} else if(pressed_keysym == XK_s && pressing_ctrl) {
- download_async_gui(original_video_url, true, no_video);
+ download_async_gui(original_video_url, !is_matrix, no_video);
} else if(pressed_keysym == XK_r && pressing_ctrl) {
if(!cursor_visible)
window.setMouseCursorVisible(true);
@@ -5691,7 +5692,6 @@ namespace QuickMedia {
}
bool start() override {
- remove(output_filepath.c_str());
remove(output_filepath_tmp.data.c_str());
const char *args[] = { "curl",
@@ -6219,12 +6219,13 @@ namespace QuickMedia {
if(!new_tabs.empty()) {
file_manager_body->clear_thumbnails();
file_manager_body->items = std::move(new_tabs[0].body->items);
+ file_manager_body->select_first_item();
+ search_bar->clear();
}
} else if(task_result == TaskResult::FALSE) {
show_notification("QuickMedia", "Failed to change directory", Urgency::CRITICAL);
}
- search_bar->clear();
ui_tabs.set_text(tab_path_index, file_manager_page->get_current_directory().string());
};
@@ -6278,6 +6279,8 @@ namespace QuickMedia {
return "";
};
+ float prev_entry_height = file_name_entry.get_height();
+
while (window.isOpen()) {
while (window.pollEvent(event)) {
if(file_manager_body->on_event(window, event, !file_name_entry.is_editable()))
@@ -6320,6 +6323,11 @@ namespace QuickMedia {
handle_window_close();
search_bar->update();
+ if(std::abs(file_name_entry.get_height() - prev_entry_height) >= 1.0f) {
+ prev_entry_height = file_name_entry.get_height();
+ redraw = true;
+ }
+
if(redraw) {
redraw = false;
get_body_dimensions(window_size, search_bar.get(), body_pos, body_size);