mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +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
|
||||
|
||||
InsetLayout Box
|
||||
LabelFont
|
||||
Color foreground
|
||||
Size Small
|
||||
EndFont
|
||||
MultiPar true
|
||||
End
|
||||
|
||||
|
@ -155,8 +155,6 @@ void InsetBox::setButtonLabel()
|
||||
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);
|
||||
|
||||
FontInfo tmpfont = mi.base.font;
|
||||
getDrawFont(mi.base.font);
|
||||
mi.base.font = layout_.font;
|
||||
mi.base.font.realize(tmpfont);
|
||||
|
||||
switch (geometry()) {
|
||||
@ -258,7 +258,7 @@ void InsetCollapsable::draw(PainterInfo & pi, int x, int y) const
|
||||
pi.background_color = backgroundColor();
|
||||
|
||||
FontInfo tmpfont = pi.base.font;
|
||||
getDrawFont(pi.base.font);
|
||||
pi.base.font = layout_.font;
|
||||
pi.base.font.realize(tmpfont);
|
||||
|
||||
// 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,
|
||||
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
|
||||
{
|
||||
FloatList const & floats = bp.getTextClass().floats();
|
||||
|
@ -72,10 +72,6 @@ public:
|
||||
///
|
||||
virtual void setButtonLabel() {}
|
||||
///
|
||||
void setLabelFont(FontInfo const & f);
|
||||
///
|
||||
void setLabelColor(ColorCode code);
|
||||
///
|
||||
bool isOpen() const { return geometry() != ButtonOnly; }
|
||||
///
|
||||
CollapseStatus status() const;
|
||||
@ -159,8 +155,6 @@ protected:
|
||||
docstring floatName(std::string const & type, BufferParams const &) const;
|
||||
///
|
||||
virtual void resetParagraphsFont();
|
||||
///
|
||||
virtual void getDrawFont(FontInfo &) const;
|
||||
|
||||
protected:
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user