mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-18 19:06:10 +00:00
Hide and resize hexdump sidebar with heuristics (#1798)
This commit is contained in:
parent
cae07d15db
commit
3e706ffd5a
@ -307,6 +307,11 @@ void HexdumpWidget::on_hexSideTab_2_currentChanged(int /*index*/)
|
||||
|
||||
void HexdumpWidget::resizeEvent(QResizeEvent *event)
|
||||
{
|
||||
// Heuristics to hide sidebar when it hides the content of the hexdump. 600px looks just "okay"
|
||||
// Only applied when widget width is decreased to avoid unwanted behavior
|
||||
if (event->oldSize().width() > event->size().width() && event->size().width() < 600) {
|
||||
showSidePanel(false);
|
||||
}
|
||||
QDockWidget::resizeEvent(event);
|
||||
refresh();
|
||||
}
|
||||
|
@ -33,6 +33,12 @@
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<widget class="HexWidget" name="hexTextView">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
@ -51,7 +57,7 @@
|
||||
<enum>QTabWidget::North</enum>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="usesScrollButtons">
|
||||
<bool>true</bool>
|
||||
|
Loading…
Reference in New Issue
Block a user