diff --git a/Telegram/Resources/langs/lang.strings b/Telegram/Resources/langs/lang.strings index 47a12e9ce..60ce67f0e 100644 --- a/Telegram/Resources/langs/lang.strings +++ b/Telegram/Resources/langs/lang.strings @@ -1520,14 +1520,14 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "lng_passport_create_password" = "Please create a password which will be used\nto encrypt your personal data."; "lng_passport_about_password" = "This password will also be required whenever\nyou log in to a new device."; "lng_passport_password_create" = "Create a password"; -"lng_passport_link_sent" = "Confirmation link was sent to your email\n{email}"; -"lng_passport_stop_password_sure" = "Are you sure you want to stop your password setup?"; +"lng_passport_link_sent" = "A confirmation link was sent to your email\n{email}"; +"lng_passport_stop_password_sure" = "Are you sure you want to cancel setting up your password?"; "lng_passport_password_placeholder" = "Your password"; "lng_passport_next" = "Next"; "lng_passport_password_wrong" = "The password you entered is not valid."; "lng_passport_header" = "Requested information"; "lng_passport_identity_title" = "Identity document"; -"lng_passport_identity_description" = "Upload a scan of your passport or other ID"; +"lng_passport_identity_description" = "Upload a scan of your passport or another ID"; "lng_passport_identity_passport" = "Passport"; "lng_passport_identity_passport_upload" = "Upload a scan of your passport"; "lng_passport_identity_card" = "Identity card"; @@ -1536,7 +1536,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "lng_passport_identity_license_upload" = "Upload a scan of your driver's license"; "lng_passport_identity_internal" = "Internal passport"; "lng_passport_identity_internal_upload" = "Upload a scan of your internal passport"; -"lng_passport_identity_about" = "Your document must contain your photograph, name and surname, date of birth, citizenship, document issue date and document number."; +"lng_passport_identity_about" = "The document must contain your photograph, first and last name, date of birth, document number, country of issue, and expiry date."; "lng_passport_address_title" = "Residential address"; "lng_passport_address_description" = "Upload a proof of your address"; "lng_passport_address_bill" = "Utility bill"; @@ -1549,14 +1549,14 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "lng_passport_address_registration_upload" = "Upload a scan of your passport registration"; "lng_passport_address_temporary" = "Temporary registration"; "lng_passport_address_temporary_upload" = "Upload a scan of your temporary registration"; -"lng_passport_address_about" = "To confirm your address please upload a scan or photo of the selected document (all pages)."; +"lng_passport_address_about" = "To confirm your address, please upload a scan or photo of the selected document (all pages)."; "lng_passport_document_type" = "Please choose the type of your document:"; "lng_passport_upload_document" = "Upload document"; "lng_passport_phone_title" = "Phone number"; "lng_passport_phone_description" = "Enter your phone number"; "lng_passport_email_title" = "Email"; "lng_passport_email_description" = "Enter your email address"; -"lng_passport_accept_allow" = "You accept {policy} and allow their {bot} to send you messages."; +"lng_passport_accept_allow" = "You accept the {policy} and allow their {bot} to send you messages."; "lng_passport_allow" = "You allow {bot} to send you messages."; "lng_passport_policy" = "{bot} privacy policy"; "lng_passport_authorize" = "Authorize"; @@ -1569,7 +1569,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "lng_passport_upload_more" = "Upload additional scans"; "lng_passport_selfie_title" = "Selfie"; "lng_passport_selfie_name" = "Photo"; -"lng_passport_selfie_description" = "Take a picture of yourself holding your document."; +"lng_passport_selfie_description" = "Upload a photo of yourself holding your document. Make sure the ID and your face are clearly visible."; "lng_passport_upload_selfie" = "Upload selfie"; "lng_passport_front_side_title" = "Front side"; "lng_passport_front_side_name" = "Scan"; @@ -1605,27 +1605,27 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "lng_passport_use_existing_phone" = "Use the same phone number as on Telegram."; "lng_passport_new_phone" = "Or enter a new phone number"; "lng_passport_new_phone_code" = "Note: You will receive a confirmation code on the phone number you provide."; -"lng_passport_use_existing_email" = "Use the same email as on Telegram."; +"lng_passport_use_existing_email" = "Use the same email address as on Telegram."; "lng_passport_new_email" = "Or enter a new email"; -"lng_passport_new_email_code" = "Note: You will receive a confirmation code on the email address you provide."; +"lng_passport_new_email_code" = "Note: You will receive a confirmation code to the email address you provide."; "lng_passport_confirm_phone" = "We've sent an SMS with a confirmation code to your phone {phone}."; "lng_passport_confirm_email" = "We've sent a confirmation code to your email {email}."; -"lng_passport_sure_cancel" = "If you continue your changes will be lost."; -"lng_passport_scans_limit_reached" = "Scans limit reached."; +"lng_passport_sure_cancel" = "If you continue, your changes will be lost."; +"lng_passport_scans_limit_reached" = "Sorry, that's too many scans for one document."; "lng_passport_delete_document" = "Delete document"; "lng_passport_delete_document_sure" = "Are you sure you want to delete this document?"; "lng_passport_delete_details" = "Delete personal details"; "lng_passport_delete_details_sure" = "Are you sure you want to delete your personal details?"; "lng_passport_delete_address" = "Delete address information"; -"lng_passport_delete_address_sure" = "Are you sure you wnat to delete your address information?"; +"lng_passport_delete_address_sure" = "Are you sure you want to delete your address information?"; "lng_passport_delete_email" = "Delete email"; -"lng_passport_delete_email_sure" = "Are you sure you want to delete your email?"; +"lng_passport_delete_email_sure" = "Are you sure you want to delete your email address?"; "lng_passport_delete_phone" = "Delete phone number"; "lng_passport_delete_phone_sure" = "Are you sure you want to delete your phone number?"; "lng_passport_success" = "Authorization successfull!"; "lng_passport_stop_sure" = "Are you sure you want to stop this authorization?"; "lng_passport_stop" = "Stop"; -"lng_passport_restart_sure" = "Unexpected error has occurred. Perhaps some changes were done from a different Telegram application. Would you like to restart this authorization?"; +"lng_passport_restart_sure" = "An unexpected error has occurred. Perhaps some changes were made from a different Telegram application. Would you like to restart this authorization?"; "lng_passport_restart" = "Restart"; "lng_passport_error_too_large" = "This file is too large."; "lng_passport_error_bad_size" = "This image has bad dimensions."; diff --git a/Telegram/SourceFiles/boxes/boxes.style b/Telegram/SourceFiles/boxes/boxes.style index 03588c940..9bafa7d21 100644 --- a/Telegram/SourceFiles/boxes/boxes.style +++ b/Telegram/SourceFiles/boxes/boxes.style @@ -119,6 +119,7 @@ boxLabel: FlatLabel(defaultFlatLabel) { } boxDividerLabel: FlatLabel(boxLabel) { minWidth: 245px; + align: align(topleft); textFg: windowSubTextFg; style: defaultTextStyle; } diff --git a/Telegram/SourceFiles/boxes/connection_box.cpp b/Telegram/SourceFiles/boxes/connection_box.cpp index 4f06d4fe3..eabc26a1d 100644 --- a/Telegram/SourceFiles/boxes/connection_box.cpp +++ b/Telegram/SourceFiles/boxes/connection_box.cpp @@ -592,7 +592,7 @@ int ProxiesBox::rowHeight() const { } void ProxiesBox::addNewProxy() { - Ui::show(_controller->addNewItemBox(), LayerOption::KeepOther); + getDelegate()->show(_controller->addNewItemBox()); } void ProxiesBox::applyView(View &&view) { @@ -660,7 +660,7 @@ void ProxiesBox::setupButtons(int id, not_null button) { button->editClicks( ) | rpl::start_with_next([=] { - Ui::show(_controller->editItemBox(id), LayerOption::KeepOther); + getDelegate()->show(_controller->editItemBox(id)); }, button->lifetime()); button->shareClicks( diff --git a/Telegram/SourceFiles/passport/passport.style b/Telegram/SourceFiles/passport/passport.style index ec0980e7c..f3a9b8fe9 100644 --- a/Telegram/SourceFiles/passport/passport.style +++ b/Telegram/SourceFiles/passport/passport.style @@ -94,13 +94,8 @@ passportFormUserpic: UserpicButton(passportPasswordUserpic) { } passportFormUserpicPadding: margins(0px, 5px, 0px, 10px); passportFormDividerHeight: 13px; -passportFormLabel: FlatLabel(defaultFlatLabel) { - minWidth: 245px; - align: align(topleft); - textFg: windowSubTextFg; -} passportFormLabelPadding: margins(22px, 7px, 22px, 14px); -passportFormPolicy: FlatLabel(passportFormLabel) { +passportFormPolicy: FlatLabel(boxDividerLabel) { style: TextStyle(defaultTextStyle) { linkFont: font(fsize semibold underline); linkFontOver: font(fsize semibold underline); diff --git a/Telegram/SourceFiles/passport/passport_panel_details_row.cpp b/Telegram/SourceFiles/passport/passport_panel_details_row.cpp index 66cc2a302..9a3485462 100644 --- a/Telegram/SourceFiles/passport/passport_panel_details_row.cpp +++ b/Telegram/SourceFiles/passport/passport_panel_details_row.cpp @@ -936,16 +936,6 @@ void GenderRow::errorAnimationCallback() { } // namespace -int PanelLabel::naturalWidth() const { - return -1; -} - -void PanelLabel::resizeEvent(QResizeEvent *e) { - _background->lower(); - _background->setGeometry(rect()); - return PaddingWrap::resizeEvent(e); -} - PanelDetailsRow::PanelDetailsRow( QWidget *parent, const QString &label) diff --git a/Telegram/SourceFiles/passport/passport_panel_details_row.h b/Telegram/SourceFiles/passport/passport_panel_details_row.h index f1dfc00dd..29ee8f7ec 100644 --- a/Telegram/SourceFiles/passport/passport_panel_details_row.h +++ b/Telegram/SourceFiles/passport/passport_panel_details_row.h @@ -31,21 +31,6 @@ enum class PanelDetailsType { Gender, }; -class PanelLabel : public Ui::PaddingWrap { -public: - using PaddingWrap::PaddingWrap; - - int naturalWidth() const override; - -protected: - void resizeEvent(QResizeEvent *e) override; - -private: - object_ptr _background - = object_ptr(this); - -}; - class PanelDetailsRow : public Ui::RpWidget { public: using Type = PanelDetailsType; diff --git a/Telegram/SourceFiles/passport/passport_panel_edit_contact.cpp b/Telegram/SourceFiles/passport/passport_panel_edit_contact.cpp index 201fc7539..a0d000382 100644 --- a/Telegram/SourceFiles/passport/passport_panel_edit_contact.cpp +++ b/Telegram/SourceFiles/passport/passport_panel_edit_contact.cpp @@ -101,7 +101,7 @@ void VerifyBox::setupControls( const auto waiter = Ui::CreateChild( this, std::move(call), - st::passportFormLabel); + st::boxDividerLabel); std::move( error ) | rpl::start_with_next([=](const QString &error) { @@ -210,13 +210,13 @@ void PanelEditContact::setupControls( save(existing); }); _content->add( - object_ptr( + object_ptr( _content, object_ptr( _content, _scheme.aboutExisting, Ui::FlatLabel::InitType::Simple, - st::passportFormLabel), + st::boxDividerLabel), st::passportFormLabelPadding)); _content->add( object_ptr( @@ -274,13 +274,13 @@ void PanelEditContact::setupControls( errorWrap->hide(anim::type::instant); _content->add( - object_ptr( + object_ptr( _content, object_ptr( _content, _scheme.aboutNew, Ui::FlatLabel::InitType::Simple, - st::passportFormLabel), + st::boxDividerLabel), st::passportFormLabelPadding)); if (auto text = _controller->deleteValueLabel()) { diff --git a/Telegram/SourceFiles/passport/passport_panel_edit_document.cpp b/Telegram/SourceFiles/passport/passport_panel_edit_document.cpp index aca7a1c43..bde31bcbf 100644 --- a/Telegram/SourceFiles/passport/passport_panel_edit_document.cpp +++ b/Telegram/SourceFiles/passport/passport_panel_edit_document.cpp @@ -101,7 +101,7 @@ void RequestTypeBox::setupControls( this, lang(lng_passport_document_type), Ui::FlatLabel::InitType::Simple, - st::passportFormLabel); + st::boxDividerLabel); const auto group = std::make_shared(0); auto buttons = std::vector>(); @@ -119,7 +119,7 @@ void RequestTypeBox::setupControls( this, about, Ui::FlatLabel::InitType::Simple, - st::passportFormLabel); + st::boxDividerLabel); auto y = 0; const auto innerWidth = st::boxWidth diff --git a/Telegram/SourceFiles/passport/passport_panel_edit_scans.cpp b/Telegram/SourceFiles/passport/passport_panel_edit_scans.cpp index ed50505f1..60b990757 100644 --- a/Telegram/SourceFiles/passport/passport_panel_edit_scans.cpp +++ b/Telegram/SourceFiles/passport/passport_panel_edit_scans.cpp @@ -21,6 +21,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "lang/lang_keys.h" #include "boxes/abstract_box.h" #include "storage/storage_media_prepare.h" +#include "styles/style_boxes.h" #include "styles/style_passport.h" namespace Passport { @@ -457,13 +458,13 @@ void EditScans::setupSpecialScans(std::map &&files) { chooseSpecialScan(type); }); - inner->add(object_ptr( + inner->add(object_ptr( inner, object_ptr( _content, description(type), Ui::FlatLabel::InitType::Simple, - st::passportFormLabel), + st::boxDividerLabel), st::passportFormLabelPadding)); } diff --git a/Telegram/SourceFiles/ui/widgets/labels.h b/Telegram/SourceFiles/ui/widgets/labels.h index 335400c58..45f0c1a6e 100644 --- a/Telegram/SourceFiles/ui/widgets/labels.h +++ b/Telegram/SourceFiles/ui/widgets/labels.h @@ -214,7 +214,7 @@ private: }; -class DividerLabel : public Ui::PaddingWrap { +class DividerLabel : public PaddingWrap { public: using PaddingWrap::PaddingWrap;