aboutsummaryrefslogtreecommitdiff
path: root/src/QuickMedia.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/QuickMedia.cpp')
-rw-r--r--src/QuickMedia.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp
index 79684ed..279cb28 100644
--- a/src/QuickMedia.cpp
+++ b/src/QuickMedia.cpp
@@ -2067,7 +2067,7 @@ namespace QuickMedia {
}
if(!tabs[selected_tab].page->is_ready()) {
- mgl::Text loading_text("Loading...", *FontLoader::get_font(FontLoader::FontType::LATIN, get_config().body.loading_text_font_size * get_config().scale * get_config().font_scale));
+ mgl::Text loading_text("Loading...", *FontLoader::get_font(FontLoader::FontType::LATIN, get_config().body.loading_text_font_size * get_config().scale * get_config().font_scale * get_config().font.scale.latin));
loading_text.set_color(get_theme().text_color);
auto text_bounds = loading_text.get_bounds();
loading_text.set_position(mgl::vec2f(
@@ -2154,7 +2154,7 @@ namespace QuickMedia {
std::vector<TabAssociatedData> tab_associated_data;
for(size_t i = 0; i < tabs.size(); ++i) {
TabAssociatedData data;
- data.search_result_text = mgl::Text("", *FontLoader::get_font(FontLoader::FontType::LATIN, get_config().body.loading_text_font_size * get_config().scale * get_config().font_scale));
+ data.search_result_text = mgl::Text("", *FontLoader::get_font(FontLoader::FontType::LATIN, get_config().body.loading_text_font_size * get_config().scale * get_config().font_scale * get_config().font.scale.latin));
data.search_result_text.set_color(get_theme().text_color);
data.card_view = tabs[i].body ? tabs[i].body->card_view : false;
tab_associated_data.push_back(std::move(data));
@@ -4233,7 +4233,7 @@ namespace QuickMedia {
mgl::Texture image_texture;
mgl::Sprite image;
- mgl::Text error_message("", *FontLoader::get_font(FontLoader::FontType::LATIN, get_config().body.loading_text_font_size * get_config().scale * get_config().font_scale));
+ mgl::Text error_message("", *FontLoader::get_font(FontLoader::FontType::LATIN, get_config().body.loading_text_font_size * get_config().scale * get_config().font_scale * get_config().font.scale.latin));
error_message.set_color(get_theme().text_color);
bool download_in_progress = false;
@@ -4270,7 +4270,7 @@ namespace QuickMedia {
bool error = !error_message.get_string().empty();
bool redraw = true;
- const int chapter_text_character_size = 14 * get_config().scale * get_config().font_scale;
+ const int chapter_text_character_size = 14 * get_config().scale * get_config().font_scale * get_config().font.scale.latin;
mgl::Text chapter_text(images_page->manga_name + " | " + images_page->get_chapter_name() + " | Page " + std::to_string(image_index + 1) + "/" + std::to_string(num_manga_pages), *FontLoader::get_font(FontLoader::FontType::LATIN, chapter_text_character_size));
if(image_index == num_manga_pages)
chapter_text.set_string(images_page->manga_name + " | " + images_page->get_chapter_name() + " | End");
@@ -4627,7 +4627,7 @@ namespace QuickMedia {
std::string captcha_post_id;
std::string captcha_solution;
std::string comment_to_post;
- const int captcha_solution_text_height = 18 * get_config().scale * get_config().font_scale;
+ const int captcha_solution_text_height = 18 * get_config().scale * get_config().font_scale * get_config().font.scale.latin_bold;
mgl::Text captcha_solution_text("", *FontLoader::get_font(FontLoader::FontType::LATIN_BOLD, captcha_solution_text_height));
captcha_solution_text.set_color(get_theme().text_color);
int solved_captcha_ttl = 0;
@@ -5270,7 +5270,7 @@ namespace QuickMedia {
time_left_bg.set_color(mgl::Color(0, 0, 0, 100));
window.draw(time_left_bg);
- mgl::Text time_left_text("Wait " + std::to_string(time_left_until_post_again) + " second(s) before posting again", *FontLoader::get_font(FontLoader::FontType::LATIN, 18 * get_config().scale * get_config().font_scale));
+ mgl::Text time_left_text("Wait " + std::to_string(time_left_until_post_again) + " second(s) before posting again", *FontLoader::get_font(FontLoader::FontType::LATIN, 18 * get_config().scale * get_config().font_scale * get_config().font.scale.latin));
time_left_text.set_color(get_theme().text_color);
time_left_text.set_position(time_left_bg.get_position() +
mgl::vec2f(
@@ -5558,18 +5558,18 @@ namespace QuickMedia {
// Year 2500.. The year that humanity is wiped out. Also we want our local message to appear at the bottom even if time is not synced with ntp, until it's replaced by the server
constexpr int64_t timestamp_provisional_event = 16755030000LL * 1000LL;
- const float room_name_text_height = std::floor(get_config().matrix.room_name_font_size * get_config().scale * get_config().font_scale);
+ const float room_name_text_height = std::floor(get_config().matrix.room_name_font_size * get_config().scale * get_config().font_scale * get_config().font.scale.latin_bold);
mgl::Text room_name_text("", *FontLoader::get_font(FontLoader::FontType::LATIN_BOLD, room_name_text_height));
room_name_text.set_color(get_theme().text_color);
const float room_name_text_padding_y = std::floor(10.0f * get_config().scale);
const float room_name_total_height = room_name_text_height + room_name_text_padding_y * 2.0f;
const float room_avatar_height = 32.0f;
- const float room_topic_text_height = std::floor(get_config().matrix.room_description_font_size * get_config().scale * get_config().font_scale);
+ const float room_topic_text_height = std::floor(get_config().matrix.room_description_font_size * get_config().scale * get_config().font_scale * get_config().font.scale.latin);
mgl::Text room_topic_text("", *FontLoader::get_font(FontLoader::FontType::LATIN, room_topic_text_height));
room_topic_text.set_color(get_theme().faded_text_color);
- mgl::Text room_label(matrix_chat_page->rooms_page->get_title(), *FontLoader::get_font(FontLoader::FontType::LATIN_BOLD, get_config().matrix.room_name_font_size * get_config().scale * get_config().font_scale));
+ mgl::Text room_label(matrix_chat_page->rooms_page->get_title(), *FontLoader::get_font(FontLoader::FontType::LATIN_BOLD, get_config().matrix.room_name_font_size * get_config().scale * get_config().font_scale * get_config().font.scale.latin_bold));
room_label.set_color(get_theme().text_color);
room_label.set_position(mgl::vec2f(15.0f, room_name_text_padding_y + 4.0f));
@@ -5689,7 +5689,7 @@ namespace QuickMedia {
ChatState chat_state = ChatState::NAVIGATING;
std::shared_ptr<BodyItem> currently_operating_on_item;
- mgl::Text replying_to_text("Replying to:", *FontLoader::get_font(FontLoader::FontType::LATIN, 18 * get_config().scale * get_config().font_scale));
+ mgl::Text replying_to_text("Replying to:", *FontLoader::get_font(FontLoader::FontType::LATIN, 18 * get_config().scale * get_config().font_scale * get_config().font.scale.latin));
replying_to_text.set_color(get_theme().text_color);
bool draw_room_list = show_room_side_panel;
@@ -6057,7 +6057,7 @@ namespace QuickMedia {
Mention mention;
mention.users_tab_body = tabs[USERS_TAB_INDEX].body.get();
- const float user_mention_body_height = std::floor(300.0f * get_config().scale * get_config().font_scale);
+ const float user_mention_body_height = std::floor(300.0f * get_config().scale);
bool frame_skip_text_entry = false;
@@ -7562,8 +7562,8 @@ namespace QuickMedia {
const float body_width = window_size.x;
this->body_pos = mgl::vec2f(0.0f, tab_shade_height);
- if(window_size.x > 900.0f * get_config().scale * get_config().font_scale && show_room_side_panel) {
- this->body_size = vec2f_floor(300.0f * get_config().scale * get_config().font_scale, window_size.y - tab_shade_height);
+ if(window_size.x > 900.0f * get_config().scale && show_room_side_panel) {
+ this->body_size = vec2f_floor(300.0f * get_config().scale, window_size.y - tab_shade_height);
draw_room_list = true;
} else {
this->body_size = mgl::vec2f(0.0f, 0.0f);
@@ -8158,13 +8158,13 @@ namespace QuickMedia {
const float spacing_y = std::floor(15.0f * get_config().scale * get_config().spacing_scale);
const float loading_bar_height = std::floor(20.0f * get_config().scale);
- mgl::Text progress_text("0kb/Unknown", *FontLoader::get_font(FontLoader::FontType::LATIN, 20.0f * get_config().scale * get_config().font_scale));
+ mgl::Text progress_text("0kb/Unknown", *FontLoader::get_font(FontLoader::FontType::LATIN, 20.0f * get_config().scale * get_config().font_scale * get_config().font.scale.latin));
progress_text.set_color(get_theme().text_color);
- mgl::Text status_text("Downloading", *FontLoader::get_font(FontLoader::FontType::LATIN, 20.0f * get_config().scale * get_config().font_scale));
+ mgl::Text status_text("Downloading", *FontLoader::get_font(FontLoader::FontType::LATIN, 20.0f * get_config().scale * get_config().font_scale * get_config().font.scale.latin));
status_text.set_color(get_theme().text_color);
- mgl::Text filename_text(filename.c_str(), *FontLoader::get_font(FontLoader::FontType::LATIN, 14.0f * get_config().scale * get_config().font_scale));
+ mgl::Text filename_text(filename.c_str(), *FontLoader::get_font(FontLoader::FontType::LATIN, 14.0f * get_config().scale * get_config().font_scale * get_config().font.scale.latin));
filename_text.set_color(get_theme().faded_text_color);
- mgl::Text download_speed_text("0 bytes/s", *FontLoader::get_font(FontLoader::FontType::LATIN, 14.0f * get_config().scale * get_config().font_scale));
+ mgl::Text download_speed_text("0 bytes/s", *FontLoader::get_font(FontLoader::FontType::LATIN, 14.0f * get_config().scale * get_config().font_scale * get_config().font.scale.latin));
download_speed_text.set_color(get_theme().faded_text_color);
bool redraw = true;
@@ -8342,13 +8342,13 @@ namespace QuickMedia {
const float bottom_panel_padding = std::floor(10.0f * get_config().spacing_scale);
const float bottom_panel_spacing = std::floor(10.0f * get_config().spacing_scale);
- Button cancel_button("Cancel", FontLoader::get_font(FontLoader::FontType::LATIN, 16 * get_config().scale), 100.0f, &rounded_rectangle_shader, get_config().scale * get_config().font_scale);
+ Button cancel_button("Cancel", FontLoader::get_font(FontLoader::FontType::LATIN, 16 * get_config().scale), 100.0f, &rounded_rectangle_shader, get_config().scale * get_config().font_scale * get_config().font.scale.latin);
cancel_button.set_background_color(get_theme().cancel_button_background_color);
- Button save_button("Save", FontLoader::get_font(FontLoader::FontType::LATIN, 16 * get_config().scale), 100.0f, &rounded_rectangle_shader, get_config().scale * get_config().font_scale);
+ Button save_button("Save", FontLoader::get_font(FontLoader::FontType::LATIN, 16 * get_config().scale), 100.0f, &rounded_rectangle_shader, get_config().scale * get_config().font_scale * get_config().font.scale.latin);
save_button.set_background_color(get_theme().confirm_button_background_color);
- mgl::Text file_name_label("File name:", *FontLoader::get_font(FontLoader::FontType::LATIN, 16.0f * get_config().scale * get_config().font_scale));
+ mgl::Text file_name_label("File name:", *FontLoader::get_font(FontLoader::FontType::LATIN, 16.0f * get_config().scale * get_config().font_scale * get_config().font.scale.latin));
file_name_label.set_color(get_theme().text_color);
Entry file_name_entry("", &rounded_rectangle_shader);