mirror of
https://github.com/jkriege2/JKQtPlotter.git
synced 2024-12-25 10:01:38 +08:00
bugfixed styling example
This commit is contained in:
parent
bc534f1b36
commit
4031e9a54e
@ -312,18 +312,18 @@ void JKQTPStylePlainTextEdit::contextMenuEvent(QContextMenuEvent *event)
|
|||||||
connect(act, &QAction::triggered, std::bind(std::mem_fn(&JKQTPStylePlainTextEdit::addTransparencyToCurrentLineValue), this, act->text()));
|
connect(act, &QAction::triggered, std::bind(std::mem_fn(&JKQTPStylePlainTextEdit::addTransparencyToCurrentLineValue), this, act->text()));
|
||||||
menuTrans->addAction(act);
|
menuTrans->addAction(act);
|
||||||
} else if (currentLinePartsLower[0].endsWith("font_name")) {
|
} else if (currentLinePartsLower[0].endsWith("font_name")) {
|
||||||
const QStringList splitValue=currentLinePartsLower[1].split('+');
|
const QStringList splitValue=currentLineParts[1].split('+');
|
||||||
submenu->setEnabled(true);
|
submenu->setEnabled(true);
|
||||||
QMenu* menuDefaultFonts=submenu->addMenu(tr("default fonts ..."));
|
QMenu* menuDefaultFonts=submenu->addMenu(tr("default fonts ..."));
|
||||||
QMenu* menuSystemFonts=submenu->addMenu(tr("system fonts ..."));
|
QMenu* menuSystemFonts=submenu->addMenu(tr("system fonts ..."));
|
||||||
QMenu* menuAllFOnts=submenu->addMenu(tr("all fonts ..."));
|
QMenu* menuAllFOnts=submenu->addMenu(tr("all fonts ..."));
|
||||||
QMenu* menuMathFont=submenu->addMenu(tr("add math-fonts specifier ..."));
|
QMenu* menuMathFont=submenu->addMenu(tr("add math-fonts specifier ..."));
|
||||||
currentValue->setVisible(true);
|
currentValue->setVisible(true);
|
||||||
currentValue->setText(tr("text font: ")+currentLineParts[0]);
|
currentValue->setText(tr("text font: ")+splitValue[0]);
|
||||||
currentValue->setFont(QFont(JKQTMathTextFontSpecifier::transformFontNameAndDecodeSpecialFonts(JKQTMathTextFontSpecifier::fromFontSpec(currentLineParts[1]).fontName())));
|
currentValue->setFont(QFont(JKQTMathTextFontSpecifier::transformFontNameAndDecodeSpecialFonts(JKQTMathTextFontSpecifier::fromFontSpec(currentLineParts[1]).fontName())));
|
||||||
if (!JKQTMathTextFontSpecifier::fromFontSpec(currentLineParts[1]).mathFontName().isEmpty()) {
|
if (!JKQTMathTextFontSpecifier::fromFontSpec(currentLineParts[1]).mathFontName().isEmpty()) {
|
||||||
currentValue2->setVisible(true);
|
currentValue2->setVisible(true);
|
||||||
currentValue2->setText(tr("math font: ")+currentLineParts[1]);
|
currentValue2->setText(tr("math font: ")+splitValue[1]);
|
||||||
currentValue2->setFont(QFont(JKQTMathTextFontSpecifier::transformFontNameAndDecodeSpecialFonts(JKQTMathTextFontSpecifier::fromFontSpec(currentLineParts[1]).mathFontName())));
|
currentValue2->setFont(QFont(JKQTMathTextFontSpecifier::transformFontNameAndDecodeSpecialFonts(JKQTMathTextFontSpecifier::fromFontSpec(currentLineParts[1]).mathFontName())));
|
||||||
}
|
}
|
||||||
QAction* act;
|
QAction* act;
|
||||||
|
Loading…
Reference in New Issue
Block a user