Replacement for KColorButton

This commit is contained in:
Magnus Hellströmer
2025-02-28 16:29:15 +01:00
parent 01d018f8cf
commit b815244494
11 changed files with 161 additions and 44 deletions

View File

@@ -62,10 +62,7 @@ void TextEditor::updateForm()
m_rotation_sb -> setValue(m_text -> rotation());
m_size_sb -> setValue(m_text -> font().pointSize());
m_font_pb -> setText(m_text -> font().family());
#ifdef BUILD_WITHOUT_KF6
#else
m_color_pb -> setColor(m_text -> defaultTextColor());
#endif
setUpEditConnection();
}
@@ -344,19 +341,16 @@ void TextEditor::setUpWidget(QWidget *parent)
m_line_edit->setPlaceholderText(tr("Entrer votre texte ici"));
gridLayout->addWidget(m_line_edit, 0, 0, 1, 6);
#ifdef BUILD_WITHOUT_KF6
#else
m_color_pb = new KColorButton(parent);
m_color_pb = new ColorButton(parent);
m_color_pb->setObjectName(QString::fromUtf8("m_color_pb"));
connect(
m_color_pb,
&KColorButton::changed,
&ColorButton::changed,
this,
&TextEditor::on_m_color_pb_changed);
gridLayout->addWidget(m_color_pb, 2, 5, 1, 1);
#endif
QLabel *label_5 = new QLabel(parent);
label_5->setObjectName(QString::fromUtf8("label_5"));