diff options
-rw-r--r-- | README.md | 3 | ||||
-rw-r--r-- | src/QuickMedia.cpp | 22 | ||||
-rw-r--r-- | src/SearchBar.cpp | 4 |
3 files changed, 25 insertions, 4 deletions
@@ -10,12 +10,13 @@ Config data, including manga progress is stored under `$HOME/.config/quickmedia` Cache is stored under `$HOME/.cache/quickmedia`. ## Usage ``` -usage: QuickMedia <plugin> [--tor] [--use-system-mpv-config] [-p placeholder-text] +usage: QuickMedia <plugin> [--tor] [--use-system-mpv-config] [--dir <directory>] [-p <placeholder-text>] OPTIONS: plugin The plugin to use. Should be either 4chan, manganelo, mangatown, mangadex, youtube, nyaa.si, matrix, file-manager or dmenu --tor Use tor. Disabled by default --use-system-mpv-config Use system mpv config instead of no config. Disabled by default --upscale-images Upscale low-resolution manga pages using waifu2x-ncnn-vulkan. Disabled by default + --dir Set the start directory when using file-manager -p Change the placeholder text for dmenu EXAMPLES: QuickMedia manganelo diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp index a11ce2a..8e7c8af 100644 --- a/src/QuickMedia.cpp +++ b/src/QuickMedia.cpp @@ -1080,6 +1080,9 @@ namespace QuickMedia { const float tab_spacer_height = 0.0f; + sf::RectangleShape tab_shade; + tab_shade.setFillColor(sf::Color(33, 38, 44)); + sf::RoundedRectangleShape tab_background(sf::Vector2f(1.0f, 1.0f), 10.0f, 10); tab_background.setFillColor(tab_selected_color); @@ -1203,6 +1206,10 @@ namespace QuickMedia { } const float tab_y = tab_spacer_height + std::floor(tab_vertical_offset + tab_height * 0.5f - (tab_text_size + 5.0f) * 0.5f); + tab_shade.setPosition(0.0f, tab_spacer_height + std::floor(tab_vertical_offset)); + tab_shade.setSize(sf::Vector2f(window_size.x, tab_height + 10.0f)); + window.draw(tab_shade); + int i = 0; for(Tab &tab : tabs) { if(i == selected_tab) { @@ -1846,6 +1853,9 @@ namespace QuickMedia { bool redraw = true; sf::Event event; + sf::RectangleShape tab_shade; + tab_shade.setFillColor(sf::Color(33, 38, 44)); + sf::RoundedRectangleShape tab_background(sf::Vector2f(1.0f, 1.0f), 10.0f, 10); tab_background.setFillColor(tab_selected_color); @@ -1910,6 +1920,10 @@ namespace QuickMedia { tabs[selected_tab].body->draw(window, body_pos, body_size); const float tab_y = tab_spacer_height + std::floor(tab_vertical_offset + tab_height * 0.5f - (tab_text_size + 5.0f) * 0.5f); + tab_shade.setPosition(0.0f, tab_spacer_height + std::floor(tab_vertical_offset)); + tab_shade.setSize(sf::Vector2f(window_size.x, tab_height + 10.0f)); + window.draw(tab_shade); + int i = 0; for(EpisodeListTab &tab : tabs) { if(tab.type == EpisodeListTabType::CREATOR @@ -3194,7 +3208,6 @@ namespace QuickMedia { const int MESSAGES_TAB_INDEX = 0; const int ROOMS_TAB_INDEX = 1; - tabs[MESSAGES_TAB_INDEX].body->clear_items(); /* if(matrix->get_cached_sync(tabs[MESSAGES_TAB_INDEX].body->items) != PluginResult::OK) { fprintf(stderr, "Failed to get matrix cached sync\n"); @@ -3323,6 +3336,9 @@ namespace QuickMedia { bool redraw = true; sf::Event event; + sf::RectangleShape tab_shade; + tab_shade.setFillColor(sf::Color(33, 38, 44)); + sf::RoundedRectangleShape tab_background(sf::Vector2f(1.0f, 1.0f), 10.0f, 10); tab_background.setFillColor(tab_selected_color); @@ -3444,6 +3460,10 @@ namespace QuickMedia { tabs[selected_tab].body->draw(window, body_pos, body_size); const float tab_y = tab_spacer_height + std::floor(tab_vertical_offset + tab_height * 0.5f - (tab_text_size + 5.0f) * 0.5f); + tab_shade.setPosition(0.0f, tab_spacer_height + std::floor(tab_vertical_offset)); + tab_shade.setSize(sf::Vector2f(window_size.x, tab_height + 10.0f)); + window.draw(tab_shade); + int i = 0; for(ChatTab &tab : tabs) { if(i == selected_tab) { diff --git a/src/SearchBar.cpp b/src/SearchBar.cpp index ad5c298..ad6f709 100644 --- a/src/SearchBar.cpp +++ b/src/SearchBar.cpp @@ -39,7 +39,7 @@ namespace QuickMedia { //background.setCornersRadius(5); background_shadow.setFillColor(sf::Color(23, 25, 27)); //background_shadow.setPosition(background.getPosition() + sf::Vector2f(5.0f, 5.0f)); - shade.setFillColor(sf::Color(55, 60, 68)); + shade.setFillColor(sf::Color(33, 38, 44)); //background.setOutlineThickness(1.0f); //background.setOutlineColor(sf::Color(13, 15, 17)); if(plugin_logo && plugin_logo->getNativeHandle() != 0) @@ -55,7 +55,7 @@ namespace QuickMedia { (void)draw_shadow; //if(draw_shadow) // window.draw(background_shadow); - //window.draw(shade); + window.draw(shade); window.draw(background); // TODO: Render starting from the character after text length window.draw(autocomplete_text); |