Skip to content

Commit

Permalink
UI: Fix alignment of volume sliders
Browse files Browse the repository at this point in the history
With the Yami themes, the volume sliders wouldn't
be aligned in the center of the layout.
  • Loading branch information
cg2121 authored and WizardCM committed Oct 1, 2022
1 parent ff0f5ca commit 193d48f
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 28 deletions.
4 changes: 0 additions & 4 deletions UI/data/themes/Acri.qss
Original file line number Diff line number Diff line change
Expand Up @@ -974,10 +974,6 @@ QHeaderView::section {

/* Mute CheckBox */

MuteCheckBox {
margin: 4px 0px 0px;
}

MuteCheckBox::indicator:checked {
image: url(./Dark/mute.svg);
}
Expand Down
4 changes: 0 additions & 4 deletions UI/data/themes/Grey.qss
Original file line number Diff line number Diff line change
Expand Up @@ -962,10 +962,6 @@ QHeaderView::section {

/* Mute CheckBox */

MuteCheckBox {
margin: 4px 0px 0px;
}

MuteCheckBox::indicator:checked {
image: url(./Dark/mute.svg);
}
Expand Down
4 changes: 0 additions & 4 deletions UI/data/themes/Light.qss
Original file line number Diff line number Diff line change
Expand Up @@ -962,10 +962,6 @@ QHeaderView::section {

/* Mute CheckBox */

MuteCheckBox {
margin: 4px 0px 0px;
}

MuteCheckBox::indicator:checked {
image: url(./Light/mute.svg);
}
Expand Down
4 changes: 0 additions & 4 deletions UI/data/themes/Rachni.qss
Original file line number Diff line number Diff line change
Expand Up @@ -966,10 +966,6 @@ QHeaderView::section {

/* Mute CheckBox */

MuteCheckBox {
margin: 4px 0px 0px;
}

MuteCheckBox::indicator:checked {
image: url(./Dark/mute.svg);
}
Expand Down
4 changes: 0 additions & 4 deletions UI/data/themes/Yami.qss
Original file line number Diff line number Diff line change
Expand Up @@ -966,10 +966,6 @@ QHeaderView::section {

/* Mute CheckBox */

MuteCheckBox {
margin: 4px 0px 0px;
}

MuteCheckBox::indicator:checked {
image: url(./Dark/mute.svg);
}
Expand Down
16 changes: 8 additions & 8 deletions UI/volume-control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@ VolControl::VolControl(OBSSource source_, bool showConfig, bool vertical)

setMaximumWidth(110);
} else {
QHBoxLayout *volLayout = new QHBoxLayout;
QHBoxLayout *textLayout = new QHBoxLayout;
QHBoxLayout *botLayout = new QHBoxLayout;

Expand All @@ -261,16 +260,17 @@ VolControl::VolControl(OBSSource source_, bool showConfig, bool vertical)
textLayout->setAlignment(nameLabel, Qt::AlignLeft);
textLayout->setAlignment(volLabel, Qt::AlignRight);

volLayout->addWidget(slider);
volLayout->addWidget(mute);
volLayout->setSpacing(5);

botLayout->setContentsMargins(0, 0, 0, 0);
botLayout->setSpacing(0);
botLayout->addLayout(volLayout);
botLayout->setSpacing(5);
botLayout->addWidget(slider);
botLayout->addWidget(mute);
botLayout->setAlignment(slider, Qt::AlignVCenter);
botLayout->setAlignment(mute, Qt::AlignVCenter);

if (showConfig)
if (showConfig) {
botLayout->addWidget(config);
botLayout->setAlignment(config, Qt::AlignVCenter);
}

mainLayout->addItem(textLayout);
mainLayout->addWidget(volMeter);
Expand Down

0 comments on commit 193d48f

Please sign in to comment.