mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-19 03:16:10 +00:00
Fix graph header resizing (#1189)
* Fix graph header resizing * Remove 'this' * Fix formatting * Add comment
This commit is contained in:
parent
697eb66aba
commit
ef2f8f6772
@ -118,10 +118,16 @@ DisassemblerGraphView::DisassemblerGraphView(QWidget *parent)
|
||||
|
||||
connect(mMenu, SIGNAL(copy()), this, SLOT(copySelection()));
|
||||
|
||||
header = new QTextEdit(viewport());
|
||||
header = new QTextEdit();
|
||||
header->setFixedHeight(30);
|
||||
header->setReadOnly(true);
|
||||
header->setLineWrapMode(QTextEdit::NoWrap);
|
||||
|
||||
// Add header as widget to layout so it stretches to the layout width
|
||||
layout()->setContentsMargins(0, 0, 0, 0);
|
||||
layout()->setAlignment(Qt::AlignTop);
|
||||
layout()->addWidget(header);
|
||||
|
||||
highlighter = new SyntaxHighlighter(header->document());
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,6 @@ GraphWidget::GraphWidget(MainWindow *main, OverviewWidget *overview, QAction *ac
|
||||
toggleOverview(visibility);
|
||||
if (visibility) {
|
||||
Core()->setMemoryWidgetPriority(CutterCore::MemoryWidgetType::Graph);
|
||||
this->graphView->header->setFixedWidth(width());
|
||||
}
|
||||
});
|
||||
|
||||
@ -40,7 +39,6 @@ GraphWidget::GraphWidget(MainWindow *main, OverviewWidget *overview, QAction *ac
|
||||
if (type == CutterCore::MemoryWidgetType::Graph && !emptyGraph) {
|
||||
this->raise();
|
||||
this->graphView->setFocus();
|
||||
this->graphView->header->setFixedWidth(width());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user