moved navigation to the right

This commit is contained in:
fourtf
2020-10-23 09:32:45 +02:00
parent 74e2242da2
commit 5f54b1b495
7 changed files with 36 additions and 18 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ QWidget *wrapLayout(QLayout *layout)
return widget;
}
QScrollArea *makeScrollArea(LayoutItem item)
QScrollArea *makeScrollArea(WidgetOrLayout item)
{
auto area = new QScrollArea();
+4 -11
View File
@@ -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)
{