#include "ctextedit.h"
#include <QTextEdit>
#include <QFocusEvent>
#include <QPalette>

CTextEdit::CTextEdit(QWidget *parent) : QTextEdit(parent)
{
    setStyleSheet("QTextEdit { border: 1px solid rgba(38,38,38,0.15); border-radius: 6px; padding:1px 1px}");
}

void CTextEdit::focusInEvent(QFocusEvent *event)
{
    setStyleSheet("QTextEdit { border: 2px solid palette(highlight); border-radius: 6px; padding:1px 1px}");
    QTextEdit::focusInEvent(event);
}

void CTextEdit::focusOutEvent(QFocusEvent *event)
{
    setStyleSheet("QTextEdit { border: 1px solid rgba(38,38,38,0.15); border-radius: 6px; padding:1px 1px}");
    QTextEdit::focusOutEvent(event);
}
