mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-27 19:59:03 +00:00
icc: Tweak output to look nicer
Align header on the `:`, and make bitmask output more structured.
This commit is contained in:
parent
49b30d3013
commit
e47e5f5ce0
Notes:
sideshowbarker
2024-07-18 04:46:35 +09:00
Author: https://github.com/nico
Commit: e47e5f5ce0
Pull-request: https://github.com/SerenityOS/serenity/pull/17117
Reviewed-by: https://github.com/linusg
1 changed files with 28 additions and 24 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2022, Nico Weber <thakis@chromium.org>
|
* Copyright (c) 2022-2023, Nico Weber <thakis@chromium.org>
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: BSD-2-Clause
|
* SPDX-License-Identifier: BSD-2-Clause
|
||||||
*/
|
*/
|
||||||
|
@ -41,8 +41,8 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||||
|
|
||||||
auto flags = profile->flags();
|
auto flags = profile->flags();
|
||||||
outln(" flags: 0x{:08x}", flags.bits());
|
outln(" flags: 0x{:08x}", flags.bits());
|
||||||
outln(" embedded in file: {}", flags.is_embedded_in_file() ? "yes" : "no");
|
outln(" - {}embedded in file", flags.is_embedded_in_file() ? "" : "not ");
|
||||||
outln(" can be used independently of embedded color data: {}", flags.can_be_used_independently_of_embedded_color_data() ? "yes" : "no");
|
outln(" - can{} be used independently of embedded color data", flags.can_be_used_independently_of_embedded_color_data() ? "" : "not");
|
||||||
if (auto unknown_icc_bits = flags.icc_bits() & ~Gfx::ICC::Flags::KnownBitsMask)
|
if (auto unknown_icc_bits = flags.icc_bits() & ~Gfx::ICC::Flags::KnownBitsMask)
|
||||||
outln(" other unknown ICC bits: 0x{:04x}", unknown_icc_bits);
|
outln(" other unknown ICC bits: 0x{:04x}", unknown_icc_bits);
|
||||||
if (auto color_management_module_bits = flags.color_management_module_bits())
|
if (auto color_management_module_bits = flags.color_management_module_bits())
|
||||||
|
@ -53,10 +53,14 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||||
|
|
||||||
auto device_attributes = profile->device_attributes();
|
auto device_attributes = profile->device_attributes();
|
||||||
outln(" device attributes: 0x{:016x}", device_attributes.bits());
|
outln(" device attributes: 0x{:016x}", device_attributes.bits());
|
||||||
outln(" media is {}, {}, {}, {}",
|
outln(" media is:");
|
||||||
device_attributes.media_reflectivity() == Gfx::ICC::DeviceAttributes::MediaReflectivity::Reflective ? "reflective" : "transparent",
|
outln(" - {}",
|
||||||
device_attributes.media_glossiness() == Gfx::ICC::DeviceAttributes::MediaGlossiness::Glossy ? "glossy" : "matte",
|
device_attributes.media_reflectivity() == Gfx::ICC::DeviceAttributes::MediaReflectivity::Reflective ? "reflective" : "transparent");
|
||||||
device_attributes.media_polarity() == Gfx::ICC::DeviceAttributes::MediaPolarity::Positive ? "of positive polarity" : "of negative polarity",
|
outln(" - {}",
|
||||||
|
device_attributes.media_glossiness() == Gfx::ICC::DeviceAttributes::MediaGlossiness::Glossy ? "glossy" : "matte");
|
||||||
|
outln(" - {}",
|
||||||
|
device_attributes.media_polarity() == Gfx::ICC::DeviceAttributes::MediaPolarity::Positive ? "of positive polarity" : "of negative polarity");
|
||||||
|
outln(" - {}",
|
||||||
device_attributes.media_color() == Gfx::ICC::DeviceAttributes::MediaColor::Colored ? "colored" : "black and white");
|
device_attributes.media_color() == Gfx::ICC::DeviceAttributes::MediaColor::Colored ? "colored" : "black and white");
|
||||||
VERIFY((flags.icc_bits() & ~Gfx::ICC::DeviceAttributes::KnownBitsMask) == 0);
|
VERIFY((flags.icc_bits() & ~Gfx::ICC::DeviceAttributes::KnownBitsMask) == 0);
|
||||||
if (auto vendor_bits = device_attributes.vendor_bits())
|
if (auto vendor_bits = device_attributes.vendor_bits())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue