2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Improve privacy and security settings subsections.

This commit is contained in:
John Preston
2018-09-15 13:37:48 +03:00
parent f582fbf010
commit 5c7155c3a5
6 changed files with 63 additions and 58 deletions

View File

@@ -119,7 +119,8 @@ not_null<Button*> AddButton(
void CreateRightLabel(
not_null<Button*> button,
rpl::producer<QString> label) {
rpl::producer<QString> label,
const style::InfoProfileButton &st) {
const auto name = Ui::CreateChild<Ui::FlatLabel>(
button.get(),
std::move(label),
@@ -128,9 +129,7 @@ void CreateRightLabel(
name->widthValue(),
button->widthValue()
) | rpl::start_with_next([=] {
name->moveToRight(
st::settingsButtonRightPosition.x(),
st::settingsButtonRightPosition.y());
name->moveToRight(st::settingsButtonRightSkip, st.padding.top());
}, name->lifetime());
name->setAttribute(Qt::WA_TransparentForMouseEvents);
}
@@ -142,7 +141,7 @@ not_null<Button*> AddButtonWithLabel(
const style::InfoProfileButton &st,
const style::icon *leftIcon) {
const auto button = AddButton(container, text, st, leftIcon);
CreateRightLabel(button, std::move(label));
CreateRightLabel(button, std::move(label), st);
return button;
}