0c2441f3a6
Replace the standard QMainWindow chrome and QTableWidget with a purpose-built Qt UI built around hand-rolled widgets and animations: - SplashScreen: frameless translucent splash with a wordmark fade/scale, a sweeping scan line and a pulsing accent glow. ~950ms total cold-start reveal that fades out into the main window. - TitleBar: custom title bar replaces the OS frame, owns drag-to-move, minimize/close buttons, and a breathing scan-status dot. - InstanceList + InstanceRow: scrollable column of self-painted rows (PID, title, Inject button). Rows are not selectable, double-click has no special meaning - injection happens only through the button. Hover animates each row's tint; new pids play a slide-in/opacity entrance. - InjectionOverlay: modal-style frameless overlay shown while inject() runs in a worker thread. Spinner ring + progress bar advance during injection; completion swaps to a checkmark / X, holds briefly, then fades out. After it closes, the main window fades and the loader self-quits. - MainWindow: frameless + translucent panel painted by hand; entrance fade/slide on launch; uniform playExitThenQuit() shared by the close button and the post-injection path so every exit path gets a fade-out instead of a hard vanish. Also enables Win11 rounded corners via DwmSetWindowAttribute on show. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
37 lines
863 B
C++
37 lines
863 B
C++
#pragma once
|
|
|
|
#include <QWidget>
|
|
|
|
class QLabel;
|
|
class QToolButton;
|
|
|
|
namespace loader {
|
|
|
|
// Custom title bar used by the frameless MainWindow. Owns the move-by-drag
|
|
// behaviour, the minimize/close buttons, and a small pulsing scan indicator
|
|
// that signals the auto-refresh loop is live.
|
|
class TitleBar : public QWidget {
|
|
Q_OBJECT
|
|
Q_PROPERTY(qreal pulse READ pulse WRITE setPulse)
|
|
|
|
public:
|
|
explicit TitleBar(QWidget* parent = nullptr);
|
|
|
|
void setTitleText(const QString& text);
|
|
|
|
qreal pulse() const { return pulse_; }
|
|
void setPulse(qreal v);
|
|
|
|
protected:
|
|
void mousePressEvent(QMouseEvent*) override;
|
|
void paintEvent(QPaintEvent*) override;
|
|
|
|
private:
|
|
QLabel* titleLabel_ = nullptr;
|
|
QToolButton* minBtn_ = nullptr;
|
|
QToolButton* closeBtn_ = nullptr;
|
|
qreal pulse_ = 0.0;
|
|
};
|
|
|
|
} // namespace loader
|