#include "ShowHelpInfo.h"
#include "../Global.h"
#include <QPainter>
#include "../BackEnd/MainWidget.h"

Show_Help_Info::Show_Help_Info(QWidget *parent) : QTextEdit(parent) {
    setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));
    setMinimumSize(0, 0);
    setFrameStyle(0);
    setCursorWidth(0);
    setFocusPolicy(Qt::NoFocus);
    setReadOnly(true);
    setStyleSheet("color: black;");
    font.setBold(true);
    setEnabled(false);
}

//void Show_Help_Info::paintEvent(QPaintEvent *event) {
//    QTextEdit::paintEvent(event);
//}

void Show_Help_Info::resizeEvent(QResizeEvent *e) {
    QFont font = font;
    font.setPixelSize(Global::instance()->adapt_height(font.pixelSize()));
    setFont(font);
    QTextEdit::resizeEvent(e);
}
