mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Fix layout of cloud themes in a narrow window.
This commit is contained in:
@@ -312,6 +312,7 @@ object_ptr<Ui::RpWidget> CloudList::takeWidget() {
|
||||
|
||||
rpl::producer<bool> CloudList::empty() const {
|
||||
using namespace rpl::mappers;
|
||||
|
||||
return _count.value() | rpl::map(_1 == 0);
|
||||
}
|
||||
|
||||
@@ -720,6 +721,7 @@ int CloudList::resizeGetHeight(int newWidth) {
|
||||
auto rowHeight = 0;
|
||||
for (const auto &element : _elements) {
|
||||
const auto button = element.button.get();
|
||||
button->resizeToWidth(single);
|
||||
button->moveToLeft(int(std::round(x)), y);
|
||||
accumulate_max(rowHeight, button->height());
|
||||
x += single + skip;
|
||||
|
||||
Reference in New Issue
Block a user