mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-26 20:26:53 +00:00
SpaceAnalyzer: Show folder total size
This commit is contained in:
parent
674f3d0347
commit
5836710e8f
Notes:
sideshowbarker
2024-07-19 17:26:36 +09:00
Author: https://github.com/krkk 🔰
Commit: 5836710e8f
Pull-request: https://github.com/SerenityOS/serenity/pull/8616
1 changed files with 3 additions and 1 deletions
|
@ -97,10 +97,12 @@ void TreeMapWidget::paint_cell_frame(GUI::Painter& painter, const TreeMapNode& n
|
||||||
painter.add_clip_rect(cell_rect);
|
painter.add_clip_rect(cell_rect);
|
||||||
Gfx::IntRect text_rect = remainder;
|
Gfx::IntRect text_rect = remainder;
|
||||||
text_rect.translate_by(2, 2);
|
text_rect.translate_by(2, 2);
|
||||||
painter.draw_text(text_rect, node.name(), font(), Gfx::TextAlignment::TopLeft, Color::Black);
|
|
||||||
if (node_is_leaf(node)) {
|
if (node_is_leaf(node)) {
|
||||||
|
painter.draw_text(text_rect, node.name(), font(), Gfx::TextAlignment::TopLeft, Color::Black);
|
||||||
text_rect.translate_by(0, font().presentation_size() + 1);
|
text_rect.translate_by(0, font().presentation_size() + 1);
|
||||||
painter.draw_text(text_rect, human_readable_size(node.area()), font(), Gfx::TextAlignment::TopLeft, Color::Black);
|
painter.draw_text(text_rect, human_readable_size(node.area()), font(), Gfx::TextAlignment::TopLeft, Color::Black);
|
||||||
|
} else {
|
||||||
|
painter.draw_text(text_rect, String::formatted("{} - {}", node.name(), human_readable_size(node.area())), font(), Gfx::TextAlignment::TopLeft, Color::Black);
|
||||||
}
|
}
|
||||||
painter.clear_clip_rect();
|
painter.clear_clip_rect();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue