]> git.lyx.org Git - features.git/commitdiff
fix layout of InsetBox and remove unused InsetCollapsable methods.
authorAbdelrazak Younes <younes@lyx.org>
Fri, 2 Nov 2007 22:10:59 +0000 (22:10 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Fri, 2 Nov 2007 22:10:59 +0000 (22:10 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21393 a592a061-630c-0410-9148-cb99ea01b6c8

lib/layouts/stdinsets.inc
src/insets/InsetBox.cpp
src/insets/InsetCollapsable.cpp
src/insets/InsetCollapsable.h

index 2b483cbf8c0c7cb2e0a85e103fc8c7482a795b57..731104e9f2e545a369150a1ea80d14783f0fa910 100644 (file)
@@ -177,6 +177,10 @@ InsetLayout Index
 End
 
 InsetLayout Box
+       LabelFont
+         Color               foreground
+         Size                Small
+       EndFont
        MultiPar              true
 End
 
index b86d6f485288ac43f26c1bea7d2bb612d5e65ce1..c88866d3d3c849a925ee19e7bb9df9ccc6015ac1 100644 (file)
@@ -155,8 +155,6 @@ void InsetBox::setButtonLabel()
        label += ")";
 
        setLabel(label);
-
-       setLabelColor(Color_foreground);
 }
 
 
index 98e4a96ac47856f9422bb87514c02a8dc7c72ca4..c5f14d07739dff3ac30fcbaa4b61c9a544090d0e 100644 (file)
@@ -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();
index 7803e860391757cbfe964ff3bcfcdce26b24c6a3..fb8e175857b3decb140a40baf690801b459ac9cb 100644 (file)
@@ -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:
        ///