Add (invisible) resize handle to frameless usercards and reply threads (#4795)
* feat: add resize handle to usercards&reply threads * Add changelog entry --------- Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include "util/LayoutCreator.hpp"
|
||||
#include "widgets/helper/Button.hpp"
|
||||
#include "widgets/helper/ChannelView.hpp"
|
||||
#include "widgets/helper/InvisibleSizeGrip.hpp"
|
||||
#include "widgets/Scrollbar.hpp"
|
||||
#include "widgets/splits/Split.hpp"
|
||||
#include "widgets/splits/SplitInput.hpp"
|
||||
@@ -120,8 +121,10 @@ ReplyThreadPopup::ReplyThreadPopup(bool closeAutomatically, QWidget *parent,
|
||||
}
|
||||
});
|
||||
|
||||
auto layout = LayoutCreator<QWidget>(this->getLayoutContainer())
|
||||
.setLayoutType<QVBoxLayout>();
|
||||
auto layers = LayoutCreator<QWidget>(this->getLayoutContainer())
|
||||
.setLayoutType<QGridLayout>()
|
||||
.withoutMargin();
|
||||
auto layout = layers.emplace<QVBoxLayout>();
|
||||
|
||||
layout->setSpacing(0);
|
||||
// provide draggable margin if frameless
|
||||
@@ -174,6 +177,13 @@ ReplyThreadPopup::ReplyThreadPopup(bool closeAutomatically, QWidget *parent,
|
||||
|
||||
layout->addWidget(this->ui_.threadView, 1);
|
||||
layout->addWidget(this->ui_.replyInput);
|
||||
|
||||
// size grip
|
||||
if (closeAutomatically)
|
||||
{
|
||||
layers->addWidget(new InvisibleSizeGrip(this), 0, 0,
|
||||
Qt::AlignRight | Qt::AlignBottom);
|
||||
}
|
||||
}
|
||||
|
||||
void ReplyThreadPopup::setThread(std::shared_ptr<MessageThread> thread)
|
||||
|
||||
Reference in New Issue
Block a user