mirror of
https://github.com/RGBCube/serenity
synced 2025-05-30 17:38:12 +00:00
Welcome: Apply @shannonbooth's recommendations
This commit is contained in:
parent
c07c442640
commit
51628f64fa
1 changed files with 4 additions and 4 deletions
|
@ -71,9 +71,9 @@ Optional<Vector<ContentPage>> parse_welcome_file(const String& path)
|
||||||
if (file->error()) {
|
if (file->error()) {
|
||||||
file->close();
|
file->close();
|
||||||
return error;
|
return error;
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto line = String((char*)buffer.data());
|
auto line = String((char*)buffer.data());
|
||||||
|
@ -101,7 +101,7 @@ Optional<Vector<ContentPage>> parse_welcome_file(const String& path)
|
||||||
case '\n':
|
case '\n':
|
||||||
dbg() << "newline";
|
dbg() << "newline";
|
||||||
|
|
||||||
if (current_output_line.to_string() != String::empty())
|
if (!current_output_line.to_string().is_empty())
|
||||||
current.content.append(current_output_line.to_string());
|
current.content.append(current_output_line.to_string());
|
||||||
current_output_line.clear();
|
current_output_line.clear();
|
||||||
break;
|
break;
|
||||||
|
@ -214,7 +214,7 @@ int main(int argc, char** argv)
|
||||||
title_box->set_preferred_size(0, 16);
|
title_box->set_preferred_size(0, 16);
|
||||||
title_box->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
|
title_box->set_size_policy(GUI::SizePolicy::Fill, GUI::SizePolicy::Fixed);
|
||||||
|
|
||||||
if (page.icon != String::empty()) {
|
if (!page.icon.is_empty()) {
|
||||||
auto icon = GUI::Label::construct(title_box);
|
auto icon = GUI::Label::construct(title_box);
|
||||||
icon->set_icon(Gfx::Bitmap::load_from_file(page.icon));
|
icon->set_icon(Gfx::Bitmap::load_from_file(page.icon));
|
||||||
icon->set_preferred_size(16, 16);
|
icon->set_preferred_size(16, 16);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue