From 97ded2dc619d3f510e76ba006286063788fcc770 Mon Sep 17 00:00:00 2001 From: Lucas CHOLLET Date: Thu, 28 Dec 2023 19:30:03 -0500 Subject: [PATCH] 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. --- Userland/Applications/FileManager/PropertiesWindow.cpp | 2 +- Userland/Applications/FileManager/PropertiesWindowImageTab.gml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Userland/Applications/FileManager/PropertiesWindow.cpp b/Userland/Applications/FileManager/PropertiesWindow.cpp index e4dbd5b9a5..6b2678ac68 100644 --- a/Userland/Applications/FileManager/PropertiesWindow.cpp +++ b/Userland/Applications/FileManager/PropertiesWindow.cpp @@ -442,7 +442,7 @@ ErrorOr 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("image_has_icc_profile")->set_text("See below"_string); + tab.find_descendant_of_type_named("image_has_icc_line")->set_visible(false); tab.find_descendant_of_type_named("image_icc_profile")->set_text(icc_profile->tag_string_data(Gfx::ICC::profileDescriptionTag).value_or({})); tab.find_descendant_of_type_named("image_icc_copyright")->set_text(icc_profile->tag_string_data(Gfx::ICC::copyrightTag).value_or({})); tab.find_descendant_of_type_named("image_icc_color_space")->set_text(TRY(String::from_utf8(data_color_space_name(icc_profile->data_color_space())))); diff --git a/Userland/Applications/FileManager/PropertiesWindowImageTab.gml b/Userland/Applications/FileManager/PropertiesWindowImageTab.gml index 25ccb5cf7c..61f2e993ac 100644 --- a/Userland/Applications/FileManager/PropertiesWindowImageTab.gml +++ b/Userland/Applications/FileManager/PropertiesWindowImageTab.gml @@ -68,6 +68,7 @@ } @GUI::Widget { + name: "image_has_icc_line" layout: @GUI::HorizontalBoxLayout { spacing: 12 }