mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-07-27 16:03:03 +02:00
Replaced link button for switch of business hours with small round one.
This commit is contained in:
parent
049ebf9027
commit
e4af1570cb
1 changed files with 7 additions and 8 deletions
|
@ -534,10 +534,7 @@ base::options::toggle ShowPeerIdBelowAbout({
|
||||||
tr::lng_info_hours_label(),
|
tr::lng_info_hours_label(),
|
||||||
st::infoLabel);
|
st::infoLabel);
|
||||||
label->setAttribute(Qt::WA_TransparentForMouseEvents);
|
label->setAttribute(Qt::WA_TransparentForMouseEvents);
|
||||||
const auto link = Ui::CreateChild<Ui::LinkButton>(
|
auto linkText = rpl::combine(
|
||||||
labelWrap,
|
|
||||||
QString());
|
|
||||||
rpl::combine(
|
|
||||||
state->nonTrivial.value(),
|
state->nonTrivial.value(),
|
||||||
state->hours.value(),
|
state->hours.value(),
|
||||||
state->mine.value(),
|
state->mine.value(),
|
||||||
|
@ -552,10 +549,12 @@ base::options::toggle ShowPeerIdBelowAbout({
|
||||||
: my
|
: my
|
||||||
? tr::lng_info_hours_my_time()
|
? tr::lng_info_hours_my_time()
|
||||||
: tr::lng_info_hours_local_time();
|
: tr::lng_info_hours_local_time();
|
||||||
}) | rpl::flatten_latest(
|
}) | rpl::flatten_latest();
|
||||||
) | rpl::start_with_next([=](const QString &text) {
|
const auto link = Ui::CreateChild<Ui::RoundButton>(
|
||||||
link->setText(text);
|
labelWrap,
|
||||||
}, link->lifetime());
|
std::move(linkText),
|
||||||
|
st::defaultTableSmallButton);
|
||||||
|
link->setTextTransform(Ui::RoundButton::TextTransform::NoTransform);
|
||||||
link->setClickedCallback([=] {
|
link->setClickedCallback([=] {
|
||||||
state->myTimezone = !state->myTimezone.current();
|
state->myTimezone = !state->myTimezone.current();
|
||||||
state->expanded = true;
|
state->expanded = true;
|
||||||
|
|
Loading…
Add table
Reference in a new issue