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 {
void VerticalBoxLayout::run() {
void ColumnLayout::run() {
if (!m_target) {
return;
}

View file

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

View file

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

View file

@ -4,14 +4,14 @@
namespace Raven {
class HorizontalBoxLayout : public Layout {
class RowLayout : public Layout {
private:
double m_margin { 0.0 };
public:
HorizontalBoxLayout()
RowLayout()
: Layout() {}
HorizontalBoxLayout(double margin)
RowLayout(double margin)
: Layout()
, m_margin(margin) {}
@ -20,7 +20,7 @@ public:
double margin() { return m_margin; }
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 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->set_style(&Raven::raised_widget_style);