Support HTML markup for knob labels (#3134)

Co-authored-by: Hyunjin Song <tteu.ingog@gmail.com>
Co-authored-by: Dominic Clark <mrdomclark@gmail.com>
This commit is contained in:
liushuyu
2021-01-27 23:27:13 -07:00
committed by GitHub
parent 4107bc02b9
commit ed4df52d86
2 changed files with 42 additions and 7 deletions

View File

@@ -30,6 +30,7 @@
#include <QPixmap>
#include <QWidget>
#include <QtCore/QPoint>
#include <QTextDocument>
#include "AutomatableModelView.h"
@@ -90,6 +91,7 @@ public:
setUnit( _txt_after );
}
void setLabel( const QString & txt );
void setHtmlLabel( const QString &htmltxt );
void setTotalAngle( float angle );
@@ -171,6 +173,8 @@ private:
static TextFloat * s_textFloat;
QString m_label;
bool m_isHtmlLabel;
QTextDocument* m_tdRenderer;
std::unique_ptr<QPixmap> m_knobPixmap;
BoolModel m_volumeKnob;