mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03:00
LibGUI+FileManager: Misc tweaks courtesy of clang-format
This commit is contained in:
parent
fdeb91e000
commit
10324f95b0
Notes:
sideshowbarker
2024-07-19 10:13:22 +09:00
Author: https://github.com/bugaevc Commit: https://github.com/SerenityOS/serenity/commit/10324f95b02 Pull-request: https://github.com/SerenityOS/serenity/pull/1050
@ -272,8 +272,10 @@ int main(int argc, char** argv)
|
||||
properties->exec();
|
||||
});
|
||||
|
||||
enum class ConfirmBeforeDelete { No,
|
||||
Yes };
|
||||
enum class ConfirmBeforeDelete {
|
||||
No,
|
||||
Yes
|
||||
};
|
||||
|
||||
auto do_delete = [&](ConfirmBeforeDelete confirm, const GAction& action) {
|
||||
Vector<String> paths;
|
||||
|
@ -1,8 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <LibCore/CTimer.h>
|
||||
#include <LibGUI/GWidget.h>
|
||||
#include <LibDraw/TextAlignment.h>
|
||||
#include <LibGUI/GWidget.h>
|
||||
|
||||
class GPainter;
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include <AK/String.h>
|
||||
#include <AK/Badge.h>
|
||||
#include <AK/Function.h>
|
||||
#include <AK/HashTable.h>
|
||||
#include <AK/NonnullRefPtr.h>
|
||||
#include <AK/RefCounted.h>
|
||||
#include <AK/String.h>
|
||||
#include <AK/WeakPtr.h>
|
||||
#include <AK/Weakable.h>
|
||||
#include <LibDraw/GraphicsBitmap.h>
|
||||
|
@ -1,10 +1,10 @@
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <Kernel/KeyCode.h>
|
||||
#include <LibDraw/StylePainter.h>
|
||||
#include <LibGUI/GAction.h>
|
||||
#include <LibGUI/GActionGroup.h>
|
||||
#include <LibGUI/GButton.h>
|
||||
#include <LibGUI/GPainter.h>
|
||||
#include <LibDraw/StylePainter.h>
|
||||
|
||||
GButton::GButton(GWidget* parent)
|
||||
: GAbstractButton(parent)
|
||||
|
@ -1,11 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include <AK/String.h>
|
||||
#include <AK/Function.h>
|
||||
#include <LibGUI/GAbstractButton.h>
|
||||
#include <AK/String.h>
|
||||
#include <LibDraw/GraphicsBitmap.h>
|
||||
#include <LibDraw/StylePainter.h>
|
||||
#include <LibDraw/TextAlignment.h>
|
||||
#include <LibGUI/GAbstractButton.h>
|
||||
|
||||
class GAction;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <AK/String.h>
|
||||
#include <AK/Function.h>
|
||||
#include <AK/String.h>
|
||||
#include <LibGUI/GAbstractButton.h>
|
||||
|
||||
class GCheckBox : public GAbstractButton {
|
||||
|
@ -1,8 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <AK/String.h>
|
||||
#include <AK/Badge.h>
|
||||
#include <AK/Function.h>
|
||||
#include <AK/String.h>
|
||||
#include <LibDraw/Rect.h>
|
||||
|
||||
class GWindowServerConnection;
|
||||
|
@ -1,8 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <AK/String.h>
|
||||
#include <AK/Function.h>
|
||||
#include <AK/HashMap.h>
|
||||
#include <AK/String.h>
|
||||
|
||||
class Font;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include <LibDraw/StylePainter.h>
|
||||
#include <LibGUI/GFrame.h>
|
||||
#include <LibGUI/GPainter.h>
|
||||
#include <LibDraw/StylePainter.h>
|
||||
|
||||
GFrame::GFrame(GWidget* parent)
|
||||
: GWidget(parent)
|
||||
|
@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <LibGUI/GWidget.h>
|
||||
#include <LibDraw/StylePainter.h>
|
||||
#include <LibGUI/GWidget.h>
|
||||
|
||||
class GFrame : public GWidget {
|
||||
C_OBJECT(GFrame)
|
||||
|
@ -116,7 +116,7 @@ void GItemView::mousedown_event(GMouseEvent& event)
|
||||
if (event.button() == GMouseButton::Left) {
|
||||
m_left_mousedown_position = event.position();
|
||||
if (item_index == -1) {
|
||||
if(event.modifiers() & Mod_Ctrl) {
|
||||
if (event.modifiers() & Mod_Ctrl) {
|
||||
selection().for_each_index([&](auto& index) {
|
||||
m_rubber_band_remembered_selection.append(index);
|
||||
});
|
||||
@ -150,7 +150,7 @@ void GItemView::mouseup_event(GMouseEvent& event)
|
||||
}
|
||||
int item_index = item_at_event_position(event.position());
|
||||
auto index = model()->index(item_index, m_model_column);
|
||||
if((selection().size() > 1) & m_might_drag) {
|
||||
if ((selection().size() > 1) & m_might_drag) {
|
||||
selection().set(index);
|
||||
m_might_drag = false;
|
||||
}
|
||||
@ -170,7 +170,7 @@ void GItemView::mousemove_event(GMouseEvent& event)
|
||||
for (auto item_index : items_intersecting_rect(rubber_band_rect)) {
|
||||
selection().add(model()->index(item_index, model_column()));
|
||||
}
|
||||
if(event.modifiers() & Mod_Ctrl) {
|
||||
if (event.modifiers() & Mod_Ctrl) {
|
||||
for (auto storeditem : m_rubber_band_remembered_selection) {
|
||||
selection().add(storeditem);
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <LibGUI/GFrame.h>
|
||||
#include <LibDraw/TextAlignment.h>
|
||||
#include <LibGUI/GFrame.h>
|
||||
|
||||
class GraphicsBitmap;
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#include <AK/String.h>
|
||||
#include <AK/Badge.h>
|
||||
#include <AK/NonnullOwnPtr.h>
|
||||
#include <AK/OwnPtr.h>
|
||||
#include <AK/String.h>
|
||||
|
||||
class GAction;
|
||||
class GMenu;
|
||||
|
@ -26,7 +26,7 @@ public:
|
||||
virtual GVariant value() const = 0;
|
||||
virtual void set_value(const GVariant&) = 0;
|
||||
|
||||
virtual void will_begin_editing() { }
|
||||
virtual void will_begin_editing() {}
|
||||
|
||||
protected:
|
||||
virtual RefPtr<GWidget> create_widget() = 0;
|
||||
|
@ -66,7 +66,6 @@ void GUndoStack::push(NonnullOwnPtr<GCommand>&& command)
|
||||
m_stack[0].m_undo_vector.prepend(move(command));
|
||||
}
|
||||
|
||||
|
||||
void GUndoStack::finalize_current_combo()
|
||||
{
|
||||
if (m_stack.is_empty())
|
||||
|
Loading…
Reference in New Issue
Block a user