mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-21 04:16:12 +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 "common/Helpers.h"
|
||||||
|
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include <QResizeEvent>
|
|
||||||
#include <QShortcut>
|
#include <QShortcut>
|
||||||
|
|
||||||
CommentsModel::CommentsModel(QList<CommentDescription> *comments,
|
CommentsModel::CommentsModel(QList<CommentDescription> *comments,
|
||||||
@ -287,20 +286,6 @@ void CommentsWidget::showTitleContextMenu(const QPoint &pt)
|
|||||||
titleContextMenu->exec(this->mapToGlobal(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()
|
void CommentsWidget::refreshTree()
|
||||||
{
|
{
|
||||||
commentsModel->beginResetModel();
|
commentsModel->beginResetModel();
|
||||||
|
@ -78,9 +78,6 @@ public:
|
|||||||
explicit CommentsWidget(MainWindow *main, QAction *action = nullptr);
|
explicit CommentsWidget(MainWindow *main, QAction *action = nullptr);
|
||||||
~CommentsWidget() override;
|
~CommentsWidget() override;
|
||||||
|
|
||||||
protected:
|
|
||||||
void resizeEvent(QResizeEvent *event) override;
|
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void onActionHorizontalToggled(bool checked);
|
void onActionHorizontalToggled(bool checked);
|
||||||
void onActionVerticalToggled(bool checked);
|
void onActionVerticalToggled(bool checked);
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
#include <QShortcut>
|
#include <QShortcut>
|
||||||
#include <QJsonArray>
|
#include <QJsonArray>
|
||||||
#include <QJsonObject>
|
#include <QJsonObject>
|
||||||
#include <QResizeEvent>
|
|
||||||
|
|
||||||
namespace {
|
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
|
* @brief a SLOT to set the stylesheet for a tooltip
|
||||||
*/
|
*/
|
||||||
|
@ -105,9 +105,6 @@ private slots:
|
|||||||
void setTooltipStylesheet();
|
void setTooltipStylesheet();
|
||||||
void refreshTree();
|
void refreshTree();
|
||||||
|
|
||||||
protected:
|
|
||||||
void resizeEvent(QResizeEvent *event) override;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QSharedPointer<FunctionsTask> task;
|
QSharedPointer<FunctionsTask> task;
|
||||||
QList<FunctionDescription> functions;
|
QList<FunctionDescription> functions;
|
||||||
|
Loading…
Reference in New Issue
Block a user