mirror of
https://github.com/RGBCube/serenity
synced 2025-07-19 06:57:34 +00:00
LibGUI: Run clang-format on everything.
This commit is contained in:
parent
bc951ca565
commit
7ad8790d80
43 changed files with 525 additions and 363 deletions
|
@ -2,12 +2,12 @@
|
|||
#include "GEvent.h"
|
||||
#include "GEventLoop.h"
|
||||
#include "GWidget.h"
|
||||
#include <SharedGraphics/GraphicsBitmap.h>
|
||||
#include <LibGUI/GPainter.h>
|
||||
#include <AK/HashMap.h>
|
||||
#include <LibC/stdio.h>
|
||||
#include <LibC/stdlib.h>
|
||||
#include <LibC/unistd.h>
|
||||
#include <AK/HashMap.h>
|
||||
#include <LibGUI/GPainter.h>
|
||||
#include <SharedGraphics/GraphicsBitmap.h>
|
||||
|
||||
//#define UPDATE_COALESCING_DEBUG
|
||||
|
||||
|
@ -235,7 +235,7 @@ void GWindow::event(CEvent& event)
|
|||
auto rect = rects.first();
|
||||
if (rect.is_empty() || created_new_backing_store) {
|
||||
rects.clear();
|
||||
rects.append({ { }, paint_event.window_size() });
|
||||
rects.append({ {}, paint_event.window_size() });
|
||||
}
|
||||
|
||||
for (auto& rect : rects)
|
||||
|
@ -294,10 +294,10 @@ void GWindow::event(CEvent& event)
|
|||
m_back_bitmap = nullptr;
|
||||
if (!m_pending_paint_event_rects.is_empty()) {
|
||||
m_pending_paint_event_rects.clear_with_capacity();
|
||||
m_pending_paint_event_rects.append({ { }, new_size });
|
||||
m_pending_paint_event_rects.append({ {}, new_size });
|
||||
}
|
||||
m_rect_when_windowless = { { }, new_size };
|
||||
m_main_widget->set_relative_rect({ { }, new_size });
|
||||
m_rect_when_windowless = { {}, new_size };
|
||||
m_main_widget->set_relative_rect({ {}, new_size });
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -326,7 +326,7 @@ void GWindow::update(const Rect& a_rect)
|
|||
}
|
||||
|
||||
if (m_pending_paint_event_rects.is_empty()) {
|
||||
deferred_invoke([this] (auto&) {
|
||||
deferred_invoke([this](auto&) {
|
||||
auto rects = move(m_pending_paint_event_rects);
|
||||
if (rects.is_empty())
|
||||
return;
|
||||
|
@ -357,7 +357,7 @@ void GWindow::set_main_widget(GWidget* widget)
|
|||
if (m_main_widget->vertical_size_policy() == SizePolicy::Fixed)
|
||||
new_window_rect.set_height(m_main_widget->preferred_size().height());
|
||||
set_rect(new_window_rect);
|
||||
m_main_widget->set_relative_rect({ { }, new_window_rect.size() });
|
||||
m_main_widget->set_relative_rect({ {}, new_window_rect.size() });
|
||||
m_main_widget->set_window(this);
|
||||
if (m_main_widget->accepts_focus())
|
||||
m_main_widget->set_focus(true);
|
||||
|
@ -530,14 +530,14 @@ void GWindow::start_wm_resize()
|
|||
Vector<GWidget*> GWindow::focusable_widgets() const
|
||||
{
|
||||
if (!m_main_widget)
|
||||
return { };
|
||||
return {};
|
||||
|
||||
Vector<GWidget*> collected_widgets;
|
||||
|
||||
Function<void(GWidget&)> collect_focusable_widgets = [&] (GWidget& widget) {
|
||||
Function<void(GWidget&)> collect_focusable_widgets = [&](GWidget& widget) {
|
||||
if (widget.accepts_focus())
|
||||
collected_widgets.append(&widget);
|
||||
widget.for_each_child_widget([&] (auto& child) {
|
||||
widget.for_each_child_widget([&](auto& child) {
|
||||
if (!child.is_visible())
|
||||
return IterationDecision::Continue;
|
||||
if (!child.is_enabled())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue