summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Taylor <alex@vector35.com>2025-10-17 23:01:46 -0400
committerAlexander Taylor <alex@vector35.com>2025-10-18 21:35:39 -0400
commitf874a8ac57bd95c3ad39405bbb191993845d17cd (patch)
tree7dd7ec32e3b6cea05da3da0291730ee7536be0c6
parent717e275881f4e1e1255e733e33ad8e7c8445d377 (diff)
Fix sticky header reanalyze button.
-rw-r--r--ui/linearview.h10
-rw-r--r--ui/progressindicator.h4
2 files changed, 14 insertions, 0 deletions
diff --git a/ui/linearview.h b/ui/linearview.h
index 3a490367..a33341ef 100644
--- a/ui/linearview.h
+++ b/ui/linearview.h
@@ -117,6 +117,10 @@ public:
class LinearView;
+class QHBoxLayout;
+class QVBoxLayout;
+class QResizeEvent;
+
class StickyHeader: public QWidget
{
RenderContext m_render;
@@ -128,6 +132,11 @@ class StickyHeader: public QWidget
LinearViewLine m_line;
BinaryNinja::FunctionViewType m_viewType;
QProgressIndicator* m_updateIndicator;
+ QHBoxLayout* m_mainLayout = nullptr;
+ QVBoxLayout* m_indicatorLayout = nullptr;
+
+ void updateIndicatorIcon();
+ void updateIndicatorPosition();
public:
StickyHeader(BinaryViewRef data, LinearView* parent);
@@ -138,6 +147,7 @@ public:
void updateTheme();
virtual void paintEvent(QPaintEvent* event) override;
+ virtual void resizeEvent(QResizeEvent* event) override;
};
diff --git a/ui/progressindicator.h b/ui/progressindicator.h
index 31eda8ab..72e2249f 100644
--- a/ui/progressindicator.h
+++ b/ui/progressindicator.h
@@ -23,6 +23,7 @@
#include <QtWidgets/QWidget>
#include <QtGui/QColor>
+#include <QtGui/QPixmap>
#include "uicontext.h"
/*!
@@ -100,6 +101,7 @@ class BINARYNINJAUIAPI QProgressIndicator : public QWidget
\sa color
*/
void setColor(const QColor& color);
+ void setStaticPixmap(const QPixmap& pixmap, const QPixmap& hoverPixmap = QPixmap());
Q_SIGNALS:
void clicked();
@@ -129,6 +131,8 @@ class BINARYNINJAUIAPI QProgressIndicator : public QWidget
QString m_animatedToolTip;
QColor m_color;
bool m_activeHover = false;
+ QPixmap m_staticPixmap;
+ QPixmap m_staticHoverPixmap;
};
#endif // QPROGRESSINDICATOR_H