mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-03 16:05:57 +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:
@@ -85,9 +85,9 @@ void BlockWidget::rowHeightUpdated() {
|
||||
}
|
||||
}
|
||||
|
||||
void BlockWidget::createChildRow(object_ptr<Ui::Checkbox> &child, style::margins &margin, const QString &text, const char *slot, bool checked) {
|
||||
void BlockWidget::createChildRow(object_ptr<Ui::Checkbox> &child, style::margins &margin, const QString &text, base::lambda<void(bool checked)> callback, bool checked) {
|
||||
child.create(this, text, checked, st::defaultBoxCheckbox);
|
||||
connect(child, SIGNAL(changed()), this, slot);
|
||||
subscribe(child->checkedChanged, std::move(callback));
|
||||
}
|
||||
|
||||
void BlockWidget::createChildRow(object_ptr<Ui::LinkButton> &child, style::margins &margin, const QString &text, const char *slot, const style::LinkButton &st) {
|
||||
|
Reference in New Issue
Block a user