Fix name elision in settings information edit.

This commit is contained in:
John Preston 2022-03-16 11:20:39 +04:00
parent 33d87a3ffe
commit 4f44692ae8
3 changed files with 7 additions and 3 deletions

View File

@ -189,6 +189,7 @@ infoLayerTopBarBack: IconButton(infoTopBarBack) {
rippleAreaPosition: point(6px, 8px);
}
infoLayerTopBarMediaCancel: IconButton(infoLayerTopBarBack) {
width: 48px;
icon: icon {{ "info/info_close", boxTitleCloseFg }};
iconOver: icon {{ "info/info_close", boxTitleCloseFgOver }};
}

View File

@ -183,6 +183,7 @@ settingsBioCountdown: FlatLabel(defaultFlatLabel) {
}
settingsCoverName: FlatLabel(defaultFlatLabel) {
maxHeight: 24px;
style: TextStyle(defaultTextStyle) {
font: font(17px semibold);
linkFont: font(17px semibold);

View File

@ -190,12 +190,12 @@ void SetupPhoto(
rpl::combine(
wrap->widthValue(),
photo->widthValue(),
name->widthValue(),
Info::Profile::NameValue(self),
status->widthValue()
) | rpl::start_with_next([=](
int max,
int photoWidth,
int nameWidth,
const TextWithEntities&,
int statusWidth) {
photo->moveToLeft(
(max - photoWidth) / 2,
@ -206,8 +206,10 @@ void SetupPhoto(
- upload->width()
+ st::settingsInfoUploadLeft),
photo->y() + photo->height() - upload->height());
const auto skip = st::settingsButton.iconLeft;
name->resizeToNaturalWidth(max - 2 * skip);
name->moveToLeft(
(max - nameWidth) / 2,
(max - name->width()) / 2,
(photo->y() + photo->height() + st::settingsInfoPhotoSkip));
status->moveToLeft(
(max - statusWidth) / 2,