aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/MenuSeparator.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk/MenuSeparator.cc')
-rw-r--r--src/FbTk/MenuSeparator.cc17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/FbTk/MenuSeparator.cc b/src/FbTk/MenuSeparator.cc
index a82ccdb..01aa24a 100644
--- a/src/FbTk/MenuSeparator.cc
+++ b/src/FbTk/MenuSeparator.cc
@@ -32,16 +32,19 @@ namespace FbTk {
32 32
33void MenuSeparator::draw(FbDrawable &drawable, 33void MenuSeparator::draw(FbDrawable &drawable,
34 const MenuTheme &theme, 34 const MenuTheme &theme,
35 bool highlight, 35 bool highlight, bool draw_foreground, bool draw_background,
36 int x, int y, 36 int x, int y,
37 unsigned int width, unsigned int height) const { 37 unsigned int width, unsigned int height) const {
38 const GContext &tgc =
39 (highlight ? theme.hiliteTextGC() :
40 (isEnabled() ? theme.frameTextGC() : theme.disableTextGC() ) );
41 38
42 drawable.drawRectangle(tgc.gc(), 39 if (draw_background) {
43 x + theme.bevelWidth() + height + 1, y + height / 2, 40 const GContext &tgc =
44 width - ((theme.bevelWidth() + height) * 2) - 1, 0); 41 (highlight ? theme.hiliteTextGC() :
42 (isEnabled() ? theme.frameTextGC() : theme.disableTextGC() ) );
43
44 drawable.drawRectangle(tgc.gc(),
45 x + theme.bevelWidth() + height + 1, y + height / 2,
46 width - ((theme.bevelWidth() + height) * 2) - 1, 0);
47 }
45} 48}
46 49
47} 50}