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:
@@ -26,6 +26,7 @@
|
||||
#include "util/StreamerMode.hpp"
|
||||
#include "widgets/helper/ChannelView.hpp"
|
||||
#include "widgets/helper/EffectLabel.hpp"
|
||||
#include "widgets/helper/InvisibleSizeGrip.hpp"
|
||||
#include "widgets/helper/Line.hpp"
|
||||
#include "widgets/Label.hpp"
|
||||
#include "widgets/Scrollbar.hpp"
|
||||
@@ -246,8 +247,10 @@ UserInfoPopup::UserInfoPopup(bool closeAutomatically, QWidget *parent,
|
||||
this->shortcuts_ = getApp()->hotkeys->shortcutsForCategory(
|
||||
HotkeyCategory::PopupWindow, actions, this);
|
||||
|
||||
auto layout = LayoutCreator<QWidget>(this->getLayoutContainer())
|
||||
.setLayoutType<QVBoxLayout>();
|
||||
auto layers = LayoutCreator<QWidget>(this->getLayoutContainer())
|
||||
.setLayoutType<QGridLayout>()
|
||||
.withoutMargin();
|
||||
auto layout = layers.emplace<QVBoxLayout>();
|
||||
|
||||
// first line
|
||||
auto head = layout.emplace<QHBoxLayout>().withoutMargin();
|
||||
@@ -552,6 +555,13 @@ UserInfoPopup::UserInfoPopup(bool closeAutomatically, QWidget *parent,
|
||||
logs->setAlignment(this->ui_.noMessagesLabel, Qt::AlignHCenter);
|
||||
}
|
||||
|
||||
// size grip
|
||||
if (closeAutomatically)
|
||||
{
|
||||
layers->addWidget(new InvisibleSizeGrip(this), 0, 0,
|
||||
Qt::AlignRight | Qt::AlignBottom);
|
||||
}
|
||||
|
||||
this->installEvents();
|
||||
this->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Policy::Ignored);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user