mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-25 05:55:34 +00:00
Show custom text styles in status bar
Fixes bug #11951.
(cherry picked from commit b0db575dc1
)
This commit is contained in:
parent
ad23db57fc
commit
195f307a39
@ -1898,7 +1898,7 @@ bool Text::read(Lexer & lex,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Returns the current font and depth as a message.
|
// Returns the current state (font, depth etc.) as a message for status bar.
|
||||||
docstring Text::currentState(Cursor const & cur, bool devel_mode) const
|
docstring Text::currentState(Cursor const & cur, bool devel_mode) const
|
||||||
{
|
{
|
||||||
LBUFERR(this == cur.text());
|
LBUFERR(this == cur.text());
|
||||||
@ -1928,7 +1928,7 @@ docstring Text::currentState(Cursor const & cur, bool devel_mode) const
|
|||||||
os << bformat(_("Font: %1$s"), font.stateText(&buf.params()));
|
os << bformat(_("Font: %1$s"), font.stateText(&buf.params()));
|
||||||
|
|
||||||
// The paragraph depth
|
// The paragraph depth
|
||||||
int depth = cur.paragraph().getDepth();
|
int depth = par.getDepth();
|
||||||
if (depth > 0)
|
if (depth > 0)
|
||||||
os << bformat(_(", Depth: %1$d"), depth);
|
os << bformat(_(", Depth: %1$d"), depth);
|
||||||
|
|
||||||
@ -1956,6 +1956,11 @@ docstring Text::currentState(Cursor const & cur, bool devel_mode) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Custom text style
|
||||||
|
InsetLayout const & layout = cur.inset().getLayout();
|
||||||
|
if (layout.lyxtype() == InsetLayout::CHARSTYLE)
|
||||||
|
os << _(", Style: ") << translateIfPossible(layout.labelstring());
|
||||||
|
|
||||||
if (devel_mode) {
|
if (devel_mode) {
|
||||||
os << _(", Inset: ") << &cur.inset();
|
os << _(", Inset: ") << &cur.inset();
|
||||||
os << _(", Paragraph: ") << cur.pit();
|
os << _(", Paragraph: ") << cur.pit();
|
||||||
|
@ -37,6 +37,8 @@ What's new
|
|||||||
- Update autocorrect in mathed so that pressing '*' after a delimiter will
|
- Update autocorrect in mathed so that pressing '*' after a delimiter will
|
||||||
cycle through all sizes.
|
cycle through all sizes.
|
||||||
|
|
||||||
|
- Display character styles along with fonts in status bar (bug 11951).
|
||||||
|
|
||||||
|
|
||||||
* MISCELLANEOUS
|
* MISCELLANEOUS
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user