]> git.lyx.org Git - lyx.git/commitdiff
Use Minimalistic for branches
authorMartin Vermeer <martin.vermeer@hut.fi>
Sat, 1 Sep 2007 11:40:09 +0000 (11:40 +0000)
committerMartin Vermeer <martin.vermeer@hut.fi>
Sat, 1 Sep 2007 11:40:09 +0000 (11:40 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19973 a592a061-630c-0410-9148-cb99ea01b6c8

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

index af2198c854bba0742fbae1115a3bc2f6b7a9f1e0..e8f60bb46ae4d414eb9fdd687ce5d35bb7b6c9d7 100644 (file)
@@ -82,6 +82,7 @@ End
 
 InsetLayout ERT
        LabelString           ERT
+       Decoration            minimalistic
        Font
          Color               latex
          Family              typewriter
@@ -92,3 +93,12 @@ InsetLayout ERT
        EndFont
 End
 
+InsetLayout Branch
+       Decoration            minimalistic
+       LabelFont
+         Color               Red
+         Size                Small
+       EndFont
+End
+
+
index 5174f6c7a0705d641893b24031803efb105853c2..c0a20430034459a410de44e316009734c1ac168e 100644 (file)
@@ -46,6 +46,7 @@ InsetBranch::InsetBranch(BufferParams const & bp,
                         InsetBranchParams const & params)
        : InsetCollapsable(bp), params_(params)
 {
+       setLayout(bp);
        init();
 }
 
index 54a4fc83b3d7e9ee1d24484365be33639df5e01b..9600c0e9d37e5ebade81d2314e21d2f7c842900d 100644 (file)
@@ -59,10 +59,10 @@ InsetCollapsable::Geometry InsetCollapsable::geometry() const
                        return ButtonOnly;
 
        case Minimalistic:
-               return NoButton;
+               return status() == Open ? NoButton : ButtonOnly ;
 
        case Conglomerate:
-               return status() == Open ? SubLabel : Corners;
+               return status() == Open ? SubLabel : Corners ;
        }
 
        // dummy return value to shut down a warning,
@@ -261,6 +261,11 @@ void InsetCollapsable::draw(PainterInfo & pi, int x, int y) const
                button_dim.y2 = top + dimc.height();
 
                pi.pain.buttonText(xx, top + dimc.asc, layout_.labelstring, layout_.labelfont, mouse_hover_);
+       } else {
+               button_dim.x1 = 0;
+               button_dim.y1 = 0;
+               button_dim.x2 = 0;
+               button_dim.y2 = 0;
        }
 
        int textx, texty;
index 0acb0dd8f3f31041165116634cbe0ec8846a10f8..2c95dcda91416db5d94341ae48b731306382859a 100644 (file)
@@ -92,7 +92,7 @@ public:
         *   -------------+-------------------------------
         *   Classic      | *) TopButton, <--x) ButtonOnly
         *                | LeftButton
-        *   Minimalistic | NoButton            NoButton
+        *   Minimalistic | ButtonOnly          NoButton
         *   Conglomerate | SubLabel            Corners
         *   ---------------------------------------------
         *   *) toggled by openinlined_