mirror of https://github.com/procxx/kepka.git
Make members header a button.
This commit is contained in:
parent
88d7f172ca
commit
fc4c31b673
|
@ -398,6 +398,7 @@ infoBlockButton: InfoProfileButton(infoProfileButton) {
|
|||
infoBlockButtonSkip: 8px;
|
||||
|
||||
infoMembersHeader: 56px;
|
||||
infoMembersHeaderPaddingBottom: 6px;
|
||||
infoMembersList: PeerList(defaultPeerList) {
|
||||
item: PeerListItem(defaultPeerListItem) {
|
||||
photoPosition: point(18px, 6px);
|
||||
|
@ -405,17 +406,15 @@ infoMembersList: PeerList(defaultPeerList) {
|
|||
statusPosition: point(79px, 31px);
|
||||
}
|
||||
}
|
||||
infoMembersButtonPosition: point(12px, 9px);
|
||||
infoMembersButtonIconPosition: point(6px, 6px);
|
||||
infoMembersButtonPosition: point(12px, 0px);
|
||||
infoMembersButtonIconPosition: point(3px, 3px);
|
||||
infoMembersButton: IconButton(defaultIconButton) {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
iconPosition: infoMembersButtonIconPosition;
|
||||
rippleAreaPosition: point(0px, 0px);
|
||||
rippleAreaSize: 44px;
|
||||
ripple: RippleAnimation(defaultRippleAnimation) {
|
||||
color: windowBgOver;
|
||||
}
|
||||
rippleAreaSize: 38px;
|
||||
ripple: defaultRippleAnimation;
|
||||
}
|
||||
infoMembersAddMember: IconButton(infoMembersButton) {
|
||||
icon: icon {{ "info_add_member", menuIconFg }};
|
||||
|
|
|
@ -25,6 +25,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
|
|||
#include "info/profile/info_profile_values.h"
|
||||
#include "info/profile/info_profile_icon.h"
|
||||
#include "info/profile/info_profile_values.h"
|
||||
#include "info/profile/info_profile_button.h"
|
||||
#include "info/profile/info_profile_members_controllers.h"
|
||||
#include "info/info_content_widget.h"
|
||||
#include "info/info_controller.h"
|
||||
|
@ -122,16 +123,19 @@ void Members::setupHeader() {
|
|||
st::infoMembersHeader);
|
||||
auto parent = _header.data();
|
||||
|
||||
_openMembers = Ui::CreateChild<Button>(
|
||||
parent,
|
||||
rpl::single(QString()));
|
||||
|
||||
object_ptr<FloatingIcon>(
|
||||
parent,
|
||||
st::infoIconMembers,
|
||||
st::infoIconPosition);
|
||||
|
||||
_openMembers = Ui::CreateChild<Ui::AbstractButton>(parent);
|
||||
_titleWrap = Ui::CreateChild<Ui::RpWidget>(parent);
|
||||
_title = setupTitle();
|
||||
_addMember = Ui::CreateChild<Ui::IconButton>(
|
||||
parent,
|
||||
_openMembers,
|
||||
st::infoMembersAddMember);
|
||||
//_searchField = _controller->searchFieldController()->createField(
|
||||
// parent,
|
||||
|
@ -256,7 +260,7 @@ void Members::updateSearchEnabledByContent() {
|
|||
}
|
||||
|
||||
void Members::updateHeaderControlsGeometry(int newWidth) {
|
||||
_openMembers->setGeometry(0, 0, newWidth, st::infoMembersHeader);
|
||||
_openMembers->setGeometry(0, st::infoProfileSkip, newWidth, st::infoMembersHeader - st::infoProfileSkip - st::infoMembersHeaderPaddingBottom);
|
||||
|
||||
auto availableWidth = newWidth
|
||||
- st::infoMembersButtonPosition.x();
|
||||
|
|
|
@ -44,6 +44,7 @@ enum class Wrap;
|
|||
|
||||
namespace Profile {
|
||||
|
||||
class Button;
|
||||
class Memento;
|
||||
struct MembersState {
|
||||
std::unique_ptr<PeerListState> list;
|
||||
|
@ -129,7 +130,7 @@ private:
|
|||
object_ptr<Ui::RpWidget> _header = { nullptr };
|
||||
object_ptr<ListWidget> _list = { nullptr };
|
||||
|
||||
Ui::AbstractButton *_openMembers = nullptr;
|
||||
Button *_openMembers = nullptr;
|
||||
Ui::RpWidget *_titleWrap = nullptr;
|
||||
Ui::FlatLabel *_title = nullptr;
|
||||
Ui::IconButton *_addMember = nullptr;
|
||||
|
|
Loading…
Reference in New Issue