mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 13:47:05 +02:00
Add create-from-choose-peer button icons.
This commit is contained in:
parent
6957376a21
commit
1aeca7b486
8 changed files with 9 additions and 5 deletions
BIN
Telegram/Resources/icons/info/edit/create_channel.png
Normal file
BIN
Telegram/Resources/icons/info/edit/create_channel.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 694 B |
BIN
Telegram/Resources/icons/info/edit/create_channel@2x.png
Normal file
BIN
Telegram/Resources/icons/info/edit/create_channel@2x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
BIN
Telegram/Resources/icons/info/edit/create_channel@3x.png
Normal file
BIN
Telegram/Resources/icons/info/edit/create_channel@3x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
BIN
Telegram/Resources/icons/info/edit/create_group.png
Normal file
BIN
Telegram/Resources/icons/info/edit/create_group.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 717 B |
BIN
Telegram/Resources/icons/info/edit/create_group@2x.png
Normal file
BIN
Telegram/Resources/icons/info/edit/create_group@2x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
BIN
Telegram/Resources/icons/info/edit/create_group@3x.png
Normal file
BIN
Telegram/Resources/icons/info/edit/create_group@3x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2 KiB |
|
@ -27,6 +27,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include "ui/wrap/vertical_layout.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "styles/style_boxes.h"
|
||||
#include "styles/style_chat_helpers.h"
|
||||
#include "styles/style_settings.h"
|
||||
|
||||
namespace {
|
||||
|
@ -367,7 +368,7 @@ void ChoosePeerBoxController::prepareRestrictions() {
|
|||
{ skip, 0, skip, st::membersMarginTop });
|
||||
Settings::AddDivider(raw);
|
||||
}
|
||||
const auto make = [&](tr::phrase<> text) {
|
||||
const auto make = [&](tr::phrase<> text, const style::icon &st) {
|
||||
auto button = raw->add(
|
||||
object_ptr<Ui::SettingsButton>(
|
||||
raw,
|
||||
|
@ -376,12 +377,12 @@ void ChoosePeerBoxController::prepareRestrictions() {
|
|||
{ 0, st::membersMarginTop, 0, 0 });
|
||||
const auto icon = Ui::CreateChild<Info::Profile::FloatingIcon>(
|
||||
button,
|
||||
st::inviteViaLinkIcon,
|
||||
st,
|
||||
QPoint());
|
||||
button->heightValue(
|
||||
) | rpl::start_with_next([=](int height) {
|
||||
icon->moveToLeft(
|
||||
st::inviteViaLinkIconPosition.x(),
|
||||
st::choosePeerCreateIconLeft,
|
||||
(height - st::inviteViaLinkIcon.height()) / 2);
|
||||
}, icon->lifetime());
|
||||
|
||||
|
@ -399,9 +400,9 @@ void ChoosePeerBoxController::prepareRestrictions() {
|
|||
return button;
|
||||
};
|
||||
if (_query.type == RequestPeerQuery::Type::Group) {
|
||||
make(tr::lng_request_group_create);
|
||||
make(tr::lng_request_group_create, st::choosePeerGroupIcon);
|
||||
} else if (_query.type == RequestPeerQuery::Type::Broadcast) {
|
||||
make(tr::lng_request_channel_create);
|
||||
make(tr::lng_request_channel_create, st::choosePeerChannelIcon);
|
||||
}
|
||||
|
||||
if (raw->count() > 0) {
|
||||
|
|
|
@ -419,3 +419,6 @@ reactPanelScroll: ScrollArea(emojiScroll) {
|
|||
emojiSuggestionsFadeLeft: icon {{ "fade_horizontal-flip_horizontal", boxBg }};
|
||||
emojiSuggestionsFadeRight: icon {{ "fade_horizontal", boxBg }};
|
||||
|
||||
choosePeerGroupIcon: icon {{ "info/edit/create_group", lightButtonFg }};
|
||||
choosePeerChannelIcon: icon {{ "info/edit/create_channel", lightButtonFg }};
|
||||
choosePeerCreateIconLeft: 25px;
|
||||
|
|
Loading…
Add table
Reference in a new issue