Slightly improved style of box for edit folder.

This commit is contained in:
23rd 2022-05-03 20:57:23 +03:00
parent bfa3655c7b
commit b04aaba8d0
7 changed files with 15 additions and 24 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 294 B

View File

@ -500,6 +500,7 @@ void EditFilterBox(
const Data::ChatFilter &filter,
Fn<void(const Data::ChatFilter &)> doneCallback) {
const auto creating = filter.title().isEmpty();
box->setWidth(st::boxWideWidth);
box->setTitle(creating ? tr::lng_filters_new() : tr::lng_filters_edit());
box->setCloseByOutsideClick(false);
@ -572,8 +573,8 @@ void EditFilterBox(
const auto includeAdd = AddButton(
content,
tr::lng_filters_add_chats(),
st::settingsFolderButton,
{ &st::settingsIconPlus, kIconGreen });
st::settingsButtonActive,
{ &st::settingsIconAdd, 0, IconType::Round, &st::windowBgActive });
const auto include = SetupChatsPreview(
content,
@ -583,13 +584,7 @@ void EditFilterBox(
&Data::ChatFilter::always);
AddSkip(content);
content->add(
object_ptr<Ui::FlatLabel>(
content,
tr::lng_filters_include_about(),
st::boxDividerLabel),
st::windowFilterAboutPadding);
AddDivider(content);
AddDividerText(content, tr::lng_filters_include_about());
AddSkip(content);
AddSubsectionTitle(content, tr::lng_filters_exclude());
@ -597,8 +592,8 @@ void EditFilterBox(
const auto excludeAdd = AddButton(
content,
tr::lng_filters_remove_chats(),
st::settingsFolderButton,
{ &st::settingsIconMinus, kIconRed });
st::settingsButtonActive,
{ &st::settingsIconRemove, 0, IconType::Round, &st::windowBgActive });
const auto exclude = SetupChatsPreview(
content,
@ -608,12 +603,7 @@ void EditFilterBox(
&Data::ChatFilter::never);
AddSkip(content);
content->add(
object_ptr<Ui::FlatLabel>(
content,
tr::lng_filters_exclude_about(),
st::boxDividerLabel),
st::windowFilterAboutPadding);
AddDividerText(content, tr::lng_filters_exclude_about());
const auto refreshPreviews = [=] {
include->updateData(

View File

@ -18,6 +18,8 @@ settingsButton: SettingsButton(infoProfileButton) {
settingsButtonNoIcon: SettingsButton(settingsButton) {
padding: margins(22px, 10px, 22px, 8px);
}
settingsButtonActive: SettingsButton(infoMainButton, settingsButton) {
}
settingsAttentionButton: SettingsButton(settingsButtonNoIcon) {
textFg: attentionButtonFg;
textFgOver: attentionButtonFgOver;
@ -51,9 +53,6 @@ settingsUpdate: SettingsButton(infoMainButton, settingsButtonNoIcon) {
settingsUpdateStatePosition: point(22px, 29px);
settingsDividerLabelPadding: margins(22px, 8px, 22px, 16px);
settingsFolderButton: SettingsButton(infoMainButton, settingsButton) {
}
settingsIconAccount: icon {{ "settings/account", settingsIconFg }};
settingsIconNotifications: icon {{ "settings/notifications", settingsIconFg }};
settingsIconChat: icon {{ "settings/chat", settingsIconFg }};
@ -95,6 +94,9 @@ settingsIconDownload: icon {{ "settings/download", settingsIconFg }};
settingsIconMention: icon {{ "settings/mention", settingsIconFg }};
settingsIconBlocked: icon {{ "settings/blocked", settingsIconFg }};
settingsIconAdd: icon {{ "settings/add", windowFgActive }};
settingsIconRemove: icon {{ "settings/remove", windowFgActive }};
settingsCheckbox: Checkbox(defaultBoxCheckbox) {
textPosition: point(15px, 1px);
}

View File

@ -412,7 +412,7 @@ void FilterRowButton::paintEvent(QPaintEvent *e) {
AddButton(
container,
tr::lng_filters_create(),
st::settingsFolderButton,
st::settingsButtonActive,
{ &st::settingsIconFolders, kIconLightBlue }
)->setClickedCallback([=] {
if (showLimitReached()) {

View File

@ -286,8 +286,8 @@ windowFiltersMainMenuUnreadMuted: icon {
};
windowFilterSmallItem: PeerListItem(defaultPeerListItem) {
height: 44px;
photoPosition: point(15px, 5px);
namePosition: point(62px, 14px);
photoPosition: point(13px, 5px);
namePosition: point(59px, 14px);
photoSize: 34px;
checkbox: RoundImageCheckbox(defaultPeerListCheckbox) {
imageRadius: 17px;
@ -324,7 +324,6 @@ windowFilterChatsSectionSubtitle: FlatLabel(defaultFlatLabel) {
textFg: searchedBarFg;
}
windowFilterChatsSectionSubtitlePadding: margins(17px, 7px, 17px, 7px);
windowFilterAboutPadding: margins(22px, 0px, 22px, 19px);
windowArchiveToast: Toast(defaultToast) {
minWidth: boxWideWidth;