1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:17:44 +00:00

FileManager: Conditionally display the "ICC profile:" line

If the "ICC Profile" group is shown, no need to include the related line
in the "Image" group.
This commit is contained in:
Lucas CHOLLET 2023-12-28 19:30:03 -05:00 committed by Sam Atkins
parent 16b14b0688
commit 97ded2dc61
2 changed files with 2 additions and 1 deletions

View file

@ -442,7 +442,7 @@ ErrorOr<void> PropertiesWindow::create_image_tab(GUI::TabWidget& tab_widget, Non
} else {
auto icc_profile = icc_profile_or_error.release_value();
tab.find_descendant_of_type_named<GUI::Label>("image_has_icc_profile")->set_text("See below"_string);
tab.find_descendant_of_type_named<GUI::Widget>("image_has_icc_line")->set_visible(false);
tab.find_descendant_of_type_named<GUI::Label>("image_icc_profile")->set_text(icc_profile->tag_string_data(Gfx::ICC::profileDescriptionTag).value_or({}));
tab.find_descendant_of_type_named<GUI::Label>("image_icc_copyright")->set_text(icc_profile->tag_string_data(Gfx::ICC::copyrightTag).value_or({}));
tab.find_descendant_of_type_named<GUI::Label>("image_icc_color_space")->set_text(TRY(String::from_utf8(data_color_space_name(icc_profile->data_color_space()))));