diff --git a/Telegram/SourceFiles/boxes/boxes.style b/Telegram/SourceFiles/boxes/boxes.style index 53ce06af5..8b335b0e9 100644 --- a/Telegram/SourceFiles/boxes/boxes.style +++ b/Telegram/SourceFiles/boxes/boxes.style @@ -641,7 +641,7 @@ rightsToggle: Toggle(defaultToggle) { stroke: 2px; duration: 120; } -rightsDividerHeight: 11px; +rightsDividerHeight: 10px; rightsHeaderMargin: margins(23px, 20px, 23px, 8px); rightsToggleMargin: margins(23px, 8px, 23px, 8px); rightsAboutMargin: margins(23px, 8px, 23px, 8px); diff --git a/Telegram/SourceFiles/info/info.style b/Telegram/SourceFiles/info/info.style index fb1b1043a..1752cdd4d 100644 --- a/Telegram/SourceFiles/info/info.style +++ b/Telegram/SourceFiles/info/info.style @@ -81,11 +81,11 @@ infoTabs: SettingsSlider(defaultTabsSlider) { } infoProfilePhotoSize: 72px; -infoProfilePhotoLeft: 27px; -infoProfilePhotoTop: 22px; -infoProfilePhotoBottom: 22px; +infoProfilePhotoLeft: 19px; +infoProfilePhotoTop: 18px; +infoProfilePhotoBottom: 18px; -infoProfileNameLeft: 111px; +infoProfileNameLeft: 109px; infoProfileNameRight: 20px; infoProfileNameTop: 32px; infoProfileNameLabel: FlatLabel(defaultFlatLabel) { @@ -102,7 +102,7 @@ infoProfileNameLabel: FlatLabel(defaultFlatLabel) { infoProfileStatusLeft: infoProfileNameLeft; infoProfileStatusRight: infoProfileNameRight; -infoProfileStatusTop: 62px; +infoProfileStatusTop: 58px; infoProfileStatusLabel: FlatLabel(infoProfileNameLabel) { margin: margins(10px, 5px, 10px, 5px); width: 160px; @@ -123,32 +123,45 @@ infoProfileToggleTop: 40px; infoProfileSkip: 12px; -infoProfileLabeledPadding: margins(77px, 10px, 10px, 10px); +infoProfileLabeledPadding: margins(79px, 9px, 30px, 7px); infoProfileSeparatorPadding: margins( - 73px, + 77px, infoProfileSkip, 0px, infoProfileSkip); infoIconFg: menuIconFg; -infoIconPosition: point(28px, 4px); +infoIconPosition: point(25px, 12px); infoIconInformation: icon {{ "info_information", infoIconFg }}; infoIconMembers: icon {{ "info_members", infoIconFg }}; infoIconNotifications: icon {{ "info_notifications", infoIconFg }}; infoIconActions: icon {{ "info_actions", infoIconFg }}; -infoLabel: FlatLabel(defaultFlatLabel) { - textFg: windowSubTextFg; -} -infoLabeled: FlatLabel(defaultFlatLabel) { - width: 180px; - margin: margins(5px, 5px, 5px, 5px); -} -infoLabeledOneLine: FlatLabel(infoLabeled) { +infoLabeledOneLine: FlatLabel(defaultFlatLabel) { width: 0px; // No need to set minWidth in one-line text. maxHeight: 20px; + style: TextStyle(defaultTextStyle) { + lineHeight: 19px; + } +} +infoLabelSkip: 2px; +infoLabel: FlatLabel(infoLabeledOneLine) { + textFg: windowSubTextFg; +} +infoLabeled: FlatLabel(infoLabeledOneLine) { + width: 180px; + maxHeight: 0px; + margin: margins(5px, 5px, 5px, 5px); } +infoProfileToggle: Toggle(defaultToggle) { + diameter: 16px; + width: 14px; + untoggledFg: menuIconFg; +} +infoProfileToggleOver: Toggle(infoProfileToggle) { + untoggledFg: menuIconFgOver; +} infoProfileButton: InfoProfileButton { textFg: windowBoldFg; textFgOver: windowBoldFgOver; @@ -157,17 +170,19 @@ infoProfileButton: InfoProfileButton { font: semiboldFont; - height: 22px; - padding: margins(80px, 8px, 8px, 8px); + height: 20px; + padding: margins(79px, 10px, 8px, 8px); - toggle: defaultMenuToggle; - toggleOver: defaultMenuToggleOver; + toggle: infoProfileToggle; + toggleOver: infoProfileToggleOver; + toggleSkip: 23px; ripple: defaultRippleAnimation; } infoNotificationsButton: InfoProfileButton(infoProfileButton) { - padding: margins(80px, 11px, 8px, 9px); + padding: margins(79px, 13px, 8px, 9px); } +infoNotificationsIconPosition: point(20px, 5px); infoMainButton: InfoProfileButton(infoProfileButton) { textFg: lightButtonFg; textFgOver: lightButtonFgOver; diff --git a/Telegram/SourceFiles/info/info_profile_inner_widget.cpp b/Telegram/SourceFiles/info/info_profile_inner_widget.cpp index b93f065a6..2947b2465 100644 --- a/Telegram/SourceFiles/info/info_profile_inner_widget.cpp +++ b/Telegram/SourceFiles/info/info_profile_inner_widget.cpp @@ -76,17 +76,13 @@ object_ptr InnerWidget::setupDetailsContent( auto result = object_ptr(parent); result->add(object_ptr(result)); - - auto skipPadding = QMargins(0, 0, 0, st::infoProfileSkip); - result->add(object_ptr>(result, skipPadding)); - + result->add(createSkipWidget(result)); result->add(setupInfoLines(result)); result->add(setupMuteToggle(result)); if (auto user = _peer->asUser()) { setupMainUserButtons(result, user); } - - result->add(object_ptr>(result, skipPadding)); + result->add(createSkipWidget(result)); return std::move(result); } @@ -113,19 +109,28 @@ object_ptr InnerWidget::setupMuteToggle( object_ptr( result, - st::infoIconNotifications); + st::infoIconNotifications, + st::infoNotificationsIconPosition); return std::move(result); } void InnerWidget::setupMainUserButtons( Ui::VerticalLayout *wrap, not_null user) const { - auto sendMessage = wrap->add(object_ptr>( - wrap, - object_ptr