mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Use LOCK symbol with Minimalistic decoration, too.
In that case, we force a button with just the lock.
This commit is contained in:
parent
aa39a2aaf7
commit
16834a32ad
@ -100,8 +100,11 @@ InsetCollapsible::Geometry InsetCollapsible::geometry(BufferView const & bv) con
|
||||
return view_[&bv].openinlined_ ? LeftButton : TopButton;
|
||||
return ButtonOnly;
|
||||
|
||||
case InsetLayout::MINIMALISTIC:
|
||||
return status(bv) == Open ? NoButton : ButtonOnly ;
|
||||
case InsetLayout::MINIMALISTIC: {
|
||||
return status(bv) == Open ?
|
||||
(tempfile_ ? LeftButton : NoButton)
|
||||
: ButtonOnly;
|
||||
}
|
||||
|
||||
case InsetLayout::CONGLOMERATE:
|
||||
return status(bv) == Open ? SubLabel : Corners ;
|
||||
@ -677,12 +680,14 @@ docstring InsetCollapsible::getLabel() const
|
||||
|
||||
docstring const InsetCollapsible::buttonLabel(BufferView const & bv) const
|
||||
{
|
||||
// U+1F512 LOCK
|
||||
docstring const locked = tempfile_ ? docstring(1, 0x1F512) : docstring();
|
||||
if (decoration() == InsetLayout::MINIMALISTIC)
|
||||
return locked;
|
||||
// indicate changed content in label (#8645)
|
||||
// ✎ U+270E LOWER RIGHT PENCIL
|
||||
docstring const indicator = (isChanged() && geometry(bv) == ButtonOnly)
|
||||
? docstring(1, 0x270E) : docstring();
|
||||
// U+1F512 LOCK
|
||||
docstring const locked = tempfile_ ? docstring(1, 0x1F512) : docstring();
|
||||
InsetLayout const & il = getLayout();
|
||||
docstring const label = getLabel();
|
||||
if (!il.contentaslabel() || geometry(bv) != ButtonOnly)
|
||||
|
@ -168,7 +168,10 @@ bool InsetERT::getStatus(Cursor & cur, FuncRequest const & cmd,
|
||||
|
||||
docstring const InsetERT::buttonLabel(BufferView const & bv) const
|
||||
{
|
||||
// U+1F512 LOCK
|
||||
docstring const locked = tempfile_ ? docstring(1, 0x1F512) : docstring();
|
||||
if (decoration() == InsetLayout::MINIMALISTIC)
|
||||
return locked;
|
||||
if (decoration() == InsetLayout::CLASSIC)
|
||||
return locked + (isOpen(bv) ? _("ERT") : getNewLabel(_("ERT")));
|
||||
return locked + getNewLabel(_("ERT"));
|
||||
|
@ -607,6 +607,8 @@ docstring const InsetListings::buttonLabel(BufferView const & bv) const
|
||||
{
|
||||
// FIXME UNICODE
|
||||
docstring const locked = tempfile_ ? docstring(1, 0x1F512) : docstring();
|
||||
if (decoration() == InsetLayout::MINIMALISTIC)
|
||||
return locked;
|
||||
if (decoration() == InsetLayout::CLASSIC)
|
||||
return locked + (isOpen(bv) ? _("Listing") : getNewLabel(_("Listing")));
|
||||
return locked + getNewLabel(_("Listing"));
|
||||
|
Loading…
Reference in New Issue
Block a user