mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-18 15:17:07 +02:00
Fix group/channel Appearance button style.
This commit is contained in:
parent
1c6f45d8d3
commit
db486e957c
5 changed files with 16 additions and 5 deletions
Telegram/SourceFiles
|
@ -1428,14 +1428,15 @@ void SetupPeerColorSample(
|
|||
void AddPeerColorButton(
|
||||
not_null<Ui::VerticalLayout*> container,
|
||||
std::shared_ptr<ChatHelpers::Show> show,
|
||||
not_null<PeerData*> peer) {
|
||||
not_null<PeerData*> peer,
|
||||
const style::SettingsButton &st) {
|
||||
auto label = peer->isSelf()
|
||||
? tr::lng_settings_theme_name_color()
|
||||
: tr::lng_edit_channel_color();
|
||||
const auto button = AddButtonWithIcon(
|
||||
container,
|
||||
rpl::duplicate(label),
|
||||
st::settingsColorButton,
|
||||
st,
|
||||
{ &st::menuIconChangeColors });
|
||||
|
||||
const auto style = std::make_shared<Ui::ChatStyle>(
|
||||
|
|
|
@ -48,7 +48,8 @@ void EditPeerColorBox(
|
|||
void AddPeerColorButton(
|
||||
not_null<Ui::VerticalLayout*> container,
|
||||
std::shared_ptr<ChatHelpers::Show> show,
|
||||
not_null<PeerData*> peer);
|
||||
not_null<PeerData*> peer,
|
||||
const style::SettingsButton &st);
|
||||
|
||||
void CheckBoostLevel(
|
||||
std::shared_ptr<ChatHelpers::Show> show,
|
||||
|
|
|
@ -1016,7 +1016,11 @@ void Controller::fillColorIndexButton() {
|
|||
Expects(_controls.buttonsLayout != nullptr);
|
||||
|
||||
const auto show = _navigation->uiShow();
|
||||
AddPeerColorButton(_controls.buttonsLayout, show, _peer);
|
||||
AddPeerColorButton(
|
||||
_controls.buttonsLayout,
|
||||
_navigation->uiShow(),
|
||||
_peer,
|
||||
st::managePeerColorsButton);
|
||||
}
|
||||
|
||||
void Controller::fillSignaturesButton() {
|
||||
|
|
|
@ -665,6 +665,10 @@ manageGroupTopicsButton: SettingsCountButton(manageGroupTopButtonWithText) {
|
|||
}
|
||||
}
|
||||
}
|
||||
managePeerColorsButton: SettingsButton(infoProfileButton) {
|
||||
padding: margins(60px, 10px, 48px, 8px);
|
||||
}
|
||||
|
||||
manageGroupNoIconButtonInner: SettingsButton(infoProfileButton) {
|
||||
padding: margins(25px, 11px, 24px, 8px);
|
||||
}
|
||||
|
|
|
@ -1576,7 +1576,8 @@ void SetupThemeSettings(
|
|||
AddPeerColorButton(
|
||||
container,
|
||||
controller->uiShow(),
|
||||
controller->session().user());
|
||||
controller->session().user(),
|
||||
st::settingsColorButton);
|
||||
|
||||
const auto settings = &Core::App().settings();
|
||||
if (settings->systemDarkMode().has_value()) {
|
||||
|
|
Loading…
Add table
Reference in a new issue