Fix group/channel Appearance button style.

This commit is contained in:
John Preston 2024-05-19 10:18:55 +04:00
parent 1c6f45d8d3
commit db486e957c
5 changed files with 16 additions and 5 deletions

View file

@ -1428,14 +1428,15 @@ void SetupPeerColorSample(
void AddPeerColorButton( void AddPeerColorButton(
not_null<Ui::VerticalLayout*> container, not_null<Ui::VerticalLayout*> container,
std::shared_ptr<ChatHelpers::Show> show, std::shared_ptr<ChatHelpers::Show> show,
not_null<PeerData*> peer) { not_null<PeerData*> peer,
const style::SettingsButton &st) {
auto label = peer->isSelf() auto label = peer->isSelf()
? tr::lng_settings_theme_name_color() ? tr::lng_settings_theme_name_color()
: tr::lng_edit_channel_color(); : tr::lng_edit_channel_color();
const auto button = AddButtonWithIcon( const auto button = AddButtonWithIcon(
container, container,
rpl::duplicate(label), rpl::duplicate(label),
st::settingsColorButton, st,
{ &st::menuIconChangeColors }); { &st::menuIconChangeColors });
const auto style = std::make_shared<Ui::ChatStyle>( const auto style = std::make_shared<Ui::ChatStyle>(

View file

@ -48,7 +48,8 @@ void EditPeerColorBox(
void AddPeerColorButton( void AddPeerColorButton(
not_null<Ui::VerticalLayout*> container, not_null<Ui::VerticalLayout*> container,
std::shared_ptr<ChatHelpers::Show> show, std::shared_ptr<ChatHelpers::Show> show,
not_null<PeerData*> peer); not_null<PeerData*> peer,
const style::SettingsButton &st);
void CheckBoostLevel( void CheckBoostLevel(
std::shared_ptr<ChatHelpers::Show> show, std::shared_ptr<ChatHelpers::Show> show,

View file

@ -1016,7 +1016,11 @@ void Controller::fillColorIndexButton() {
Expects(_controls.buttonsLayout != nullptr); Expects(_controls.buttonsLayout != nullptr);
const auto show = _navigation->uiShow(); const auto show = _navigation->uiShow();
AddPeerColorButton(_controls.buttonsLayout, show, _peer); AddPeerColorButton(
_controls.buttonsLayout,
_navigation->uiShow(),
_peer,
st::managePeerColorsButton);
} }
void Controller::fillSignaturesButton() { void Controller::fillSignaturesButton() {

View file

@ -665,6 +665,10 @@ manageGroupTopicsButton: SettingsCountButton(manageGroupTopButtonWithText) {
} }
} }
} }
managePeerColorsButton: SettingsButton(infoProfileButton) {
padding: margins(60px, 10px, 48px, 8px);
}
manageGroupNoIconButtonInner: SettingsButton(infoProfileButton) { manageGroupNoIconButtonInner: SettingsButton(infoProfileButton) {
padding: margins(25px, 11px, 24px, 8px); padding: margins(25px, 11px, 24px, 8px);
} }

View file

@ -1576,7 +1576,8 @@ void SetupThemeSettings(
AddPeerColorButton( AddPeerColorButton(
container, container,
controller->uiShow(), controller->uiShow(),
controller->session().user()); controller->session().user(),
st::settingsColorButton);
const auto settings = &Core::App().settings(); const auto settings = &Core::App().settings();
if (settings->systemDarkMode().has_value()) { if (settings->systemDarkMode().has_value()) {