Skip to content

Commit

Permalink
Improve edit group info box design.
Browse files Browse the repository at this point in the history
  • Loading branch information
john-preston committed Aug 22, 2023
1 parent 2af4b2b commit 1244200
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 19 deletions.
6 changes: 3 additions & 3 deletions Telegram/SourceFiles/boxes/boxes.style
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
12 changes: 6 additions & 6 deletions Telegram/SourceFiles/boxes/peers/edit_peer_info_box.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1118,10 +1118,7 @@ void Controller::fillManageSection() {
//|| canEditInviteLinks
|| canViewOrEditLinkedChat
|| canEditType) {
AddSkip(
_controls.buttonsLayout,
st::editPeerTopButtonsLayoutSkip,
st::editPeerTopButtonsLayoutSkipCustomBottom);
AddSkip(_controls.buttonsLayout);
}

if (canEditReactions()) {
Expand Down Expand Up @@ -1291,8 +1288,7 @@ void Controller::fillManageSection() {
}

if (canEditStickers || canDeleteChannel) {
AddSkip(_controls.buttonsLayout,
st::editPeerTopButtonsLayoutSkipCustomTop);
AddSkip(_controls.buttonsLayout);
}

if (canEditStickers) {
Expand All @@ -1308,6 +1304,10 @@ void Controller::fillManageSection() {
[=]{ deleteWithConfirmation(); }
);
}

if (canEditStickers || canDeleteChannel) {
AddSkip(_controls.buttonsLayout);
}
}

void Controller::fillPendingRequestsButton() {
Expand Down
32 changes: 23 additions & 9 deletions Telegram/SourceFiles/info/info.style
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion Telegram/lib_ui
Submodule lib_ui updated 1 files
+1 −1 ui/layers/layers.style

0 comments on commit 1244200

Please sign in to comment.