From 12442009878ed91cb09406954f02e853b5a5e984 Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 22 Aug 2023 11:49:21 +0200 Subject: [PATCH] Improve edit group info box design. --- Telegram/SourceFiles/boxes/boxes.style | 6 ++-- .../boxes/peers/edit_peer_info_box.cpp | 12 +++---- Telegram/SourceFiles/info/info.style | 32 +++++++++++++------ Telegram/lib_ui | 2 +- 4 files changed, 33 insertions(+), 19 deletions(-) diff --git a/Telegram/SourceFiles/boxes/boxes.style b/Telegram/SourceFiles/boxes/boxes.style index 00862eada..b952e5a6e 100644 --- a/Telegram/SourceFiles/boxes/boxes.style +++ b/Telegram/SourceFiles/boxes/boxes.style @@ -53,12 +53,12 @@ boxPhotoCaptionSkip: 8px; defaultChangeUserpicIcon: icon {{ "new_chat_photo", activeButtonFg }}; defaultUploadUserpicIcon: icon {{ "upload_chat_photo", msgDateImgFg }}; defaultUserpicButton: UserpicButton { - size: size(76px, 76px); - photoSize: 76px; + size: size(72px, 72px); + photoSize: 72px; photoPosition: point(-1px, -1px); changeButton: defaultActiveButton; changeIcon: defaultChangeUserpicIcon; - changeIconPosition: point(23px, 25px); + changeIconPosition: point(21px, 23px); duration: 500; uploadHeight: 24px; uploadBg: msgDateImgBgOver; diff --git a/Telegram/SourceFiles/boxes/peers/edit_peer_info_box.cpp b/Telegram/SourceFiles/boxes/peers/edit_peer_info_box.cpp index 135fc46c9..01251e1f8 100644 --- a/Telegram/SourceFiles/boxes/peers/edit_peer_info_box.cpp +++ b/Telegram/SourceFiles/boxes/peers/edit_peer_info_box.cpp @@ -1118,10 +1118,7 @@ void Controller::fillManageSection() { //|| canEditInviteLinks || canViewOrEditLinkedChat || canEditType) { - AddSkip( - _controls.buttonsLayout, - st::editPeerTopButtonsLayoutSkip, - st::editPeerTopButtonsLayoutSkipCustomBottom); + AddSkip(_controls.buttonsLayout); } if (canEditReactions()) { @@ -1291,8 +1288,7 @@ void Controller::fillManageSection() { } if (canEditStickers || canDeleteChannel) { - AddSkip(_controls.buttonsLayout, - st::editPeerTopButtonsLayoutSkipCustomTop); + AddSkip(_controls.buttonsLayout); } if (canEditStickers) { @@ -1308,6 +1304,10 @@ void Controller::fillManageSection() { [=]{ deleteWithConfirmation(); } ); } + + if (canEditStickers || canDeleteChannel) { + AddSkip(_controls.buttonsLayout); + } } void Controller::fillPendingRequestsButton() { diff --git a/Telegram/SourceFiles/info/info.style b/Telegram/SourceFiles/info/info.style index d54deb94b..ffd146b89 100644 --- a/Telegram/SourceFiles/info/info.style +++ b/Telegram/SourceFiles/info/info.style @@ -642,21 +642,35 @@ infoStoriesAboutArchivePadding: margins(22px, 12px, 22px, 12px); editPeerBottomButtonsLayoutMargins: margins(0px, 7px, 0px, 0px); -editPeerTopButtonsLayoutSkip: 13px; -editPeerTopButtonsLayoutSkipToBottom: 12px; +editPeerTopButtonsLayoutSkip: 5px; +editPeerTopButtonsLayoutSkipToBottom: 5px; -editPeerTopButtonsLayoutSkipCustomTop: 14px; -editPeerTopButtonsLayoutSkipCustomBottom: 11px; +editPeerTopButtonsLayoutSkipCustomBottom: 5px; editPeerHistoryVisibilityTopSkip: 8px; -editPeerPhotoMargins: margins(22px, 16px, 22px, 8px); +editPeerPhotoMargins: margins(22px, 8px, 22px, 8px); editPeerTitle: defaultInputField; -editPeerTitleMargins: margins(27px, 21px, 22px, 8px); -editPeerDescription: InputField(newGroupDescription) { - borderFg: transparent; +editPeerTitleMargins: margins(27px, 13px, 22px, 8px); +editPeerDescription: InputField(defaultInputField) { + textBg: transparent; + textMargins: margins(0px, 7px, 0px, 7px); + + placeholderFg: placeholderFg; + placeholderFgActive: placeholderFgActive; + placeholderFgError: placeholderFgActive; + placeholderMargins: margins(2px, 0px, 2px, 0px); + placeholderScale: 0.; + placeholderFont: normalFont; + + border: 0px; + borderActive: 0px; + + heightMin: 32px; + + font: boxTextFont; } -editPeerDescriptionMargins: margins(22px, 5px, 22px, 16px); +editPeerDescriptionMargins: margins(22px, 3px, 22px, 2px); editPeerPrivaciesMargins: margins(15px, 7px, 22px, 0px); editPeerPrivacyBottomSkip: 16px; editPeerPrivacyLabel: FlatLabel(defaultFlatLabel) { diff --git a/Telegram/lib_ui b/Telegram/lib_ui index a6d7e3f54..a3c52c2cf 160000 --- a/Telegram/lib_ui +++ b/Telegram/lib_ui @@ -1 +1 @@ -Subproject commit a6d7e3f5457b29b563941b24cd844ca26ac0d077 +Subproject commit a3c52c2cfe7ee5c3382ac0579eb96ec6962b7f47