From 4f184114de24149d9bd6d64a2511bfe79deb170a Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 17 Sep 2019 22:39:48 +0200 Subject: [PATCH] VisualBuilder: Add icons for the layout menu actions --- Base/res/icons/16x16/layout-horizontally.png | Bin 0 -> 104 bytes Base/res/icons/16x16/layout-vertically.png | Bin 0 -> 95 bytes DevTools/VisualBuilder/VBForm.cpp | 5 +++-- 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 Base/res/icons/16x16/layout-horizontally.png create mode 100644 Base/res/icons/16x16/layout-vertically.png diff --git a/Base/res/icons/16x16/layout-horizontally.png b/Base/res/icons/16x16/layout-horizontally.png new file mode 100644 index 0000000000000000000000000000000000000000..45caadb13178252c1a38f69b3a9112c50f671458 GIT binary patch literal 104 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%``kpS1Ar_~T6C^%02=@M;A5!b{ z!s!41|LH&e|F@4bGfG%=g?lj@4;!_8@ir>mdKI;Vst0LFtJ A)Bpeg literal 0 HcmV?d00001 diff --git a/Base/res/icons/16x16/layout-vertically.png b/Base/res/icons/16x16/layout-vertically.png new file mode 100644 index 0000000000000000000000000000000000000000..21bd239d94950d48b5deb987284ce4d9621b8e59 GIT binary patch literal 95 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`YMw5RAr_~T6C^%02=@M;A5yFH s!s!41$L7rw1+V%o3)JtaN~~aDXf@&$f3p0hEKmo7r>mdKI;Vst0G_ZN8~^|S literal 0 HcmV?d00001 diff --git a/DevTools/VisualBuilder/VBForm.cpp b/DevTools/VisualBuilder/VBForm.cpp index 8e7ef948e0..84362a0b8f 100644 --- a/DevTools/VisualBuilder/VBForm.cpp +++ b/DevTools/VisualBuilder/VBForm.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include @@ -37,13 +38,13 @@ VBForm::VBForm(const String& name, GWidget* parent) widget->gwidget()->move_to_back(); })); m_context_menu->add_separator(); - m_context_menu->add_action(GAction::create("Lay out horizontally", [this](auto&) { + m_context_menu->add_action(GAction::create("Lay out horizontally", load_png("/res/icons/16x16/layout-horizontally.png"), [this](auto&) { if (auto* widget = single_selected_widget()) { dbg() << "Giving " << *widget->gwidget() << " a horizontal box layout"; widget->gwidget()->set_layout(make(Orientation::Horizontal)); } })); - m_context_menu->add_action(GAction::create("Lay out vertically", [this](auto&) { + m_context_menu->add_action(GAction::create("Lay out vertically", load_png("/res/icons/16x16/layout-vertically.png"), [this](auto&) { if (auto* widget = single_selected_widget()) { dbg() << "Giving " << *widget->gwidget() << " a vertical box layout"; widget->gwidget()->set_layout(make(Orientation::Vertical));