mirror of
https://github.com/rizinorg/cutter.git
synced 2025-02-20 13:46:06 +00:00
Added Close and Reopen button to HexWidget SideView (#852)
This commit is contained in:
parent
70d80bd782
commit
d5513c66dc
@ -38,7 +38,24 @@ HexdumpWidget::HexdumpWidget(MainWindow *main, QAction *action) :
|
||||
margin = static_cast<int>(ui->hexASCIIText->document()->documentMargin());
|
||||
ui->asciiHeaderLabel->setContentsMargins(margin, 0, margin, 0);
|
||||
|
||||
ui->splitter->setCollapsible(0, false); // Only Sidebar should collapse
|
||||
ui->splitter->setChildrenCollapsible(false);
|
||||
|
||||
QToolButton *closeButton = new QToolButton;
|
||||
QIcon closeIcon = qApp->style()->standardIcon(QStyle::SP_DialogCloseButton);
|
||||
closeButton->setIcon(closeIcon);
|
||||
ui->hexSideTab_2->setCornerWidget(closeButton);
|
||||
|
||||
ui->openSideViewB->hide(); // hide button at startup since side view is visible
|
||||
|
||||
connect(closeButton, &QToolButton::clicked, this, [this]{
|
||||
ui->hexSideTab_2->hide();
|
||||
ui->openSideViewB->show();
|
||||
});
|
||||
|
||||
connect(ui->openSideViewB, &QToolButton::clicked, this, [this]{
|
||||
ui->hexSideTab_2->show();
|
||||
ui->openSideViewB->hide();
|
||||
});
|
||||
|
||||
setupFonts();
|
||||
|
||||
|
@ -21,6 +21,12 @@
|
||||
</property>
|
||||
<widget class="QWidget" name="dockWidgetContents">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QSplitter" name="splitter">
|
||||
<property name="orientation">
|
||||
@ -38,8 +44,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>553</width>
|
||||
<height>764</height>
|
||||
<width>515</width>
|
||||
<height>770</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2" columnstretch="0,0,0,0,1">
|
||||
@ -243,6 +249,9 @@
|
||||
<string>Parsing</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_23">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
@ -657,6 +666,31 @@
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="openSideViewB">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>25</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="arrowType">
|
||||
<enum>Qt::LeftArrow</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<action name="actionHideHexdump_side_panel">
|
||||
|
Loading…
Reference in New Issue
Block a user