Skip to content

Commit f874a8a

Browse files
committed
Fix sticky header reanalyze button.
1 parent 717e275 commit f874a8a

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

ui/linearview.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,10 @@ class BINARYNINJAUIAPI LinearViewHistoryEntry : public HistoryEntry
117117

118118
class LinearView;
119119

120+
class QHBoxLayout;
121+
class QVBoxLayout;
122+
class QResizeEvent;
123+
120124
class StickyHeader: public QWidget
121125
{
122126
RenderContext m_render;
@@ -128,6 +132,11 @@ class StickyHeader: public QWidget
128132
LinearViewLine m_line;
129133
BinaryNinja::FunctionViewType m_viewType;
130134
QProgressIndicator* m_updateIndicator;
135+
QHBoxLayout* m_mainLayout = nullptr;
136+
QVBoxLayout* m_indicatorLayout = nullptr;
137+
138+
void updateIndicatorIcon();
139+
void updateIndicatorPosition();
131140

132141
public:
133142
StickyHeader(BinaryViewRef data, LinearView* parent);
@@ -138,6 +147,7 @@ class StickyHeader: public QWidget
138147
void updateTheme();
139148

140149
virtual void paintEvent(QPaintEvent* event) override;
150+
virtual void resizeEvent(QResizeEvent* event) override;
141151
};
142152

143153

ui/progressindicator.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
#include <QtWidgets/QWidget>
2525
#include <QtGui/QColor>
26+
#include <QtGui/QPixmap>
2627
#include "uicontext.h"
2728

2829
/*!
@@ -100,6 +101,7 @@ class BINARYNINJAUIAPI QProgressIndicator : public QWidget
100101
\sa color
101102
*/
102103
void setColor(const QColor& color);
104+
void setStaticPixmap(const QPixmap& pixmap, const QPixmap& hoverPixmap = QPixmap());
103105

104106
Q_SIGNALS:
105107
void clicked();
@@ -129,6 +131,8 @@ class BINARYNINJAUIAPI QProgressIndicator : public QWidget
129131
QString m_animatedToolTip;
130132
QColor m_color;
131133
bool m_activeHover = false;
134+
QPixmap m_staticPixmap;
135+
QPixmap m_staticHoverPixmap;
132136
};
133137

134138
#endif // QPROGRESSINDICATOR_H

0 commit comments

Comments
 (0)