2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-05 08:55:59 +00:00

Generalize Checkbox layout.

Now any Checkbox can have Check, Radio or Toggle layout.
Radiobutton is now a subclass of Checkbox with default Radio layout.
This commit is contained in:
John Preston
2017-07-07 14:16:37 +03:00
parent 0ecef54e2b
commit 21d2f6a44f
18 changed files with 408 additions and 350 deletions

View File

@@ -244,7 +244,7 @@ void SendFilesBox::prepare() {
auto compressed = (_compressConfirm == CompressConfirm::Auto) ? cCompressPastedImage() : (_compressConfirm == CompressConfirm::Yes);
auto text = lng_send_images_compress(lt_count, _files.size());
_compressed.create(this, text, compressed, st::defaultBoxCheckbox);
connect(_compressed, SIGNAL(changed()), this, SLOT(onCompressedChange()));
subscribe(_compressed->checkedChanged, [this](bool checked) { onCompressedChange(); });
}
if (_caption) {
_caption->setMaxLength(MaxPhotoCaption);