Fix auto media download settings box layout.

This commit is contained in:
John Preston 2017-07-12 16:53:42 +03:00
parent c79561e97f
commit f5a405e6f1
4 changed files with 3 additions and 4 deletions

View File

@ -264,7 +264,7 @@ AutoDownloadBox::AutoDownloadBox(QWidget *parent)
, _gifPrivate(this, lang(lng_media_auto_private_chats), !(cAutoDownloadGif() & dbiadNoPrivate), st::defaultBoxCheckbox)
, _gifGroups(this, lang(lng_media_auto_groups), !(cAutoDownloadGif() & dbiadNoGroups), st::defaultBoxCheckbox)
, _gifPlay(this, lang(lng_media_auto_play), cAutoPlayGif(), st::defaultBoxCheckbox)
, _sectionHeight(st::boxTitleHeight + 2 * (st::defaultBoxCheckbox.height + st::setLittleSkip)) {
, _sectionHeight(st::boxTitleHeight + 2 * (st::defaultCheck.diameter + st::setLittleSkip)) {
}
void AutoDownloadBox::prepare() {

View File

@ -145,7 +145,7 @@ int EditPrivacyBox::countDefaultHeight(int newWidth) {
if (!_controller->hasOption(option)) {
return 0;
}
return st::editPrivacyOptionMargin.top() + st::defaultBoxCheckbox.height + st::editPrivacyOptionMargin.bottom();
return st::editPrivacyOptionMargin.top() + st::defaultCheck.diameter + st::editPrivacyOptionMargin.bottom();
};
auto labelHeight = [this, newWidth](const QString &text, const style::FlatLabel &st, style::margins padding) {
if (text.isEmpty()) {

View File

@ -397,7 +397,7 @@ void Checkbox::onStateChanged(State was, StateChangeSource source) {
}
int Checkbox::resizeGetHeight(int newWidth) {
return _st.height ? _st.height : _check->getSize().height();
return _check->getSize().height();
}
QImage Checkbox::prepareRippleMask() const {

View File

@ -135,7 +135,6 @@ Checkbox {
textFg: color;
width: pixels;
height: pixels;
margin: margins;
textPosition: point;