mirror of
https://github.com/rizinorg/cutter.git
synced 2025-02-21 14:16:08 +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());
|
margin = static_cast<int>(ui->hexASCIIText->document()->documentMargin());
|
||||||
ui->asciiHeaderLabel->setContentsMargins(margin, 0, margin, 0);
|
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();
|
setupFonts();
|
||||||
|
|
||||||
|
@ -21,6 +21,12 @@
|
|||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="dockWidgetContents">
|
<widget class="QWidget" name="dockWidgetContents">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QSplitter" name="splitter">
|
<widget class="QSplitter" name="splitter">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
@ -38,8 +44,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>553</width>
|
<width>515</width>
|
||||||
<height>764</height>
|
<height>770</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_2" columnstretch="0,0,0,0,1">
|
<layout class="QGridLayout" name="gridLayout_2" columnstretch="0,0,0,0,1">
|
||||||
@ -243,6 +249,9 @@
|
|||||||
<string>Parsing</string>
|
<string>Parsing</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_23">
|
<layout class="QVBoxLayout" name="verticalLayout_23">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
@ -657,6 +666,31 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<action name="actionHideHexdump_side_panel">
|
<action name="actionHideHexdump_side_panel">
|
||||||
|
Loading…
Reference in New Issue
Block a user