Increased height of various boxes with participants list.
This commit is contained in:
@@ -33,10 +33,12 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "ui/widgets/menu/menu_multiline_action.h"
|
||||
#include "ui/widgets/popup_menu.h"
|
||||
#include "ui/text/text_utilities.h"
|
||||
#include "ui/rect.h"
|
||||
#include "info/profile/info_profile_values.h"
|
||||
#include "window/window_session_controller.h"
|
||||
#include "history/history.h"
|
||||
#include "styles/style_chat.h"
|
||||
#include "styles/style_layers.h"
|
||||
#include "styles/style_menu_icons.h"
|
||||
|
||||
namespace {
|
||||
@@ -1212,6 +1214,17 @@ rpl::producer<int> ParticipantsBoxController::fullCountValue() const {
|
||||
return _fullCountValue.value();
|
||||
}
|
||||
|
||||
rpl::producer<int> ParticipantsBoxController::boxHeightValue() const {
|
||||
return _fullCountValue.value() | rpl::map([=](int count) {
|
||||
const auto &st = computeListSt();
|
||||
const auto searchHeight = st.item.height;
|
||||
const auto listHeight = count * st.item.height;
|
||||
return std::max(
|
||||
searchHeight + listHeight + rect::m::sum::v(st.padding),
|
||||
st::boxMaxListHeight);
|
||||
});
|
||||
}
|
||||
|
||||
void ParticipantsBoxController::setStoriesShown(bool shown) {
|
||||
_stories = std::make_unique<PeerListStories>(
|
||||
this,
|
||||
|
||||
@@ -202,6 +202,7 @@ public:
|
||||
|
||||
[[nodiscard]] rpl::producer<int> onlineCountValue() const;
|
||||
[[nodiscard]] rpl::producer<int> fullCountValue() const;
|
||||
[[nodiscard]] rpl::producer<int> boxHeightValue() const override;
|
||||
|
||||
void setStoriesShown(bool shown);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user