moved navigation to the right
This commit is contained in:
@@ -65,8 +65,9 @@ void SettingsDialogTab::paintEvent(QPaintEvent *)
|
||||
|
||||
a = a + a + 20 + a;
|
||||
|
||||
painter.drawText(QRect(a, 0, width() - a, height()), this->ui_.labelText,
|
||||
QTextOption(Qt::AlignLeft | Qt::AlignVCenter));
|
||||
this->style()->drawItemText(&painter, QRect(a, 0, width() - a, height()),
|
||||
Qt::AlignLeft | Qt::AlignVCenter,
|
||||
this->palette(), false, this->ui_.labelText);
|
||||
}
|
||||
|
||||
void SettingsDialogTab::mousePressEvent(QMouseEvent *event)
|
||||
|
||||
@@ -420,6 +420,7 @@ void GeneralPage::initLayout(GeneralPageView &layout)
|
||||
layout.addCheckbox("Category", s.headerGame);
|
||||
layout.addCheckbox("Title", s.headerStreamTitle);
|
||||
|
||||
layout.addNavigationSpacing();
|
||||
layout.addTitle("Beta");
|
||||
if (Version::instance().isSupportedOS())
|
||||
{
|
||||
@@ -563,7 +564,7 @@ void GeneralPage::initLayout(GeneralPageView &layout)
|
||||
|
||||
// invisible element for width
|
||||
auto inv = new BaseWidget(this);
|
||||
inv->setScaleIndependantWidth(500);
|
||||
// inv->setScaleIndependantWidth(600);
|
||||
layout.addWidget(inv);
|
||||
}
|
||||
|
||||
|
||||
@@ -15,11 +15,16 @@ GeneralPageView::GeneralPageView(QWidget *parent)
|
||||
{
|
||||
auto scrollArea = this->contentScrollArea_ =
|
||||
makeScrollArea(this->contentLayout_ = new QVBoxLayout);
|
||||
scrollArea->setObjectName("generalSettingsScrollContent");
|
||||
|
||||
auto navigation =
|
||||
wrapLayout(this->navigationLayout_ = makeLayout<QVBoxLayout>({}));
|
||||
navigation->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Minimum);
|
||||
this->navigationLayout_->setAlignment(Qt::AlignTop);
|
||||
this->navigationLayout_->addSpacing(6);
|
||||
|
||||
this->setLayout(makeLayout<QHBoxLayout>({scrollArea, navigation}));
|
||||
this->setLayout(makeLayout<QHBoxLayout>(
|
||||
{scrollArea, new QSpacerItem(16, 1), navigation}));
|
||||
|
||||
QObject::connect(scrollArea->verticalScrollBar(), &QScrollBar::valueChanged,
|
||||
this, [=] { this->updateNavigationHighlighting(); });
|
||||
@@ -166,6 +171,11 @@ ColorButton *GeneralPageView::addColorButton(
|
||||
return colorButton;
|
||||
}
|
||||
|
||||
void GeneralPageView::addNavigationSpacing()
|
||||
{
|
||||
this->navigationLayout_->addSpacing(24);
|
||||
}
|
||||
|
||||
DescriptionLabel *GeneralPageView::addDescription(const QString &text)
|
||||
{
|
||||
auto label = new DescriptionLabel(text);
|
||||
@@ -259,7 +269,7 @@ void GeneralPageView::updateNavigationHighlighting()
|
||||
&group == &this->groups_.back()))
|
||||
{
|
||||
first = false;
|
||||
group.navigationLink->setStyleSheet("color: #4FC3F7");
|
||||
group.navigationLink->setStyleSheet("color: #00ABF4");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -87,6 +87,7 @@ public:
|
||||
bool editable = false);
|
||||
ColorButton *addColorButton(const QString &text, const QColor &color,
|
||||
pajlada::Settings::Setting<QString> &setting);
|
||||
void addNavigationSpacing();
|
||||
|
||||
template <typename OnClick>
|
||||
QPushButton *makeButton(const QString &text, OnClick onClick)
|
||||
|
||||
Reference in New Issue
Block a user