mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
fix layout of InsetBox and remove unused InsetCollapsable methods.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21393 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
d45d7de8c3
commit
fc0f77044d
@ -177,6 +177,10 @@ InsetLayout Index
|
|||||||
End
|
End
|
||||||
|
|
||||||
InsetLayout Box
|
InsetLayout Box
|
||||||
|
LabelFont
|
||||||
|
Color foreground
|
||||||
|
Size Small
|
||||||
|
EndFont
|
||||||
MultiPar true
|
MultiPar true
|
||||||
End
|
End
|
||||||
|
|
||||||
|
@ -155,8 +155,6 @@ void InsetBox::setButtonLabel()
|
|||||||
label += ")";
|
label += ")";
|
||||||
|
|
||||||
setLabel(label);
|
setLabel(label);
|
||||||
|
|
||||||
setLabelColor(Color_foreground);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -191,7 +191,7 @@ void InsetCollapsable::metrics(MetricsInfo & mi, Dimension & dim) const
|
|||||||
autoOpen_ = mi.base.bv->cursor().isInside(this);
|
autoOpen_ = mi.base.bv->cursor().isInside(this);
|
||||||
|
|
||||||
FontInfo tmpfont = mi.base.font;
|
FontInfo tmpfont = mi.base.font;
|
||||||
getDrawFont(mi.base.font);
|
mi.base.font = layout_.font;
|
||||||
mi.base.font.realize(tmpfont);
|
mi.base.font.realize(tmpfont);
|
||||||
|
|
||||||
switch (geometry()) {
|
switch (geometry()) {
|
||||||
@ -258,7 +258,7 @@ void InsetCollapsable::draw(PainterInfo & pi, int x, int y) const
|
|||||||
pi.background_color = backgroundColor();
|
pi.background_color = backgroundColor();
|
||||||
|
|
||||||
FontInfo tmpfont = pi.base.font;
|
FontInfo tmpfont = pi.base.font;
|
||||||
getDrawFont(pi.base.font);
|
pi.base.font = layout_.font;
|
||||||
pi.base.font.realize(tmpfont);
|
pi.base.font.realize(tmpfont);
|
||||||
|
|
||||||
// Draw button first -- top, left or only
|
// Draw button first -- top, left or only
|
||||||
@ -620,12 +620,6 @@ void InsetCollapsable::resetParagraphsFont()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void InsetCollapsable::getDrawFont(FontInfo & font) const
|
|
||||||
{
|
|
||||||
font = layout_.font;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool InsetCollapsable::getStatus(Cursor & cur, FuncRequest const & cmd,
|
bool InsetCollapsable::getStatus(Cursor & cur, FuncRequest const & cmd,
|
||||||
FuncStatus & flag) const
|
FuncStatus & flag) const
|
||||||
{
|
{
|
||||||
@ -765,18 +759,6 @@ void InsetCollapsable::setStatus(Cursor & cur, CollapseStatus status)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void InsetCollapsable::setLabelFont(FontInfo const & font)
|
|
||||||
{
|
|
||||||
layout_.labelfont = font;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void InsetCollapsable::setLabelColor(ColorCode code)
|
|
||||||
{
|
|
||||||
layout_.labelfont.setColor(code);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
docstring InsetCollapsable::floatName(string const & type, BufferParams const & bp) const
|
docstring InsetCollapsable::floatName(string const & type, BufferParams const & bp) const
|
||||||
{
|
{
|
||||||
FloatList const & floats = bp.getTextClass().floats();
|
FloatList const & floats = bp.getTextClass().floats();
|
||||||
|
@ -72,10 +72,6 @@ public:
|
|||||||
///
|
///
|
||||||
virtual void setButtonLabel() {}
|
virtual void setButtonLabel() {}
|
||||||
///
|
///
|
||||||
void setLabelFont(FontInfo const & f);
|
|
||||||
///
|
|
||||||
void setLabelColor(ColorCode code);
|
|
||||||
///
|
|
||||||
bool isOpen() const { return geometry() != ButtonOnly; }
|
bool isOpen() const { return geometry() != ButtonOnly; }
|
||||||
///
|
///
|
||||||
CollapseStatus status() const;
|
CollapseStatus status() const;
|
||||||
@ -159,8 +155,6 @@ protected:
|
|||||||
docstring floatName(std::string const & type, BufferParams const &) const;
|
docstring floatName(std::string const & type, BufferParams const &) const;
|
||||||
///
|
///
|
||||||
virtual void resetParagraphsFont();
|
virtual void resetParagraphsFont();
|
||||||
///
|
|
||||||
virtual void getDrawFont(FontInfo &) const;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
///
|
///
|
||||||
|
Loading…
Reference in New Issue
Block a user