mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Slightly improved style of box for edit folder.
This commit is contained in:
parent
bfa3655c7b
commit
b04aaba8d0
7 changed files with 15 additions and 24 deletions
BIN
Telegram/Resources/icons/settings/remove.png
Normal file
BIN
Telegram/Resources/icons/settings/remove.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 193 B |
BIN
Telegram/Resources/icons/settings/remove@2x.png
Normal file
BIN
Telegram/Resources/icons/settings/remove@2x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 233 B |
BIN
Telegram/Resources/icons/settings/remove@3x.png
Normal file
BIN
Telegram/Resources/icons/settings/remove@3x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 294 B |
|
@ -500,6 +500,7 @@ void EditFilterBox(
|
||||||
const Data::ChatFilter &filter,
|
const Data::ChatFilter &filter,
|
||||||
Fn<void(const Data::ChatFilter &)> doneCallback) {
|
Fn<void(const Data::ChatFilter &)> doneCallback) {
|
||||||
const auto creating = filter.title().isEmpty();
|
const auto creating = filter.title().isEmpty();
|
||||||
|
box->setWidth(st::boxWideWidth);
|
||||||
box->setTitle(creating ? tr::lng_filters_new() : tr::lng_filters_edit());
|
box->setTitle(creating ? tr::lng_filters_new() : tr::lng_filters_edit());
|
||||||
box->setCloseByOutsideClick(false);
|
box->setCloseByOutsideClick(false);
|
||||||
|
|
||||||
|
@ -572,8 +573,8 @@ void EditFilterBox(
|
||||||
const auto includeAdd = AddButton(
|
const auto includeAdd = AddButton(
|
||||||
content,
|
content,
|
||||||
tr::lng_filters_add_chats(),
|
tr::lng_filters_add_chats(),
|
||||||
st::settingsFolderButton,
|
st::settingsButtonActive,
|
||||||
{ &st::settingsIconPlus, kIconGreen });
|
{ &st::settingsIconAdd, 0, IconType::Round, &st::windowBgActive });
|
||||||
|
|
||||||
const auto include = SetupChatsPreview(
|
const auto include = SetupChatsPreview(
|
||||||
content,
|
content,
|
||||||
|
@ -583,13 +584,7 @@ void EditFilterBox(
|
||||||
&Data::ChatFilter::always);
|
&Data::ChatFilter::always);
|
||||||
|
|
||||||
AddSkip(content);
|
AddSkip(content);
|
||||||
content->add(
|
AddDividerText(content, tr::lng_filters_include_about());
|
||||||
object_ptr<Ui::FlatLabel>(
|
|
||||||
content,
|
|
||||||
tr::lng_filters_include_about(),
|
|
||||||
st::boxDividerLabel),
|
|
||||||
st::windowFilterAboutPadding);
|
|
||||||
AddDivider(content);
|
|
||||||
AddSkip(content);
|
AddSkip(content);
|
||||||
|
|
||||||
AddSubsectionTitle(content, tr::lng_filters_exclude());
|
AddSubsectionTitle(content, tr::lng_filters_exclude());
|
||||||
|
@ -597,8 +592,8 @@ void EditFilterBox(
|
||||||
const auto excludeAdd = AddButton(
|
const auto excludeAdd = AddButton(
|
||||||
content,
|
content,
|
||||||
tr::lng_filters_remove_chats(),
|
tr::lng_filters_remove_chats(),
|
||||||
st::settingsFolderButton,
|
st::settingsButtonActive,
|
||||||
{ &st::settingsIconMinus, kIconRed });
|
{ &st::settingsIconRemove, 0, IconType::Round, &st::windowBgActive });
|
||||||
|
|
||||||
const auto exclude = SetupChatsPreview(
|
const auto exclude = SetupChatsPreview(
|
||||||
content,
|
content,
|
||||||
|
@ -608,12 +603,7 @@ void EditFilterBox(
|
||||||
&Data::ChatFilter::never);
|
&Data::ChatFilter::never);
|
||||||
|
|
||||||
AddSkip(content);
|
AddSkip(content);
|
||||||
content->add(
|
AddDividerText(content, tr::lng_filters_exclude_about());
|
||||||
object_ptr<Ui::FlatLabel>(
|
|
||||||
content,
|
|
||||||
tr::lng_filters_exclude_about(),
|
|
||||||
st::boxDividerLabel),
|
|
||||||
st::windowFilterAboutPadding);
|
|
||||||
|
|
||||||
const auto refreshPreviews = [=] {
|
const auto refreshPreviews = [=] {
|
||||||
include->updateData(
|
include->updateData(
|
||||||
|
|
|
@ -18,6 +18,8 @@ settingsButton: SettingsButton(infoProfileButton) {
|
||||||
settingsButtonNoIcon: SettingsButton(settingsButton) {
|
settingsButtonNoIcon: SettingsButton(settingsButton) {
|
||||||
padding: margins(22px, 10px, 22px, 8px);
|
padding: margins(22px, 10px, 22px, 8px);
|
||||||
}
|
}
|
||||||
|
settingsButtonActive: SettingsButton(infoMainButton, settingsButton) {
|
||||||
|
}
|
||||||
settingsAttentionButton: SettingsButton(settingsButtonNoIcon) {
|
settingsAttentionButton: SettingsButton(settingsButtonNoIcon) {
|
||||||
textFg: attentionButtonFg;
|
textFg: attentionButtonFg;
|
||||||
textFgOver: attentionButtonFgOver;
|
textFgOver: attentionButtonFgOver;
|
||||||
|
@ -51,9 +53,6 @@ settingsUpdate: SettingsButton(infoMainButton, settingsButtonNoIcon) {
|
||||||
settingsUpdateStatePosition: point(22px, 29px);
|
settingsUpdateStatePosition: point(22px, 29px);
|
||||||
settingsDividerLabelPadding: margins(22px, 8px, 22px, 16px);
|
settingsDividerLabelPadding: margins(22px, 8px, 22px, 16px);
|
||||||
|
|
||||||
settingsFolderButton: SettingsButton(infoMainButton, settingsButton) {
|
|
||||||
}
|
|
||||||
|
|
||||||
settingsIconAccount: icon {{ "settings/account", settingsIconFg }};
|
settingsIconAccount: icon {{ "settings/account", settingsIconFg }};
|
||||||
settingsIconNotifications: icon {{ "settings/notifications", settingsIconFg }};
|
settingsIconNotifications: icon {{ "settings/notifications", settingsIconFg }};
|
||||||
settingsIconChat: icon {{ "settings/chat", settingsIconFg }};
|
settingsIconChat: icon {{ "settings/chat", settingsIconFg }};
|
||||||
|
@ -95,6 +94,9 @@ settingsIconDownload: icon {{ "settings/download", settingsIconFg }};
|
||||||
settingsIconMention: icon {{ "settings/mention", settingsIconFg }};
|
settingsIconMention: icon {{ "settings/mention", settingsIconFg }};
|
||||||
settingsIconBlocked: icon {{ "settings/blocked", settingsIconFg }};
|
settingsIconBlocked: icon {{ "settings/blocked", settingsIconFg }};
|
||||||
|
|
||||||
|
settingsIconAdd: icon {{ "settings/add", windowFgActive }};
|
||||||
|
settingsIconRemove: icon {{ "settings/remove", windowFgActive }};
|
||||||
|
|
||||||
settingsCheckbox: Checkbox(defaultBoxCheckbox) {
|
settingsCheckbox: Checkbox(defaultBoxCheckbox) {
|
||||||
textPosition: point(15px, 1px);
|
textPosition: point(15px, 1px);
|
||||||
}
|
}
|
||||||
|
|
|
@ -412,7 +412,7 @@ void FilterRowButton::paintEvent(QPaintEvent *e) {
|
||||||
AddButton(
|
AddButton(
|
||||||
container,
|
container,
|
||||||
tr::lng_filters_create(),
|
tr::lng_filters_create(),
|
||||||
st::settingsFolderButton,
|
st::settingsButtonActive,
|
||||||
{ &st::settingsIconFolders, kIconLightBlue }
|
{ &st::settingsIconFolders, kIconLightBlue }
|
||||||
)->setClickedCallback([=] {
|
)->setClickedCallback([=] {
|
||||||
if (showLimitReached()) {
|
if (showLimitReached()) {
|
||||||
|
|
|
@ -286,8 +286,8 @@ windowFiltersMainMenuUnreadMuted: icon {
|
||||||
};
|
};
|
||||||
windowFilterSmallItem: PeerListItem(defaultPeerListItem) {
|
windowFilterSmallItem: PeerListItem(defaultPeerListItem) {
|
||||||
height: 44px;
|
height: 44px;
|
||||||
photoPosition: point(15px, 5px);
|
photoPosition: point(13px, 5px);
|
||||||
namePosition: point(62px, 14px);
|
namePosition: point(59px, 14px);
|
||||||
photoSize: 34px;
|
photoSize: 34px;
|
||||||
checkbox: RoundImageCheckbox(defaultPeerListCheckbox) {
|
checkbox: RoundImageCheckbox(defaultPeerListCheckbox) {
|
||||||
imageRadius: 17px;
|
imageRadius: 17px;
|
||||||
|
@ -324,7 +324,6 @@ windowFilterChatsSectionSubtitle: FlatLabel(defaultFlatLabel) {
|
||||||
textFg: searchedBarFg;
|
textFg: searchedBarFg;
|
||||||
}
|
}
|
||||||
windowFilterChatsSectionSubtitlePadding: margins(17px, 7px, 17px, 7px);
|
windowFilterChatsSectionSubtitlePadding: margins(17px, 7px, 17px, 7px);
|
||||||
windowFilterAboutPadding: margins(22px, 0px, 22px, 19px);
|
|
||||||
|
|
||||||
windowArchiveToast: Toast(defaultToast) {
|
windowArchiveToast: Toast(defaultToast) {
|
||||||
minWidth: boxWideWidth;
|
minWidth: boxWideWidth;
|
||||||
|
|
Loading…
Add table
Reference in a new issue