From 94fdd3f71b27bd28b643df8bfe68c07f9a3cae8b Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 5 Jun 2021 23:21:56 +0200 Subject: Revert back highlight colors --- README.md | 17 ++++++++++------- TODO | 3 ++- src/Body.cpp | 13 +++++-------- src/Entry.cpp | 2 +- src/SearchBar.cpp | 2 +- src/Tabs.cpp | 2 +- 6 files changed, 20 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 75ad9ca..103efb1 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ Type text and then wait and QuickMedia will automatically search.\ `Ctrl+D`: Clear the input text.\ `Ctrl+C`: Copy the text in the selected item to your clipboard.\ `Ctrl+V`: Paste clipboard content into the search bar.\ -`Ctrl+I`: Select which url in the selected item to open in a browser.\ +`Ctrl+I`: Select which url in the selected item to open in a browser. ### Video controls `mpv` controls apply in general, see https://mpv.io/manual/master/#interactive-control.\ `Esc`/`Backspace`/`Q`: Close the video.\ @@ -65,6 +65,9 @@ Type text and then wait and QuickMedia will automatically search.\ ### Manga chapters controls `Ctrl+T`: Start tracking the manga after the selected chapter ([AutoMedia](https://git.dec05eba.com/AutoMedia/) needs to be installed). ### Matrix controls +#### Login page controls +`Tab`: Switch between username, password and homeserver fields.\ +`Enter`: Login. #### Chat page controls `I`: Start typing a message, `Esc` to cancel.\ `R`: Start replying to the selected message, `Esc` to cancel.\ @@ -103,18 +106,18 @@ Type text and then wait and QuickMedia will automatically search.\ `U`: Bring up file manager to choose which file should be uploaded, `Esc` to cancel.\ `Ctrl+D`: Remove the selected file from the post.\ `Ctrl+I`: Reverse image search the selected image or select an url to open in the browser.\ -`1 to 9`/`Numpad 1 to 9`: Select google captcha image when posting a comment on 4chan.\ +`1 to 9`/`Numpad 1 to 9`: Select/deselect google captcha image when posting a comment on 4chan.\ `Ctrl+S`: Save the image/video attached to the selected post.\ ### File save controls `Tab`: Switch between navigating the file manager and file name.\ `Ctrl+Enter`/`Click on save`: Download the file.\ `Esc`/`Click on cancel`: Cancel download.\ ## Matrix text commands -`/upload` to upload an image.\ -`/logout` to logout.\ -`/leave` to leave the current room.\ -`/me [text]` to send a message of type "m.emote".\ -`/react [text]` to react to the selected message or if you are replying to message then it reacts to that message. +`/upload`: Bring up the file manager and select a file to upload to the room, `Esc` to cancel.\ +`/logout`: Logout.\ +`/leave`: Leave the current room.\ +`/me [text]`: Send a message of type "m.emote".\ +`/react [text]`: React to the selected message or if you are replying to message then it reacts to that message. ## Environment variables Set `QM_PHONE_FACTOR=1` to disable the room list side panel in matrix. ## UI scaling diff --git a/TODO b/TODO index 5f0fdfa..a1ae9ff 100644 --- a/TODO +++ b/TODO @@ -149,4 +149,5 @@ Display youtube playlists differently and support downloading the whole playlist To fix jitter in body when items are added before the selected item, we should increase page_scroll by the height of the new item. Cancel current search when search is updated. Support 4chan archive. -Use old method of rendering body where rendering items is done up and down, starting from the selected item. This will make quickmedia run as fast when displaying 100 000 items as when displaying 10 items. \ No newline at end of file +Use old method of rendering body where rendering items is done up and down, starting from the selected item. This will make quickmedia run as fast when displaying 100 000 items as when displaying 10 items. +Use correct spacing when in grid (card) mode. Should be row spacing instead of body spacing. \ No newline at end of file diff --git a/src/Body.cpp b/src/Body.cpp index 4833741..d2af084 100644 --- a/src/Body.cpp +++ b/src/Body.cpp @@ -176,7 +176,7 @@ namespace QuickMedia { num_visible_items(0), top_cut_off(false), bottom_cut_off(false), - item_background(sf::Vector2f(1.0f, 1.0f), 10.0f, sf::Color(60, 65, 73), rounded_rectangle_shader), + item_background(sf::Vector2f(1.0f, 1.0f), 10.0f, sf::Color(55, 60, 68), rounded_rectangle_shader), reaction_background(sf::Vector2f(1.0f, 1.0f), 10.0f, sf::Color(33, 37, 44), rounded_rectangle_shader), rounded_rectangle_mask_shader(rounded_rectangle_mask_shader) { @@ -949,7 +949,7 @@ namespace QuickMedia { if(prev_num_visible_items > 0 && render_selected_item_bg && body_theme == BODY_THEME_MINIMAL) { item_background.set_position(sf::Vector2f(pos.x, item_background_prev_pos.y)); item_background.set_size(item_background_prev_size); - item_background.set_color(sf::Color(60, 65, 73)); + item_background.set_color(sf::Color(55, 60, 68)); item_background.set_band(sf::Vector2f(0.0f, 0.0f), sf::Vector2f(0.0f, 0.0f)); item_background.draw(window); } @@ -1106,9 +1106,6 @@ namespace QuickMedia { const int space_left_row_each = space_left_column_each; - //item_background.set_band_color(sf::Color(60, 65, 73)); - //item_background.set_band(item_background_prev_pos_y - pos.y, item_background_prev_height); - if(page_scroll > 0.0) page_scroll = 0.0; @@ -1146,7 +1143,7 @@ namespace QuickMedia { item_background.set_size(sf::Vector2f(card_width, card_height)); item_background.set_color(sf::Color(33, 37, 44)); item_background.set_band(item_background_prev_pos - (pos + pos_offset), item_background_prev_size); - item_background.set_band_color(sf::Color(60, 65, 73)); + item_background.set_band_color(sf::Color(55, 60, 68)); item_background.draw(window); { @@ -1225,7 +1222,7 @@ namespace QuickMedia { const float gradient_height = 5.0f; if(text_offset_y >= text_height - gradient_height) { const sf::Vector2f card_bottom(text_pos.x, text_height); - const sf::Color color = item_index == selected_item ? sf::Color(60, 65, 73) : sf::Color(33, 37, 44); + const sf::Color color = item_index == selected_item ? sf::Color(55, 60, 68) : sf::Color(33, 37, 44); sf::Vertex gradient_points[4]; gradient_points[0] = sf::Vertex(card_bottom + sf::Vector2f(0.0f, -gradient_height), sf::Color(color.r, color.g, color.b, 0)); @@ -1295,7 +1292,7 @@ namespace QuickMedia { item_background.set_position(item_pos); item_background.set_color(sf::Color(33, 37, 44)); item_background.set_band(item_background_prev_pos - pos, item_background_prev_size); - item_background.set_band_color(sf::Color(60, 65, 73)); + item_background.set_band_color(sf::Color(55, 60, 68)); item_background.draw(window); } diff --git a/src/Entry.cpp b/src/Entry.cpp index 28e3034..7e1b6d9 100644 --- a/src/Entry.cpp +++ b/src/Entry.cpp @@ -16,7 +16,7 @@ namespace QuickMedia { draw_background(true), text("", false, std::floor(16 * get_ui_scale()), 0.0f), width(0.0f), - background(sf::Vector2f(1.0f, 1.0f), 10.0f, sf::Color(60, 65, 73), rounded_rectangle_shader), + background(sf::Vector2f(1.0f, 1.0f), 10.0f, sf::Color(55, 60, 68), rounded_rectangle_shader), placeholder(placeholder_text, *FontLoader::get_font(FontLoader::FontType::LATIN), std::floor(16 * get_ui_scale())), mouse_left_inside(false) { diff --git a/src/SearchBar.cpp b/src/SearchBar.cpp index a54fc5d..3fd2296 100644 --- a/src/SearchBar.cpp +++ b/src/SearchBar.cpp @@ -11,7 +11,7 @@ // TODO: Use a seperate placeholder sf::Text instead of switching the text to placeholder text.... static const sf::Color text_placeholder_color(255, 255, 255, 100); -static const sf::Color front_color(60, 65, 73); +static const sf::Color front_color(55, 60, 68); static const float background_margin_horizontal = 10.0f + std::floor(5.0f * QuickMedia::get_ui_scale()); static const float padding_top_default = std::floor(10.0f * QuickMedia::get_ui_scale()); static const float padding_bottom_default = std::floor(15.0f * QuickMedia::get_ui_scale()); diff --git a/src/Tabs.cpp b/src/Tabs.cpp index 35eccf5..b943615 100644 --- a/src/Tabs.cpp +++ b/src/Tabs.cpp @@ -10,7 +10,7 @@ namespace QuickMedia { static const float tab_text_size = std::floor(16.0f * QuickMedia::get_ui_scale()); static const float tab_height = tab_text_size + std::floor(10.0f * QuickMedia::get_ui_scale()); - static const sf::Color tab_selected_color(60, 65, 73); + static const sf::Color tab_selected_color(55, 60, 68); static const sf::Color arrow_color(255, 255, 255, 175); static const float tab_min_width = 250.0f; static const float tab_margin_x = 10.0f; -- cgit v1.2.3