moved navigation to the right
This commit is contained in:
@@ -12,7 +12,7 @@ QWidget *wrapLayout(QLayout *layout)
|
||||
return widget;
|
||||
}
|
||||
|
||||
QScrollArea *makeScrollArea(LayoutItem item)
|
||||
QScrollArea *makeScrollArea(WidgetOrLayout item)
|
||||
{
|
||||
auto area = new QScrollArea();
|
||||
|
||||
|
||||
@@ -8,10 +8,11 @@ class QScrollArea;
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
using LayoutItem = boost::variant<QWidget *, QLayout *>;
|
||||
using LayoutItem = boost::variant<QWidget *, QLayoutItem *>;
|
||||
using WidgetOrLayout = boost::variant<QWidget *, QLayout *>;
|
||||
|
||||
QWidget *wrapLayout(QLayout *layout);
|
||||
QScrollArea *makeScrollArea(LayoutItem item);
|
||||
QScrollArea *makeScrollArea(WidgetOrLayout item);
|
||||
|
||||
template <typename T>
|
||||
T *makeLayout(std::initializer_list<LayoutItem> items)
|
||||
@@ -26,7 +27,7 @@ T *makeLayout(std::initializer_list<LayoutItem> items)
|
||||
t->addItem(new QWidgetItem(boost::get<QWidget *>(item)));
|
||||
break;
|
||||
case 1:
|
||||
t->addItem(boost::get<QLayout *>(item));
|
||||
t->addItem(boost::get<QLayoutItem *>(item));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -36,14 +37,6 @@ T *makeLayout(std::initializer_list<LayoutItem> items)
|
||||
return t;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
T *makeStretchingLayout(std::initializer_list<LayoutItem> items)
|
||||
{
|
||||
auto layout = makeLayout<T>(items);
|
||||
layout->addStretch(1);
|
||||
return layout;
|
||||
}
|
||||
|
||||
template <typename T, typename With>
|
||||
T *makeWidget(With with)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user