]> git.lyx.org Git - features.git/commitdiff
* draw full line for empty categories
authorStefan Schimanski <sts@lyx.org>
Mon, 10 Mar 2008 13:10:10 +0000 (13:10 +0000)
committerStefan Schimanski <sts@lyx.org>
Mon, 10 Mar 2008 13:10:10 +0000 (13:10 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23627 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiToolbar.cpp

index 32a71a18580b5b94ba569ac23acac8b3c7432464..9eb127c7d311d33e04b0f177403f64ab31d24794 100644 (file)
@@ -7,6 +7,7 @@
  * \author John Levon
  * \author Jean-Marc Lasgouttes
  * \author Angus Leeming
+ * \author Stefan Schimanski
  * \author Abdelrazak Younes
  *
  * Full author contact details are available in file CREDITS.
@@ -415,9 +416,12 @@ private:
                int ymid = y - 1 - fm.xHeight() / 2; // -1 for the baseline
                
                // draw the horizontal line
-               painter->drawLine(opt.rect.x(), ymid, left - 1, ymid);
-               painter->drawLine(right + 1, ymid, opt.rect.right(), ymid);
-               
+               if (!category.isEmpty()) {
+                       painter->drawLine(opt.rect.x(), ymid, left - 1, ymid);
+                       painter->drawLine(right + 1, ymid, opt.rect.right(), ymid);
+               } else
+                       painter->drawLine(opt.rect.x(), ymid, opt.rect.right(), ymid);
+                       
                painter->restore();
        }