mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-18 19:06:10 +00:00
Don't set comments to vertical when resizing (#2045)
This commit is contained in:
parent
cf65c0304a
commit
37544b45d5
@ -4,7 +4,6 @@
|
||||
#include "common/Helpers.h"
|
||||
|
||||
#include <QMenu>
|
||||
#include <QResizeEvent>
|
||||
#include <QShortcut>
|
||||
|
||||
CommentsModel::CommentsModel(QList<CommentDescription> *comments,
|
||||
@ -287,20 +286,6 @@ void CommentsWidget::showTitleContextMenu(const QPoint &pt)
|
||||
titleContextMenu->exec(this->mapToGlobal(pt));
|
||||
}
|
||||
|
||||
void CommentsWidget::resizeEvent(QResizeEvent *event)
|
||||
{
|
||||
if (mainWindow->responsive && isVisible()) {
|
||||
if (event->size().width() >= event->size().height()) {
|
||||
// Set horizontal view (list)
|
||||
actionHorizontal.setChecked(true);
|
||||
} else {
|
||||
// Set vertical view (Tree)
|
||||
actionVertical.setChecked(true);
|
||||
}
|
||||
}
|
||||
QDockWidget::resizeEvent(event);
|
||||
}
|
||||
|
||||
void CommentsWidget::refreshTree()
|
||||
{
|
||||
commentsModel->beginResetModel();
|
||||
|
@ -78,9 +78,6 @@ public:
|
||||
explicit CommentsWidget(MainWindow *main, QAction *action = nullptr);
|
||||
~CommentsWidget() override;
|
||||
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent *event) override;
|
||||
|
||||
private slots:
|
||||
void onActionHorizontalToggled(bool checked);
|
||||
void onActionVerticalToggled(bool checked);
|
||||
|
@ -16,7 +16,6 @@
|
||||
#include <QShortcut>
|
||||
#include <QJsonArray>
|
||||
#include <QJsonObject>
|
||||
#include <QResizeEvent>
|
||||
|
||||
namespace {
|
||||
|
||||
@ -580,20 +579,6 @@ void FunctionsWidget::onActionVerticalToggled(bool enable)
|
||||
}
|
||||
}
|
||||
|
||||
void FunctionsWidget::resizeEvent(QResizeEvent *event)
|
||||
{
|
||||
if (mainWindow->responsive && isVisible()) {
|
||||
if (event->size().width() >= event->size().height()) {
|
||||
// Set horizontal view (list)
|
||||
actionHorizontal.setChecked(true);
|
||||
} else {
|
||||
// Set vertical view (Tree)
|
||||
actionVertical.setChecked(true);
|
||||
}
|
||||
}
|
||||
QDockWidget::resizeEvent(event);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief a SLOT to set the stylesheet for a tooltip
|
||||
*/
|
||||
|
@ -105,9 +105,6 @@ private slots:
|
||||
void setTooltipStylesheet();
|
||||
void refreshTree();
|
||||
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent *event) override;
|
||||
|
||||
private:
|
||||
QSharedPointer<FunctionsTask> task;
|
||||
QList<FunctionDescription> functions;
|
||||
|
Loading…
Reference in New Issue
Block a user