mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
Redesign character dialog
Fixes: #2752, #3804, #3884, #4836 Backport of [fb393b450d661/lyxgit] and [f888afeb9ef7/lyxgit]
This commit is contained in:
parent
7c614cc6b7
commit
0c05722a60
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -6,6 +6,7 @@
|
||||
* \author Angus Leeming
|
||||
* \author Edwin Leuven
|
||||
* \author John Levon
|
||||
* \author Jürgen Spitzmüller
|
||||
*
|
||||
* Full author contact details are available in file CREDITS.
|
||||
*/
|
||||
@ -47,11 +48,11 @@ static QList<ShapePair> shapeData()
|
||||
{
|
||||
QList<ShapePair> shapes;
|
||||
shapes << ShapePair(qt_("No change"), IGNORE_SHAPE);
|
||||
shapes << ShapePair(qt_("Default"), INHERIT_SHAPE);
|
||||
shapes << ShapePair(qt_("Upright"), UP_SHAPE);
|
||||
shapes << ShapePair(qt_("Italic"), ITALIC_SHAPE);
|
||||
shapes << ShapePair(qt_("Slanted"), SLANTED_SHAPE);
|
||||
shapes << ShapePair(qt_("Small Caps"), SMALLCAPS_SHAPE);
|
||||
shapes << ShapePair(qt_("Reset"), INHERIT_SHAPE);
|
||||
return shapes;
|
||||
}
|
||||
|
||||
@ -60,6 +61,7 @@ static QList<SizePair> sizeData()
|
||||
{
|
||||
QList<SizePair> sizes;
|
||||
sizes << SizePair(qt_("No change"), FONT_SIZE_IGNORE);
|
||||
sizes << SizePair(qt_("Default"), FONT_SIZE_INHERIT);
|
||||
sizes << SizePair(qt_("Tiny"), FONT_SIZE_TINY);
|
||||
sizes << SizePair(qt_("Smallest"), FONT_SIZE_SCRIPT);
|
||||
sizes << SizePair(qt_("Smaller"), FONT_SIZE_FOOTNOTE);
|
||||
@ -72,7 +74,6 @@ static QList<SizePair> sizeData()
|
||||
sizes << SizePair(qt_("Huger"), FONT_SIZE_HUGER);
|
||||
sizes << SizePair(qt_("Increase"), FONT_SIZE_INCREASE);
|
||||
sizes << SizePair(qt_("Decrease"), FONT_SIZE_DECREASE);
|
||||
sizes << SizePair(qt_("Reset"), FONT_SIZE_INHERIT);
|
||||
return sizes;
|
||||
}
|
||||
|
||||
@ -81,18 +82,27 @@ static QList<BarPair> barData()
|
||||
{
|
||||
QList<BarPair> bars;
|
||||
bars << BarPair(qt_("No change"), IGNORE);
|
||||
bars << BarPair(qt_("Emph"), EMPH_TOGGLE);
|
||||
bars << BarPair(qt_("Underbar"), UNDERBAR_TOGGLE);
|
||||
bars << BarPair(qt_("Double underbar"), UULINE_TOGGLE);
|
||||
bars << BarPair(qt_("Wavy underbar"), UWAVE_TOGGLE);
|
||||
bars << BarPair(qt_("Strike out"), STRIKEOUT_TOGGLE);
|
||||
bars << BarPair(qt_("Cross out"), XOUT_TOGGLE);
|
||||
bars << BarPair(qt_("Noun"), NOUN_TOGGLE);
|
||||
bars << BarPair(qt_("Reset"), INHERIT);
|
||||
bars << BarPair(qt_("Default"), INHERIT);
|
||||
bars << BarPair(qt_("(Without)[[underlining]]"), NONE);
|
||||
bars << BarPair(qt_("Single[[underlining]]"), UNDERBAR);
|
||||
bars << BarPair(qt_("Double[[underlining]]"), UULINE);
|
||||
bars << BarPair(qt_("Wavy"), UWAVE);
|
||||
return bars;
|
||||
}
|
||||
|
||||
|
||||
static QList<BarPair> strikeData()
|
||||
{
|
||||
QList<BarPair> strike;
|
||||
strike << BarPair(qt_("No change"), IGNORE);
|
||||
strike << BarPair(qt_("Default"), INHERIT);
|
||||
strike << BarPair(qt_("(Without)[[strikethrough]]"), NONE);
|
||||
strike << BarPair(qt_("Single[[strikethrough]]"), STRIKEOUT);
|
||||
strike << BarPair(qt_("With /"), XOUT);
|
||||
return strike;
|
||||
}
|
||||
|
||||
|
||||
static QList<ColorCode> colorData()
|
||||
{
|
||||
QList<ColorCode> colors;
|
||||
@ -123,9 +133,9 @@ static QList<SeriesPair> seriesData()
|
||||
{
|
||||
QList<SeriesPair> series;
|
||||
series << SeriesPair(qt_("No change"), IGNORE_SERIES);
|
||||
series << SeriesPair(qt_("Default"), INHERIT_SERIES);
|
||||
series << SeriesPair(qt_("Medium"), MEDIUM_SERIES);
|
||||
series << SeriesPair(qt_("Bold"), BOLD_SERIES);
|
||||
series << SeriesPair(qt_("Reset"), INHERIT_SERIES);
|
||||
return series;
|
||||
}
|
||||
|
||||
@ -134,10 +144,10 @@ static QList<FamilyPair> familyData()
|
||||
{
|
||||
QList<FamilyPair> families;
|
||||
families << FamilyPair(qt_("No change"), IGNORE_FAMILY);
|
||||
families << FamilyPair(qt_("Default"), INHERIT_FAMILY);
|
||||
families << FamilyPair(qt_("Roman"), ROMAN_FAMILY);
|
||||
families << FamilyPair(qt_("Sans Serif"), SANS_FAMILY);
|
||||
families << FamilyPair(qt_("Typewriter"), TYPEWRITER_FAMILY);
|
||||
families << FamilyPair(qt_("Reset"), INHERIT_FAMILY);
|
||||
return families;
|
||||
}
|
||||
|
||||
@ -147,7 +157,7 @@ static QList<LanguagePair> languageData()
|
||||
QList<LanguagePair> list;
|
||||
// FIXME (Abdel 14/05/2008): it would be nice if we could use this model
|
||||
// directly in the language combo; but, as we need also the 'No Change' and
|
||||
// 'Reset' items, this is not possible right now. Separating those two
|
||||
// 'Default' items, this is not possible right now. Separating those two
|
||||
// entries in radio buttons would be a better GUI IMHO.
|
||||
QAbstractItemModel * language_model = guiApp->languageModel();
|
||||
// Make sure the items are sorted.
|
||||
@ -177,7 +187,8 @@ void fillComboColor(QComboBox * combo, QList<T> const & list)
|
||||
{
|
||||
// at first add the 2 colors "No change" and "No color"
|
||||
combo->addItem(qt_("No change"), "ignore");
|
||||
combo->addItem(qt_("No color"), "none");
|
||||
combo->addItem(qt_("Default"), "inherit");
|
||||
combo->addItem(qt_("(Without)[[color]]"), "none");
|
||||
// now add the real colors
|
||||
QPixmap coloritem(32, 32);
|
||||
QColor color;
|
||||
@ -189,15 +200,13 @@ void fillComboColor(QComboBox * combo, QList<T> const & list)
|
||||
coloritem.fill(color);
|
||||
combo->addItem(QIcon(coloritem), guiname, lyxname);
|
||||
}
|
||||
//the last color is "Reset"
|
||||
combo->addItem(qt_("Reset"), "inherit");
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
GuiCharacter::GuiCharacter(GuiView & lv)
|
||||
: GuiDialog(lv, "character", qt_("Text Style")), font_(ignore_font, ignore_language),
|
||||
toggleall_(false)
|
||||
: GuiDialog(lv, "character", qt_("Text Style")),
|
||||
font_(ignore_font, ignore_language), emph_(false), noun_(false)
|
||||
{
|
||||
setupUi(this);
|
||||
|
||||
@ -207,32 +216,34 @@ GuiCharacter::GuiCharacter(GuiView & lv)
|
||||
connect(autoapplyCB, SIGNAL(stateChanged(int)), this,
|
||||
SLOT(slotAutoApply()));
|
||||
|
||||
connect(miscCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
|
||||
connect(sizeCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
|
||||
connect(familyCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
|
||||
connect(seriesCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
|
||||
connect(shapeCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
|
||||
connect(colorCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
|
||||
connect(langCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
|
||||
connect(toggleallCB, SIGNAL(clicked()), this, SLOT(change_adaptor()));
|
||||
connect(ulineCO, SIGNAL(currentIndexChanged(int)), this, SLOT(change_adaptor()));
|
||||
connect(strikeCO, SIGNAL(currentIndexChanged(int)), this, SLOT(change_adaptor()));
|
||||
connect(sizeCO, SIGNAL(currentIndexChanged(int)), this, SLOT(change_adaptor()));
|
||||
connect(familyCO, SIGNAL(currentIndexChanged(int)), this, SLOT(change_adaptor()));
|
||||
connect(seriesCO, SIGNAL(currentIndexChanged(int)), this, SLOT(change_adaptor()));
|
||||
connect(shapeCO, SIGNAL(currentIndexChanged(int)), this, SLOT(change_adaptor()));
|
||||
connect(colorCO, SIGNAL(currentIndexChanged(int)), this, SLOT(change_adaptor()));
|
||||
connect(langCO, SIGNAL(currentIndexChanged(int)), this, SLOT(change_adaptor()));
|
||||
|
||||
family = familyData();
|
||||
series = seriesData();
|
||||
shape = shapeData();
|
||||
size = sizeData();
|
||||
bar = barData();
|
||||
strike = strikeData();
|
||||
color = colorData();
|
||||
qSort(color.begin(), color.end(), ColorSorter);
|
||||
|
||||
language = languageData();
|
||||
language.prepend(LanguagePair(qt_("Reset"), "reset"));
|
||||
language.prepend(LanguagePair(qt_("Default"), "reset"));
|
||||
language.prepend(LanguagePair(qt_("No change"), "ignore"));
|
||||
|
||||
fillCombo(familyCO, family);
|
||||
fillCombo(seriesCO, series);
|
||||
fillCombo(sizeCO, size);
|
||||
fillCombo(shapeCO, shape);
|
||||
fillCombo(miscCO, bar);
|
||||
fillCombo(ulineCO, bar);
|
||||
fillCombo(strikeCO, strike);
|
||||
fillComboColor(colorCO, color);
|
||||
fillCombo(langCO, language);
|
||||
|
||||
@ -245,10 +256,12 @@ GuiCharacter::GuiCharacter(GuiView & lv)
|
||||
bc().addReadOnly(seriesCO);
|
||||
bc().addReadOnly(sizeCO);
|
||||
bc().addReadOnly(shapeCO);
|
||||
bc().addReadOnly(miscCO);
|
||||
bc().addReadOnly(ulineCO);
|
||||
bc().addReadOnly(strikeCO);
|
||||
bc().addReadOnly(nounCB);
|
||||
bc().addReadOnly(emphCB);
|
||||
bc().addReadOnly(langCO);
|
||||
bc().addReadOnly(colorCO);
|
||||
bc().addReadOnly(toggleallCB);
|
||||
bc().addReadOnly(autoapplyCB);
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
@ -257,13 +270,28 @@ GuiCharacter::GuiCharacter(GuiView & lv)
|
||||
setWindowFlags(Qt::Tool);
|
||||
autoapplyCB->setChecked(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
// FIXME: hack to work around resizing bug in Qt >= 4.2
|
||||
// bug verified with Qt 4.2.{0-3} (JSpitzm)
|
||||
#if QT_VERSION >= 0x040200
|
||||
// qt resizes the comboboxes only after show(), so ...
|
||||
QDialog::show();
|
||||
#endif
|
||||
|
||||
void GuiCharacter::on_emphCB_clicked()
|
||||
{
|
||||
// skip intermediate state at user click
|
||||
if (!emph_) {
|
||||
emphCB->setCheckState(Qt::Checked);
|
||||
emph_ = true;
|
||||
}
|
||||
change_adaptor();
|
||||
}
|
||||
|
||||
|
||||
void GuiCharacter::on_nounCB_clicked()
|
||||
{
|
||||
// skip intermediate state at user click
|
||||
if (!noun_) {
|
||||
nounCB->setCheckState(Qt::Checked);
|
||||
noun_ = true;
|
||||
}
|
||||
change_adaptor();
|
||||
}
|
||||
|
||||
|
||||
@ -292,111 +320,187 @@ static int findPos2nd(QList<P> const & vec, B const & val)
|
||||
}
|
||||
|
||||
|
||||
namespace{
|
||||
FontState getBar(FontInfo const & fi)
|
||||
{
|
||||
if (fi.underbar() == FONT_ON)
|
||||
return UNDERBAR;
|
||||
|
||||
if (fi.uuline() == FONT_ON)
|
||||
return UULINE;
|
||||
|
||||
if (fi.uwave() == FONT_ON)
|
||||
return UWAVE;
|
||||
|
||||
if (fi.underbar() == FONT_IGNORE)
|
||||
return IGNORE;
|
||||
|
||||
return NONE;
|
||||
}
|
||||
|
||||
|
||||
FontState getStrike(FontInfo const & fi)
|
||||
{
|
||||
if (fi.strikeout() == FONT_ON)
|
||||
return STRIKEOUT;
|
||||
|
||||
if (fi.xout() == FONT_ON)
|
||||
return XOUT;
|
||||
|
||||
if (fi.strikeout() == FONT_IGNORE)
|
||||
return IGNORE;
|
||||
|
||||
return NONE;
|
||||
}
|
||||
|
||||
|
||||
Qt::CheckState getMarkupState(lyx::FontState fs)
|
||||
{
|
||||
switch (fs) {
|
||||
case FONT_OFF:
|
||||
return Qt::Unchecked;
|
||||
case FONT_ON:
|
||||
return Qt::Checked;
|
||||
case FONT_TOGGLE:
|
||||
case FONT_INHERIT:
|
||||
case FONT_IGNORE:
|
||||
default:
|
||||
return Qt::PartiallyChecked;
|
||||
}
|
||||
}
|
||||
|
||||
lyx::FontState setMarkupState(Qt::CheckState cs)
|
||||
{
|
||||
switch (cs) {
|
||||
case Qt::Unchecked:
|
||||
return FONT_OFF;
|
||||
case Qt::Checked:
|
||||
return FONT_ON;
|
||||
case Qt::PartiallyChecked:
|
||||
default:
|
||||
return FONT_IGNORE;
|
||||
}
|
||||
}
|
||||
|
||||
} // end namespace anon
|
||||
|
||||
|
||||
void GuiCharacter::updateContents()
|
||||
{
|
||||
if (!autoapplyCB->isChecked()) {
|
||||
bc().setValid(true);
|
||||
return;
|
||||
}
|
||||
if (bufferview()->cursor().selection()) {
|
||||
//FIXME: it would be better to check if each font attribute is constant
|
||||
// for the selection range.
|
||||
font_ = Font(ignore_font, ignore_language);
|
||||
Font font = bufferview()->cursor().real_current_font;
|
||||
FontInfo fi = font.fontInfo();
|
||||
BufferParams const & bp = buffer().masterParams();
|
||||
|
||||
// Check if each font attribute is constant for the selection range.
|
||||
DocIterator const from = bufferview()->cursor().selectionBegin();
|
||||
DocIterator const to = bufferview()->cursor().selectionEnd();
|
||||
for (DocIterator dit = from ; dit != to && !dit.atEnd(); ) {
|
||||
if (!dit.inTexted()) {
|
||||
dit.forwardPos();
|
||||
continue;
|
||||
}
|
||||
Paragraph const & par = dit.paragraph();
|
||||
pos_type const pos = dit.pos();
|
||||
Font tmp = par.getFont(bp, pos, font);
|
||||
if (font.language() != tmp.language())
|
||||
font.setLanguage(ignore_language);
|
||||
if (fi.family() != tmp.fontInfo().family())
|
||||
font.fontInfo().setFamily(IGNORE_FAMILY);
|
||||
if (fi.series() != tmp.fontInfo().series())
|
||||
font.fontInfo().setSeries(IGNORE_SERIES);
|
||||
if (fi.shape() != tmp.fontInfo().shape())
|
||||
font.fontInfo().setShape(IGNORE_SHAPE);
|
||||
if (fi.size() != tmp.fontInfo().size())
|
||||
font.fontInfo().setSize(FONT_SIZE_IGNORE);
|
||||
if (fi.emph() != tmp.fontInfo().emph())
|
||||
font.fontInfo().setEmph(FONT_IGNORE);
|
||||
if (fi.noun() != tmp.fontInfo().noun())
|
||||
font.fontInfo().setNoun(FONT_IGNORE);
|
||||
if (fi.color() != tmp.fontInfo().color())
|
||||
font.fontInfo().setColor(Color_ignore);
|
||||
if (fi.underbar() != tmp.fontInfo().underbar()
|
||||
|| fi.uuline() != tmp.fontInfo().uuline()
|
||||
|| fi.uwave() != tmp.fontInfo().uwave())
|
||||
setBar(font.fontInfo(), IGNORE);
|
||||
if (fi.strikeout() != tmp.fontInfo().strikeout()
|
||||
|| fi.xout() != tmp.fontInfo().xout())
|
||||
setStrike(font.fontInfo(), IGNORE);
|
||||
dit.forwardPos();
|
||||
}
|
||||
font_ = font;
|
||||
} else
|
||||
font_ = bufferview()->cursor().current_font;
|
||||
font_ = bufferview()->cursor().real_current_font;
|
||||
|
||||
paramsToDialog(font_);
|
||||
}
|
||||
|
||||
|
||||
static FontState getBar(FontInfo const & fi)
|
||||
{
|
||||
if (fi.emph() == FONT_TOGGLE)
|
||||
return EMPH_TOGGLE;
|
||||
|
||||
if (fi.underbar() == FONT_TOGGLE)
|
||||
return UNDERBAR_TOGGLE;
|
||||
|
||||
if (fi.strikeout() == FONT_TOGGLE)
|
||||
return STRIKEOUT_TOGGLE;
|
||||
|
||||
if (fi.xout() == FONT_TOGGLE)
|
||||
return XOUT_TOGGLE;
|
||||
|
||||
if (fi.uuline() == FONT_TOGGLE)
|
||||
return UULINE_TOGGLE;
|
||||
|
||||
if (fi.uwave() == FONT_TOGGLE)
|
||||
return UWAVE_TOGGLE;
|
||||
|
||||
if (fi.noun() == FONT_TOGGLE)
|
||||
return NOUN_TOGGLE;
|
||||
|
||||
if (fi.emph() == FONT_IGNORE
|
||||
&& fi.underbar() == FONT_IGNORE
|
||||
&& fi.noun() == FONT_IGNORE)
|
||||
return IGNORE;
|
||||
|
||||
return INHERIT;
|
||||
}
|
||||
|
||||
|
||||
static void setBar(FontInfo & fi, FontState val)
|
||||
void GuiCharacter::setBar(FontInfo & fi, FontState val)
|
||||
{
|
||||
switch (val) {
|
||||
case IGNORE:
|
||||
fi.setEmph(FONT_IGNORE);
|
||||
fi.setUnderbar(FONT_IGNORE);
|
||||
fi.setStrikeout(FONT_IGNORE);
|
||||
fi.setXout(FONT_IGNORE);
|
||||
fi.setUuline(FONT_IGNORE);
|
||||
fi.setUwave(FONT_IGNORE);
|
||||
fi.setNoun(FONT_IGNORE);
|
||||
break;
|
||||
|
||||
case EMPH_TOGGLE:
|
||||
setBar(fi, INHERIT);
|
||||
fi.setEmph(FONT_TOGGLE);
|
||||
case UNDERBAR:
|
||||
setBar(fi, NONE);
|
||||
fi.setUnderbar(FONT_ON);
|
||||
break;
|
||||
|
||||
case UNDERBAR_TOGGLE:
|
||||
setBar(fi, INHERIT);
|
||||
fi.setUnderbar(FONT_TOGGLE);
|
||||
case UULINE:
|
||||
setBar(fi, NONE);
|
||||
fi.setUuline(FONT_ON);
|
||||
break;
|
||||
|
||||
case STRIKEOUT_TOGGLE:
|
||||
setBar(fi, INHERIT);
|
||||
fi.setStrikeout(FONT_TOGGLE);
|
||||
case UWAVE:
|
||||
setBar(fi, NONE);
|
||||
fi.setUwave(FONT_ON);
|
||||
break;
|
||||
|
||||
case XOUT_TOGGLE:
|
||||
setBar(fi, INHERIT);
|
||||
fi.setXout(FONT_TOGGLE);
|
||||
break;
|
||||
|
||||
case UULINE_TOGGLE:
|
||||
setBar(fi, INHERIT);
|
||||
fi.setUuline(FONT_TOGGLE);
|
||||
break;
|
||||
|
||||
case UWAVE_TOGGLE:
|
||||
setBar(fi, INHERIT);
|
||||
fi.setUwave(FONT_TOGGLE);
|
||||
break;
|
||||
|
||||
case NOUN_TOGGLE:
|
||||
setBar(fi, INHERIT);
|
||||
fi.setNoun(FONT_TOGGLE);
|
||||
break;
|
||||
|
||||
case INHERIT:
|
||||
fi.setEmph(FONT_INHERIT);
|
||||
fi.setUnderbar(FONT_INHERIT);
|
||||
fi.setStrikeout(FONT_INHERIT);
|
||||
fi.setXout(FONT_INHERIT);
|
||||
fi.setUuline(FONT_INHERIT);
|
||||
fi.setUwave(FONT_INHERIT);
|
||||
fi.setNoun(FONT_INHERIT);
|
||||
break;
|
||||
case NONE:
|
||||
fi.setUnderbar(FONT_OFF);
|
||||
fi.setUuline(FONT_OFF);
|
||||
fi.setUwave(FONT_OFF);
|
||||
break;
|
||||
case XOUT:
|
||||
case STRIKEOUT:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void GuiCharacter::setStrike(FontInfo & fi, FontState val)
|
||||
{
|
||||
switch (val) {
|
||||
case IGNORE:
|
||||
fi.setStrikeout(FONT_IGNORE);
|
||||
fi.setXout(FONT_IGNORE);
|
||||
break;
|
||||
case STRIKEOUT:
|
||||
setStrike(fi, NONE);
|
||||
fi.setStrikeout(FONT_ON);
|
||||
break;
|
||||
case XOUT:
|
||||
setStrike(fi, NONE);
|
||||
fi.setXout(FONT_ON);
|
||||
break;
|
||||
case INHERIT:
|
||||
fi.setStrikeout(FONT_INHERIT);
|
||||
fi.setXout(FONT_INHERIT);
|
||||
break;
|
||||
case NONE:
|
||||
fi.setStrikeout(FONT_OFF);
|
||||
fi.setXout(FONT_OFF);
|
||||
break;
|
||||
case UNDERBAR:
|
||||
case UWAVE:
|
||||
case UULINE:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -409,15 +513,18 @@ void GuiCharacter::paramsToDialog(Font const & font)
|
||||
seriesCO->setCurrentIndex(findPos2nd(series, fi.series()));
|
||||
shapeCO->setCurrentIndex(findPos2nd(shape, fi.shape()));
|
||||
sizeCO->setCurrentIndex(findPos2nd(size, fi.size()));
|
||||
miscCO->setCurrentIndex(findPos2nd(bar, getBar(fi)));
|
||||
ulineCO->setCurrentIndex(findPos2nd(bar, getBar(fi)));
|
||||
strikeCO->setCurrentIndex(findPos2nd(strike, getStrike(fi)));
|
||||
colorCO->setCurrentIndex(colorCO->findData(toqstr(lcolor.getLyXName(fi.color()))));
|
||||
emphCB->setCheckState(getMarkupState(fi.emph()));
|
||||
nounCB->setCheckState(getMarkupState(fi.noun()));
|
||||
emph_ = emphCB->checkState() == Qt::Checked;
|
||||
noun_ = nounCB->checkState() == Qt::Checked;
|
||||
|
||||
// reset_language is a null pointer.
|
||||
QString const lang = (font.language() == reset_language)
|
||||
? "reset" : toqstr(font.language()->lang());
|
||||
langCO->setCurrentIndex(findPos2nd(language, lang));
|
||||
|
||||
toggleallCB->setChecked(toggleall_);
|
||||
}
|
||||
|
||||
|
||||
@ -428,13 +535,14 @@ void GuiCharacter::applyView()
|
||||
fi.setSeries(series[seriesCO->currentIndex()].second);
|
||||
fi.setShape(shape[shapeCO->currentIndex()].second);
|
||||
fi.setSize(size[sizeCO->currentIndex()].second);
|
||||
setBar(fi, bar[miscCO->currentIndex()].second);
|
||||
fi.setEmph(setMarkupState(emphCB->checkState()));
|
||||
fi.setNoun(setMarkupState(nounCB->checkState()));
|
||||
setBar(fi, bar[ulineCO->currentIndex()].second);
|
||||
setStrike(fi, strike[strikeCO->currentIndex()].second);
|
||||
fi.setColor(lcolor.getFromLyXName(fromqstr(colorCO->itemData(colorCO->currentIndex()).toString())));
|
||||
|
||||
font_.setLanguage(languages.getLanguage(
|
||||
fromqstr(language[langCO->currentIndex()].second)));
|
||||
|
||||
toggleall_ = toggleallCB->isChecked();
|
||||
}
|
||||
|
||||
|
||||
@ -456,20 +564,22 @@ bool GuiCharacter::initialiseParams(string const &)
|
||||
setButtonsValid(true);
|
||||
|
||||
paramsToDialog(font_);
|
||||
// Make sure that the bc is in the INITIAL state
|
||||
if (bc().policy().buttonStatus(ButtonPolicy::OKAY))
|
||||
bc().restore();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void GuiCharacter::dispatchParams()
|
||||
{
|
||||
dispatch(FuncRequest(getLfun(), font_.toString(toggleall_)));
|
||||
dispatch(FuncRequest(getLfun(), font_.toString(false)));
|
||||
}
|
||||
|
||||
|
||||
void GuiCharacter::saveSession(QSettings & settings) const
|
||||
{
|
||||
Dialog::saveSession(settings);
|
||||
settings.setValue(sessionKey() + "/toggleall", toggleallCB->isChecked());
|
||||
settings.setValue(sessionKey() + "/autoapply", autoapplyCB->isChecked());
|
||||
}
|
||||
|
||||
@ -478,8 +588,6 @@ void GuiCharacter::restoreSession()
|
||||
{
|
||||
Dialog::restoreSession();
|
||||
QSettings settings;
|
||||
toggleallCB->setChecked(
|
||||
settings.value(sessionKey() + "/toggleall").toBool());
|
||||
autoapplyCB->setChecked(
|
||||
settings.value(sessionKey() + "/autoapply").toBool());
|
||||
}
|
||||
|
@ -31,21 +31,19 @@ enum FontState {
|
||||
///
|
||||
IGNORE,
|
||||
///
|
||||
EMPH_TOGGLE,
|
||||
UNDERBAR,
|
||||
///
|
||||
UNDERBAR_TOGGLE,
|
||||
STRIKEOUT,
|
||||
///
|
||||
NOUN_TOGGLE,
|
||||
XOUT,
|
||||
///
|
||||
STRIKEOUT_TOGGLE,
|
||||
UULINE,
|
||||
///
|
||||
XOUT_TOGGLE,
|
||||
UWAVE,
|
||||
///
|
||||
UULINE_TOGGLE,
|
||||
INHERIT,
|
||||
///
|
||||
UWAVE_TOGGLE,
|
||||
///
|
||||
INHERIT
|
||||
NONE
|
||||
};
|
||||
|
||||
typedef std::pair<QString, FontFamily> FamilyPair;
|
||||
@ -65,6 +63,8 @@ public:
|
||||
|
||||
protected Q_SLOTS:
|
||||
void change_adaptor();
|
||||
void on_emphCB_clicked();
|
||||
void on_nounCB_clicked();
|
||||
|
||||
private:
|
||||
/// \name Dialog inherited methods
|
||||
@ -82,20 +82,26 @@ private:
|
||||
|
||||
///
|
||||
void paramsToDialog(Font const & font);
|
||||
///
|
||||
void setBar(FontInfo & fi, FontState val);
|
||||
///
|
||||
void setStrike(FontInfo & fi, FontState val);
|
||||
|
||||
QList<FamilyPair> family;
|
||||
QList<SeriesPair> series;
|
||||
QList<ShapePair> shape;
|
||||
QList<SizePair> size;
|
||||
QList<BarPair> bar;
|
||||
QList<BarPair> strike;
|
||||
QList<ColorCode> color;
|
||||
QList<LanguagePair> language;
|
||||
|
||||
///
|
||||
///
|
||||
Font font_;
|
||||
///
|
||||
bool toggleall_;
|
||||
bool emph_;
|
||||
///
|
||||
bool noun_;
|
||||
};
|
||||
|
||||
} // namespace frontend
|
||||
|
@ -1,325 +1,311 @@
|
||||
<ui version="4.0" >
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>CharacterUi</class>
|
||||
<widget class="QDialog" name="CharacterUi" >
|
||||
<property name="geometry" >
|
||||
<widget class="QDialog" name="CharacterUi">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>325</width>
|
||||
<height>231</height>
|
||||
<width>523</width>
|
||||
<height>365</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<property name="windowTitle">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="sizeGripEnabled" >
|
||||
<property name="sizeGripEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" >
|
||||
<property name="margin" >
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_6">
|
||||
<item row="0" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Font Properties</string>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="familyLA" >
|
||||
<property name="toolTip" >
|
||||
<string>Font family</string>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>&Family:</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>familyCO</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" >
|
||||
<widget class="QComboBox" name="shapeCO" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>3</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip" >
|
||||
<string>Font shape</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" >
|
||||
<widget class="QLabel" name="shapeLA" >
|
||||
<property name="toolTip" >
|
||||
<string>Font shape</string>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>S&hape:</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>shapeCO</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<widget class="QComboBox" name="seriesCO" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>3</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip" >
|
||||
<string>Font series</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1" >
|
||||
<widget class="QComboBox" name="langCO" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>3</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip" >
|
||||
<string>Language</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" >
|
||||
<widget class="QComboBox" name="familyCO" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>3</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip" >
|
||||
<string>Font family</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1" >
|
||||
<widget class="QComboBox" name="colorCO" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>3</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip" >
|
||||
<string>Font color</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" >
|
||||
<widget class="QLabel" name="langLA" >
|
||||
<property name="toolTip" >
|
||||
<string>Language</string>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>&Language:</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>langCO</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="seriesLA" >
|
||||
<property name="toolTip" >
|
||||
<string>Font series</string>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>&Series:</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>seriesCO</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" >
|
||||
<widget class="QLabel" name="colorLA" >
|
||||
<property name="enabled" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="toolTip" >
|
||||
<string>Font color</string>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>&Color:</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>colorCO</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" >
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="sizeGB" >
|
||||
<property name="title" >
|
||||
<string>Never Toggled</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="margin" >
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="sizeLA" >
|
||||
<property name="toolTip" >
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="familyLA">
|
||||
<property name="toolTip">
|
||||
<string>Font family</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Fa&mily:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>familyCO</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="familyCO">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Font family</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="seriesLA">
|
||||
<property name="toolTip">
|
||||
<string>Font series</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Series:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>seriesCO</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="seriesCO">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Font series</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="shapeLA">
|
||||
<property name="toolTip">
|
||||
<string>Font shape</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>S&hape:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>shapeCO</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="shapeCO">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Font shape</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="sizeLA">
|
||||
<property name="toolTip">
|
||||
<string>Font size</string>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<property name="text">
|
||||
<string>Si&ze:</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<property name="buddy">
|
||||
<cstring>sizeCO</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="sizeCO" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>3</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<item row="3" column="1">
|
||||
<widget class="QComboBox" name="sizeCO">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip" >
|
||||
<property name="toolTip">
|
||||
<string>Font size</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="miscGB" >
|
||||
<property name="toolTip" >
|
||||
<string>Other font settings</string>
|
||||
</property>
|
||||
<property name="title" >
|
||||
<string>Always Toggled</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="margin" >
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="miscLA" >
|
||||
<property name="text" >
|
||||
<string>&Misc:</string>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="title">
|
||||
<string>Decoration</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="colorLA">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>miscCO</cstring>
|
||||
<property name="toolTip">
|
||||
<string>Font color</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Color:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>colorCO</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="miscCO" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy>
|
||||
<hsizetype>3</hsizetype>
|
||||
<vsizetype>0</vsizetype>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="colorCO">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip" >
|
||||
<string>Other font settings</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Font color</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="ulineLA">
|
||||
<property name="text">
|
||||
<string>U&nderlining:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>ulineCO</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="ulineCO">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Underlining of text</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="strikeLA">
|
||||
<property name="text">
|
||||
<string>S&trikethrough:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>strikeCO</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="strikeCO">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Strike-through text</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="toggleallCB" >
|
||||
<property name="toolTip" >
|
||||
<string>toggle font on all of the above</string>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>&Toggle all</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="autoapplyCB" >
|
||||
<property name="toolTip" >
|
||||
<string>Apply each change automatically</string>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Apply changes &immediately</string>
|
||||
</property>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>36</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<item row="1" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_4">
|
||||
<property name="title">
|
||||
<string>&Language</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_7">
|
||||
<item row="0" column="0">
|
||||
<widget class="QComboBox" name="langCO">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Language</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_3">
|
||||
<property name="title">
|
||||
<string>Semantic Markup</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_5">
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="emphCB">
|
||||
<property name="toolTip">
|
||||
<string>Semantic emphasizing (italic by default, but can be adapted)</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Emphasized</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QCheckBox" name="nounCB">
|
||||
<property name="toolTip">
|
||||
<string>Semantic markup of nouns (small caps by default, but can be adapted)</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Noun</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
@ -327,23 +313,42 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<item row="3" column="0">
|
||||
<layout class="QHBoxLayout">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="autoapplyCB">
|
||||
<property name="toolTip">
|
||||
<string>Apply each change automatically</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Apply changes &immediately</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
@ -352,34 +357,34 @@
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="okPB" >
|
||||
<property name="text" >
|
||||
<widget class="QPushButton" name="okPB">
|
||||
<property name="text">
|
||||
<string>&OK</string>
|
||||
</property>
|
||||
<property name="default" >
|
||||
<property name="default">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="applyPB" >
|
||||
<property name="text" >
|
||||
<widget class="QPushButton" name="applyPB">
|
||||
<property name="text">
|
||||
<string>&Apply</string>
|
||||
</property>
|
||||
<property name="autoDefault" >
|
||||
<property name="autoDefault">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="closePB" >
|
||||
<property name="text" >
|
||||
<widget class="QPushButton" name="closePB">
|
||||
<property name="text">
|
||||
<string>Close</string>
|
||||
</property>
|
||||
<property name="autoDefault" >
|
||||
<property name="autoDefault">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="default" >
|
||||
<property name="default">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
@ -394,16 +399,12 @@
|
||||
<tabstop>shapeCO</tabstop>
|
||||
<tabstop>colorCO</tabstop>
|
||||
<tabstop>langCO</tabstop>
|
||||
<tabstop>toggleallCB</tabstop>
|
||||
<tabstop>sizeCO</tabstop>
|
||||
<tabstop>miscCO</tabstop>
|
||||
<tabstop>autoapplyCB</tabstop>
|
||||
<tabstop>okPB</tabstop>
|
||||
<tabstop>applyPB</tabstop>
|
||||
<tabstop>closePB</tabstop>
|
||||
</tabstops>
|
||||
<includes>
|
||||
<include location="local" >qt_i18n.h</include>
|
||||
<include location="local">qt_i18n.h</include>
|
||||
</includes>
|
||||
<resources/>
|
||||
<connections/>
|
||||
|
282
status.23x
282
status.23x
@ -1,6 +1,6 @@
|
||||
-*- text -*-
|
||||
|
||||
This file describes what has been done in the preparation of LyX 2.3.1.
|
||||
This file describes what has been done in the preparation of LyX 2.3.2.
|
||||
All comments are welcome.
|
||||
|
||||
We try to group things by topic and in decreasing order of importance.
|
||||
@ -15,110 +15,31 @@ What's new
|
||||
|
||||
* DOCUMENT INPUT/OUTPUT
|
||||
|
||||
- It possible to anonymize document's content for bug submissions
|
||||
via buffer-anonymize lfun (bug 7259).
|
||||
|
||||
- Support rotation of multi-page tables via (pdf)lscape (bug 9194).
|
||||
|
||||
- Added LFUN_MASTER_BUFFER_EXPORT, which exports the master buffer, along
|
||||
the lines of LFUN_MASTER_BUFFER_VIEW (bug 11118).
|
||||
|
||||
- Needauth is not needed for exporting R code (only when executing the code).
|
||||
|
||||
- Center longtable explicitly for compatibility with some packages (bug 10690).
|
||||
|
||||
- Fix problems with default conversion script for graphics (part of bug 11186).
|
||||
|
||||
|
||||
* MISCELLANEOUS
|
||||
|
||||
- Updated to Qt5 the LyX server example client in development/lyxserver/
|
||||
|
||||
|
||||
|
||||
* TEX2LYX IMPROVEMENTS
|
||||
|
||||
- Add support for biblatex.
|
||||
|
||||
- Add support for chapterbib.
|
||||
|
||||
- Add support for \includeonly.
|
||||
|
||||
- Add support for beamer overlay arguments (bug 11068).
|
||||
|
||||
- Update tex2lyx quotation marks detection:
|
||||
* Consider new quote styles of LyX 2.3.
|
||||
* Consider changed quote styles in LYX 2.3.
|
||||
* Try to be a bit smarter with ambiguous quotation marks,
|
||||
depending on the main quote style and the local context.
|
||||
|
||||
- Consider options passed via \PassOptionsToPackage.
|
||||
|
||||
- Add support for URW Classico, MinionPro and the new Libertine fonts.
|
||||
|
||||
- Add support for \lstinputlisting and \inputminted.
|
||||
|
||||
- Add support for the \t*{} (bottomtiebar) macro of TIPA.
|
||||
|
||||
- Implement better parsing of some command options (via "literate"
|
||||
function of some insets) (bug 9563).
|
||||
|
||||
- Add support for alignment pseudo-environments as used inside floats
|
||||
(bug 7857).
|
||||
|
||||
|
||||
* USER INTERFACE
|
||||
|
||||
- Overhaul the document painting mechanism. Now the screen is updated
|
||||
asyncronously (as all normal applications do), which makes LyX
|
||||
snappier, especially on repeated events. As an added bonus, subpixel
|
||||
aliasing is honored in the work area.
|
||||
|
||||
- Use native file dialogs on all platforms by default. It is now
|
||||
possible to switch to LyX custom dialogs (which have extra shortcuts
|
||||
to relevant directories) by setting the preference
|
||||
\use_native_filedialog true
|
||||
|
||||
- Let caret height depend on character size in math editor.
|
||||
|
||||
- Handle properly top/bottom of inset with mac-like cursor movement
|
||||
(bug 10701).
|
||||
|
||||
- Respect the last setting of the 'literal' checkbox when adding citations
|
||||
via the LyX server (e.g., from JabRef).
|
||||
|
||||
- Allow unification of graphic groups inside marked block via context
|
||||
menu.
|
||||
|
||||
- Cosmetic polishment of the "Math Options" pane of Document Settings
|
||||
(bug 10777).
|
||||
|
||||
- UI improvements in the graphics dialog (bug 10771).
|
||||
|
||||
- Set tab stop in preamble editor to four characters.
|
||||
|
||||
- Provide simple search functionality in preamble (bug 11099).
|
||||
|
||||
- Change Settings -> Local Layout to Fixed-width Font and Nowrap (bug 10992).
|
||||
|
||||
- Allow LFUN_UNICODE_INSERT to take multiple arguments (bug 11084).
|
||||
|
||||
- Added C-M-i as a shortcut for LFUN_INSET_SETTINGS (bug 7662).
|
||||
- Improve layout of the character dialog (bugs 2752, 3804, 3884, and 4836).
|
||||
|
||||
|
||||
* DOCUMENTATION AND LOCALIZATION
|
||||
|
||||
- Updated Arabic, Chinese (Simplified), German, Hungarian, Italian, Russian,
|
||||
Slovakian and Ukrainian user interface localization.
|
||||
- Update German user interface localization.
|
||||
|
||||
|
||||
* BUILD/INSTALLATION
|
||||
|
||||
- Add support for v.2 of the enchant spell checker (bug 10986).
|
||||
|
||||
- Support new hunspell C++ ABI if LyX is built against hunspell >= 1.5
|
||||
(bug 10547).
|
||||
|
||||
- Fix spurious warning when compiling with Qt 5.10.
|
||||
|
||||
|
||||
|
||||
@ -127,222 +48,33 @@ What's new
|
||||
|
||||
* DOCUMENT INPUT/OUTPUT
|
||||
|
||||
- Properly escape labels entered for included program listings in Insert > File
|
||||
> Child Document (part of bug 10544).
|
||||
|
||||
- Fix the implementation of new libertine font package.
|
||||
|
||||
- Properly escape braces in non-literate context in insets.
|
||||
|
||||
- Fix output of citation commands in child documents (bug 11083).
|
||||
|
||||
- Use normal footnote (rather than \tablefootnote) for tables in minipages.
|
||||
|
||||
- Fix detection of Open Document files.
|
||||
|
||||
- Fix language settings and line spacing in InPreamble-titles
|
||||
(bug 9332, 1049).
|
||||
|
||||
- Respect 'literal' setting when calculating longest bibitem (bug 10817).
|
||||
|
||||
- Do not embrace numbers in \beginL ... \endL with polyglossia in Right-
|
||||
to-Left languages, since bidi handles the numbers automatically.
|
||||
|
||||
- Fix polyglossia language switches for Arabic (bug 11057).
|
||||
|
||||
- Fix language allocation after PassThru paragraphs (bug 10793).
|
||||
|
||||
- Set correct path to (biblatex) bibliography databases that are entered
|
||||
relative to child documents (bug 11105).
|
||||
|
||||
- Load hyperref with a suitable driver (bug 6418).
|
||||
|
||||
- Fix LaTeX errors with nested ulem commands.
|
||||
|
||||
- Recompile grandchildren when they have updated (bug 11112).
|
||||
|
||||
- Output list of bibliography files in the order given in the dialog, rather
|
||||
than sorted.
|
||||
|
||||
- Fixed the last python scripts to support both python 2 and 3 (bug 11101). All
|
||||
scripts should now be able to run in a python 3 only environment.
|
||||
|
||||
- Correctly strike-out deleted math immediately following a float (bug 11174).
|
||||
|
||||
- Fix problem with unwanted spaces caused by math macro definitions (bug 11216).
|
||||
|
||||
|
||||
* USER INTERFACE
|
||||
|
||||
- Fix "Paste from LaTeX" on Windows (bug 9139).
|
||||
|
||||
- Disable BUFFER_EXPORT and BUFFER_EXPORT_AS while buffer is processed
|
||||
(bug 8338).
|
||||
|
||||
- Disable CheckTeX while buffer is processed (bug 7434).
|
||||
|
||||
- Disable completion in text when there is a selection.
|
||||
|
||||
- Do not use English, but the context language, when pasting from LaTeX
|
||||
(bug 9199).
|
||||
|
||||
- Do not use English, but the context language, when pasting from math
|
||||
(bug 2596).
|
||||
|
||||
- Fix ChkTeX on Windows (requires ChkTeX 1.7.7 at least) (bug 9989).
|
||||
|
||||
- When entering a math macro name, Escape properly cancels the
|
||||
operation (bug 9251).
|
||||
|
||||
- Fix list of viewable formats in view/update menu (bug 11044).
|
||||
|
||||
- Fix encoding problems with listings insets and non-TeX fonts (bug
|
||||
11056).
|
||||
|
||||
- When only Enchant is configured as a spell checker, configure it
|
||||
properly as default.
|
||||
|
||||
- Do not show errors from master when compiling child (bug 11106).
|
||||
|
||||
- Fix crash with server-get-xy and tall inset (bug 8120).
|
||||
|
||||
- Fix crash when opening file with non-acii file name in single
|
||||
instance mode (bug 11167).
|
||||
|
||||
- Improve Undo for operations that act on several buffers (bug 10823).
|
||||
|
||||
- Improve rendering of square roots in math editor (bug 10814).
|
||||
|
||||
- Set minimum height for math cells (bug 11050).
|
||||
|
||||
- Fix display of citation labels when pasting from a document
|
||||
with other citation type (bug 10829).
|
||||
|
||||
- Save the list of recent files when a file is open/saved so that it
|
||||
is up to date after a crash (bug 10712).
|
||||
|
||||
- Only show header for bibliography in outliner (bug 11045).
|
||||
|
||||
- Take actual font height into account when drawing placeholder box
|
||||
for graphics (bug 11048).
|
||||
|
||||
- Correctly set default bibliography style in the Document Settings
|
||||
dialog (bug 11088).
|
||||
|
||||
- Assure that the External Inset dialog is opened at first tab for
|
||||
new insets (bug 11081).
|
||||
|
||||
- Ignore deleted material when generating a proposed label (bug 11102).
|
||||
|
||||
- Reload citation list when undoing or redoing removal of bibliography
|
||||
inset (bug 9158).
|
||||
|
||||
- Fix some master/child issues with biblatex (bug 11083).
|
||||
|
||||
- Recalculate citation insets when bibliography info changes as a result
|
||||
of undo or redo (bug 11005).
|
||||
|
||||
- Allow for spaces in bibliography keys (bug 9847).
|
||||
|
||||
- Fix weird bug with counters when reloading with emergency file.
|
||||
|
||||
- Handle math insets properly when inserting index entries (bug 6344).
|
||||
|
||||
- When adding a label in the first paragraph after a division (section,
|
||||
etc), use the label prefix for it (bug 10624).
|
||||
|
||||
- Fix crash when canceling entry of macro name in a mathed subscript
|
||||
(bug 11125).
|
||||
|
||||
- Improve error message when document path contains spaces.
|
||||
|
||||
- Fix blinking caret position while entering text with input method.
|
||||
|
||||
- Do not allow paragraph styles in listings (bug 11127).
|
||||
|
||||
- Fix duplicate, disabled "Separated <Environment> Below" menu item.
|
||||
|
||||
- Fix horizontal alignment of some Box types on screen.
|
||||
|
||||
- Correct list of previous versions to check for user directory contents
|
||||
(bug 11142 on Mac).
|
||||
|
||||
- Honor the syntax highlighting package choice when adding listing params
|
||||
without actually inserting a listing (bug 11151).
|
||||
|
||||
- Handle correctly zero table special arguments (bug 10247).
|
||||
|
||||
- Fix "New Inset" function in the Nomenclature list dialog.
|
||||
|
||||
- Improve warning message dialogs.
|
||||
|
||||
- Fix insertion of quotation marks and brackets in RTL languages
|
||||
(bugs 11188 and 11187).
|
||||
|
||||
- Fix nesting problem with numbers in RTL text (bug 6283).
|
||||
|
||||
- Fix display of RTL text in tooltips (bug 10672).
|
||||
|
||||
- Fix size policy of buffer combo in refs dialog (bug 9316).
|
||||
|
||||
- Fix line break in Bib(La)TeX tooltip (bug 11252).
|
||||
- Fix loss of citation list after Undo (bug 9158).
|
||||
|
||||
|
||||
* INTERNALS
|
||||
|
||||
- Fix bug that TeX files were not detected when reconfiguring LyX
|
||||
(bug 11053).
|
||||
|
||||
- Fix language code of Austrian (old spelling).
|
||||
|
||||
- When reconfiguring LyX, correctly detect commands specified with a
|
||||
full path with spaces (bug 11214).
|
||||
|
||||
- Fix the LyX server on Windows so that replies are actually output.
|
||||
|
||||
- Fix the configure.py script for python 3.7.
|
||||
|
||||
|
||||
* DOCUMENTATION AND LOCALIZATION
|
||||
|
||||
- Fix old problem with lib/fonts/test/stmary10.lyx, and update that file
|
||||
to current format.
|
||||
|
||||
|
||||
|
||||
* TEX2LYX
|
||||
|
||||
- Do not force default bibliography style if none is set (bug 10673).
|
||||
|
||||
- Handle whitespace in table column declaration (bug 10804).
|
||||
|
||||
- Fix import of flalign* environment (bug 10501).
|
||||
|
||||
- Fix import of subfloats without caption (bug 10385).
|
||||
|
||||
- Import straight quotations marks (e.g. babel shorthands) as ERT (bug 75).
|
||||
|
||||
- Do not add duplicate \makebeamertitle.
|
||||
|
||||
- Keep empty paragraph it keepempty is true (bug 11078).
|
||||
|
||||
- Fix parsing issue in nested CJK (bug 9562).
|
||||
|
||||
- Fix import of package options with comments (bug 5737).
|
||||
|
||||
- Fix import of xymatrix (bug 10638).
|
||||
|
||||
|
||||
* ADVANCED FIND AND REPLACE
|
||||
|
||||
|
||||
|
||||
* BUILD/INSTALLATION
|
||||
|
||||
- Add support for automake 1.16.
|
||||
|
||||
- Fix build of lyxconvert (used on Mac) with Qt4 (bug 11094).
|
||||
|
||||
- Fix some compiler warnings.
|
||||
|
||||
- Support building with Qt 5.11 with CMake.
|
||||
|
||||
- When building with CMake, require at least CMake version 3.1.0.
|
||||
|
Loading…
Reference in New Issue
Block a user