mirror of
https://github.com/rizinorg/cutter.git
synced 2025-01-19 02:48:49 +00:00
Replace HexdumpWidget::resizeHexdump() with sizePolicy
This commit is contained in:
parent
2775b4bb0a
commit
3a4e87ca41
@ -290,7 +290,6 @@ void HexdumpWidget::refresh(RVA addr)
|
||||
ui->hexOffsetText->setPlainText(hexdump[0]);
|
||||
ui->hexHexText->setPlainText(hexdump[1]);
|
||||
ui->hexASCIIText->setPlainText(hexdump[2]);
|
||||
resizeHexdump();
|
||||
|
||||
|
||||
int seekLine = static_cast<int>((addr - topOffset) / cols);
|
||||
@ -516,14 +515,6 @@ std::array<QString, 3> HexdumpWidget::fetchHexdump(RVA offset, RVA bytes)
|
||||
return { offsets, hex, ascii };
|
||||
}
|
||||
|
||||
void HexdumpWidget::resizeHexdump()
|
||||
{
|
||||
ui->hexOffsetText->setMinimumWidth(static_cast<int>(ui->hexOffsetText->document()->size().width()));
|
||||
ui->hexHexText->setMinimumWidth(static_cast<int>(ui->hexHexText->document()->size().width()));
|
||||
|
||||
//this->hexASCIIText->setMinimumWidth(this->hexASCIIText->document()->size().width());
|
||||
}
|
||||
|
||||
void HexdumpWidget::adjustHexdumpLines()
|
||||
{
|
||||
QScrollBar *sb = ui->hexASCIIText->verticalScrollBar();
|
||||
@ -722,7 +713,6 @@ void HexdumpWidget::setupFonts()
|
||||
void HexdumpWidget::fontsUpdated()
|
||||
{
|
||||
setupFonts();
|
||||
resizeHexdump();
|
||||
adjustHexdumpLines();
|
||||
}
|
||||
|
||||
@ -966,7 +956,6 @@ void HexdumpWidget::zoomIn(int range)
|
||||
ui->hexOffsetText->zoomIn(range);
|
||||
ui->hexASCIIText->zoomIn(range);
|
||||
ui->hexHexText->zoomIn(range);
|
||||
resizeHexdump();
|
||||
}
|
||||
|
||||
void HexdumpWidget::zoomOut(int range)
|
||||
@ -974,5 +963,4 @@ void HexdumpWidget::zoomOut(int range)
|
||||
ui->hexOffsetText->zoomOut(range);
|
||||
ui->hexASCIIText->zoomOut(range);
|
||||
ui->hexHexText->zoomOut(range);
|
||||
resizeHexdump();
|
||||
}
|
||||
|
@ -103,7 +103,6 @@ private slots:
|
||||
void on_action32columns_triggered();
|
||||
void on_action64columns_triggered();
|
||||
|
||||
void resizeHexdump();
|
||||
void adjustHexdumpLines();
|
||||
|
||||
void fontsUpdated();
|
||||
|
@ -155,17 +155,11 @@ QToolTip {
|
||||
<item row="1" column="0">
|
||||
<widget class="QPlainTextEdit" name="hexOffsetText">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Anonymous Pro</family>
|
||||
<pointsize>13</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="acceptDrops">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
@ -195,7 +189,7 @@ QToolTip {
|
||||
<item row="1" column="1">
|
||||
<widget class="QPlainTextEdit" name="hexHexText">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@ -212,12 +206,6 @@ QToolTip {
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Anonymous Pro</family>
|
||||
<pointsize>13</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="acceptDrops">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
|
Loading…
Reference in New Issue
Block a user