fix name of row and column layout

This commit is contained in:
hippoz 2022-10-15 00:55:54 +03:00
parent f22979c7cc
commit 805c9ff194
No known key found for this signature in database
GPG key ID: 7C52899193467641
5 changed files with 11 additions and 11 deletions

View file

@ -4,7 +4,7 @@
namespace Raven { namespace Raven {
void VerticalBoxLayout::run() { void ColumnLayout::run() {
if (!m_target) { if (!m_target) {
return; return;
} }

View file

@ -4,14 +4,14 @@
namespace Raven { namespace Raven {
class VerticalBoxLayout : public Layout { class ColumnLayout : public Layout {
private: private:
double m_margin { 0.0 }; double m_margin { 0.0 };
public: public:
VerticalBoxLayout() ColumnLayout()
: Layout() {} : Layout() {}
VerticalBoxLayout(double margin) ColumnLayout(double margin)
: Layout() : Layout()
, m_margin(margin) {} , m_margin(margin) {}
@ -20,7 +20,7 @@ public:
double margin() { return m_margin; } double margin() { return m_margin; }
void set_margin(double margin) { m_margin = margin; run(); } void set_margin(double margin) { m_margin = margin; run(); }
virtual ~VerticalBoxLayout() {} virtual ~ColumnLayout() {}
}; };
} }

View file

@ -4,7 +4,7 @@
namespace Raven { namespace Raven {
void HorizontalBoxLayout::run() { void RowLayout::run() {
if (!m_target) { if (!m_target) {
return; return;
} }

View file

@ -4,14 +4,14 @@
namespace Raven { namespace Raven {
class HorizontalBoxLayout : public Layout { class RowLayout : public Layout {
private: private:
double m_margin { 0.0 }; double m_margin { 0.0 };
public: public:
HorizontalBoxLayout() RowLayout()
: Layout() {} : Layout() {}
HorizontalBoxLayout(double margin) RowLayout(double margin)
: Layout() : Layout()
, m_margin(margin) {} , m_margin(margin) {}
@ -20,7 +20,7 @@ public:
double margin() { return m_margin; } double margin() { return m_margin; }
void set_margin(double margin) { m_margin = margin; run(); } void set_margin(double margin) { m_margin = margin; run(); }
virtual ~HorizontalBoxLayout() {} virtual ~RowLayout() {}
}; };
} }

View file

@ -32,7 +32,7 @@ int main() {
auto list_view = main_widget->add<Raven::ListView>(); auto list_view = main_widget->add<Raven::ListView>();
auto content = main_widget->add<Raven::Widget>(); auto content = main_widget->add<Raven::Widget>();
auto content_layout = content->set_layout<Raven::VerticalBoxLayout>(); auto content_layout = content->set_layout<Raven::ColumnLayout>();
content_layout->set_margin(6.0); content_layout->set_margin(6.0);
content->set_style(&Raven::raised_widget_style); content->set_style(&Raven::raised_widget_style);