fix name of row and column layout
This commit is contained in:
parent
f22979c7cc
commit
805c9ff194
5 changed files with 11 additions and 11 deletions
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
namespace Raven {
|
namespace Raven {
|
||||||
|
|
||||||
void VerticalBoxLayout::run() {
|
void ColumnLayout::run() {
|
||||||
if (!m_target) {
|
if (!m_target) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
namespace Raven {
|
namespace Raven {
|
||||||
|
|
||||||
void HorizontalBoxLayout::run() {
|
void RowLayout::run() {
|
||||||
if (!m_target) {
|
if (!m_target) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue