mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:38:11 +00:00
Everywhere: Replace uses of __serenity__ with AK_OS_SERENITY
Now that we have OS macros for essentially every supported OS, let's try to use them everywhere.
This commit is contained in:
parent
896d4e8dc1
commit
828441852f
46 changed files with 118 additions and 113 deletions
|
@ -19,7 +19,7 @@ DOMTreeModel::DOMTreeModel(JsonObject dom_tree, GUI::TreeView* tree_view)
|
|||
, m_dom_tree(move(dom_tree))
|
||||
{
|
||||
// FIXME: Get these from the outside somehow instead of hard-coding paths here.
|
||||
#ifdef __serenity__
|
||||
#ifdef AK_OS_SERENITY
|
||||
m_document_icon.set_bitmap_for_size(16, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/filetype-html.png"sv).release_value_but_fixme_should_propagate_errors());
|
||||
m_element_icon.set_bitmap_for_size(16, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/inspector-object.png"sv).release_value_but_fixme_should_propagate_errors());
|
||||
m_text_icon.set_bitmap_for_size(16, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/filetype-unknown.png"sv).release_value_but_fixme_should_propagate_errors());
|
||||
|
@ -123,7 +123,7 @@ GUI::Variant DOMTreeModel::data(const GUI::ModelIndex& index, GUI::ModelRole rol
|
|||
auto type = node.get("type"sv).as_string_or("unknown"sv);
|
||||
|
||||
// FIXME: This FIXME can go away when we fix the one below.
|
||||
#ifdef __serenity__
|
||||
#ifdef AK_OS_SERENITY
|
||||
if (role == GUI::ModelRole::ForegroundColor) {
|
||||
// FIXME: Allow models to return a foreground color *role*.
|
||||
// Then we won't need to have a GUI::TreeView& member anymore.
|
||||
|
@ -138,7 +138,7 @@ GUI::Variant DOMTreeModel::data(const GUI::ModelIndex& index, GUI::ModelRole rol
|
|||
#endif
|
||||
|
||||
// FIXME: This FIXME can go away when the icons are provided from the outside (see constructor).
|
||||
#ifdef __serenity__
|
||||
#ifdef AK_OS_SERENITY
|
||||
if (role == GUI::ModelRole::Icon) {
|
||||
if (type == "document")
|
||||
return m_document_icon;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue