aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2025-04-15 00:15:46 +0200
committerdec05eba <dec05eba@protonmail.com>2025-04-15 00:15:46 +0200
commit6fe0cf09b4567fc532a3d619b1b573ba4e95a1a3 (patch)
treee4bd4f34ccf755b4310b5496ce1e022ff3d2b45c
parent0018788780d756dbf0d3a77f6b40b384183348f7 (diff)
Clearer delete, update mglppHEADmaster
m---------depends/mglpp0
-rw-r--r--images/delete.pngbin0 -> 511 bytes
-rw-r--r--images/trash.pngbin691 -> 0 bytes
-rw-r--r--include/Theme.hpp2
-rw-r--r--src/Theme.cpp20
-rw-r--r--src/gui/Button.cpp2
-rw-r--r--src/gui/ComboBox.cpp2
-rw-r--r--src/gui/SettingsPage.cpp10
8 files changed, 19 insertions, 17 deletions
diff --git a/depends/mglpp b/depends/mglpp
-Subproject 7d6e67668ba317d823f58f9bd8edbea2da9f4b6
+Subproject 0c90a62d08ef8846b2516342f7a3ded10415f3b
diff --git a/images/delete.png b/images/delete.png
new file mode 100644
index 0000000..f4ac335
--- /dev/null
+++ b/images/delete.png
Binary files differ
diff --git a/images/trash.png b/images/trash.png
deleted file mode 100644
index cf1d9de..0000000
--- a/images/trash.png
+++ /dev/null
Binary files differ
diff --git a/include/Theme.hpp b/include/Theme.hpp
index 670980f..fac1dcf 100644
--- a/include/Theme.hpp
+++ b/include/Theme.hpp
@@ -42,7 +42,7 @@ namespace gsr {
mgl::Texture pause_texture;
mgl::Texture save_texture;
mgl::Texture screenshot_texture;
- mgl::Texture trash_texture;
+ mgl::Texture delete_texture;
mgl::Texture ps4_home_texture;
mgl::Texture ps4_options_texture;
diff --git a/src/Theme.cpp b/src/Theme.cpp
index c813834..143662b 100644
--- a/src/Theme.cpp
+++ b/src/Theme.cpp
@@ -75,7 +75,7 @@ namespace gsr {
if(!theme->folder_texture.load_from_file((resources_path + "images/folder.png").c_str()))
goto error;
- if(!theme->up_arrow_texture.load_from_file((resources_path + "images/up_arrow.png").c_str(), mgl::Texture::LoadOptions{false, false, true}))
+ if(!theme->up_arrow_texture.load_from_file((resources_path + "images/up_arrow.png").c_str(), mgl::Texture::LoadOptions{false, false, MGL_TEXTURE_SCALE_LINEAR_MIPMAP}))
goto error;
if(!theme->replay_button_texture.load_from_file((resources_path + "images/replay.png").c_str()))
@@ -93,10 +93,10 @@ namespace gsr {
if(!theme->logo_texture.load_from_file((resources_path + "images/gpu_screen_recorder_logo.png").c_str()))
goto error;
- if(!theme->checkbox_circle_texture.load_from_file((resources_path + "images/checkbox_circle.png").c_str(), mgl::Texture::LoadOptions{false, false, true}))
+ if(!theme->checkbox_circle_texture.load_from_file((resources_path + "images/checkbox_circle.png").c_str(), mgl::Texture::LoadOptions{false, false, MGL_TEXTURE_SCALE_LINEAR_MIPMAP}))
goto error;
- if(!theme->checkbox_background_texture.load_from_file((resources_path + "images/checkbox_background.png").c_str(), mgl::Texture::LoadOptions{false, false, true}))
+ if(!theme->checkbox_background_texture.load_from_file((resources_path + "images/checkbox_background.png").c_str(), mgl::Texture::LoadOptions{false, false, MGL_TEXTURE_SCALE_LINEAR_MIPMAP}))
goto error;
if(!theme->play_texture.load_from_file((resources_path + "images/play.png").c_str()))
@@ -114,25 +114,25 @@ namespace gsr {
if(!theme->screenshot_texture.load_from_file((resources_path + "images/screenshot.png").c_str()))
goto error;
- if(!theme->trash_texture.load_from_file((resources_path + "images/trash.png").c_str(), mgl::Texture::LoadOptions{false, false, true}))
+ if(!theme->delete_texture.load_from_file((resources_path + "images/delete.png").c_str(), mgl::Texture::LoadOptions{false, false, MGL_TEXTURE_SCALE_LINEAR_MIPMAP}))
goto error;
- if(!theme->ps4_home_texture.load_from_file((resources_path + "images/ps4_home.png").c_str(), mgl::Texture::LoadOptions{false, false, true}))
+ if(!theme->ps4_home_texture.load_from_file((resources_path + "images/ps4_home.png").c_str(), mgl::Texture::LoadOptions{false, false, MGL_TEXTURE_SCALE_LINEAR_MIPMAP}))
goto error;
- if(!theme->ps4_options_texture.load_from_file((resources_path + "images/ps4_options.png").c_str(), mgl::Texture::LoadOptions{false, false, true}))
+ if(!theme->ps4_options_texture.load_from_file((resources_path + "images/ps4_options.png").c_str(), mgl::Texture::LoadOptions{false, false, MGL_TEXTURE_SCALE_LINEAR_MIPMAP}))
goto error;
- if(!theme->ps4_dpad_up_texture.load_from_file((resources_path + "images/ps4_dpad_up.png").c_str(), mgl::Texture::LoadOptions{false, false, true}))
+ if(!theme->ps4_dpad_up_texture.load_from_file((resources_path + "images/ps4_dpad_up.png").c_str(), mgl::Texture::LoadOptions{false, false, MGL_TEXTURE_SCALE_LINEAR_MIPMAP}))
goto error;
- if(!theme->ps4_dpad_down_texture.load_from_file((resources_path + "images/ps4_dpad_down.png").c_str(), mgl::Texture::LoadOptions{false, false, true}))
+ if(!theme->ps4_dpad_down_texture.load_from_file((resources_path + "images/ps4_dpad_down.png").c_str(), mgl::Texture::LoadOptions{false, false, MGL_TEXTURE_SCALE_LINEAR_MIPMAP}))
goto error;
- if(!theme->ps4_dpad_left_texture.load_from_file((resources_path + "images/ps4_dpad_left.png").c_str(), mgl::Texture::LoadOptions{false, false, true}))
+ if(!theme->ps4_dpad_left_texture.load_from_file((resources_path + "images/ps4_dpad_left.png").c_str(), mgl::Texture::LoadOptions{false, false, MGL_TEXTURE_SCALE_LINEAR_MIPMAP}))
goto error;
- if(!theme->ps4_dpad_right_texture.load_from_file((resources_path + "images/ps4_dpad_right.png").c_str(), mgl::Texture::LoadOptions{false, false, true}))
+ if(!theme->ps4_dpad_right_texture.load_from_file((resources_path + "images/ps4_dpad_right.png").c_str(), mgl::Texture::LoadOptions{false, false, MGL_TEXTURE_SCALE_LINEAR_MIPMAP}))
goto error;
return true;
diff --git a/src/gui/Button.cpp b/src/gui/Button.cpp
index d8cb85b..6e343c4 100644
--- a/src/gui/Button.cpp
+++ b/src/gui/Button.cpp
@@ -63,7 +63,7 @@ namespace gsr {
window.draw(sprite);
const int padding_icon_right = padding_right_icon_scale * get_button_height();
- text.set_position((sprite.get_position() + mgl::vec2f(sprite.get_size().x + padding_icon_right, sprite.get_size().y * 0.5f - text.get_bounds().size.y * 0.5f)).floor());
+ text.set_position((sprite.get_position() + mgl::vec2f(sprite.get_size().x + padding_icon_right, sprite.get_size().y * 0.5f - text.get_bounds().size.y * 0.52f)).floor());
window.draw(text);
} else {
text.set_position((draw_pos + item_size * 0.5f - text.get_bounds().size * 0.5f).floor());
diff --git a/src/gui/ComboBox.cpp b/src/gui/ComboBox.cpp
index 08c4ec2..dbe9aa0 100644
--- a/src/gui/ComboBox.cpp
+++ b/src/gui/ComboBox.cpp
@@ -85,7 +85,7 @@ namespace gsr {
void ComboBox::add_item(const std::string &text, const std::string &id) {
items.push_back({mgl::Text(text, *font), id, {0.0f, 0.0f}});
- items.back().text.set_max_width(font->get_character_size() * 25); // TODO: Make a proper solution
+ items.back().text.set_max_width(font->get_character_size() * 22); // TODO: Make a proper solution
//items.back().text.set_max_rows(1);
dirty = true;
}
diff --git a/src/gui/SettingsPage.cpp b/src/gui/SettingsPage.cpp
index 94eeb0d..af338c8 100644
--- a/src/gui/SettingsPage.cpp
+++ b/src/gui/SettingsPage.cpp
@@ -227,8 +227,9 @@ namespace gsr {
}
std::unique_ptr<Button> SettingsPage::create_remove_audio_device_button(List *audio_input_list_ptr, List *audio_device_list_ptr) {
- auto remove_audio_track_button = std::make_unique<Button>(&get_theme().body_font, "", mgl::vec2f(0.0f, 0.0f), mgl::Color(35, 40, 44));
- remove_audio_track_button->set_icon(&get_theme().trash_texture);
+ auto remove_audio_track_button = std::make_unique<Button>(&get_theme().body_font, "Delete", mgl::vec2f(0.0f, 0.0f), mgl::Color(0, 0, 0, 120));
+ remove_audio_track_button->set_icon(&get_theme().delete_texture);
+ remove_audio_track_button->set_icon_padding_scale(1.0f);
remove_audio_track_button->on_click = [audio_input_list_ptr, audio_device_list_ptr]() {
audio_input_list_ptr->remove_widget(audio_device_list_ptr);
};
@@ -349,8 +350,9 @@ namespace gsr {
auto list = std::make_unique<List>(List::Orientation::HORIZONTAL, List::Alignment::CENTER);
list->add_widget(std::make_unique<Label>(&get_theme().title_font, title, get_color_theme().text_color));
- auto remove_track_button = std::make_unique<Button>(&get_theme().body_font, "", mgl::vec2f(0.0f, 0.0f), mgl::Color(35, 40, 44));
- remove_track_button->set_icon(&get_theme().trash_texture);
+ auto remove_track_button = std::make_unique<Button>(&get_theme().body_font, "Delete", mgl::vec2f(0.0f, 0.0f), mgl::Color(0, 0, 0, 120));
+ remove_track_button->set_icon(&get_theme().delete_texture);
+ remove_track_button->set_icon_padding_scale(1.0f);
remove_track_button->on_click = [this, audio_track_subsection]() {
audio_track_section_list_ptr->remove_widget(audio_track_subsection);
update_audio_track_titles(audio_track_section_list_ptr);