diff options
Diffstat (limited to 'src/FbTk/Menu.cc')
-rw-r--r-- | src/FbTk/Menu.cc | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc index a2326c4..1162b53 100644 --- a/src/FbTk/Menu.cc +++ b/src/FbTk/Menu.cc | |||
@@ -1214,19 +1214,19 @@ void Menu::highlightItem(int index) { | |||
1214 | 1214 | ||
1215 | FbPixmap buffer = FbPixmap(menu.frame, item_w, item_h, menu.frame.depth()); | 1215 | FbPixmap buffer = FbPixmap(menu.frame, item_w, item_h, menu.frame.depth()); |
1216 | 1216 | ||
1217 | if (menu.hilite_pixmap != ParentRelative) { | 1217 | bool parent_rel = menu.hilite_pixmap == ParentRelative; |
1218 | if (menu.hilite_pixmap) { | 1218 | Pixmap pixmap = parent_rel ? menu.frame_pixmap : menu.hilite_pixmap; |
1219 | buffer.copyArea(menu.hilite_pixmap, | 1219 | int pixmap_x = parent_rel ? item_x : 0, pixmap_y = parent_rel ? item_y : 0; |
1220 | theme().hiliteGC().gc(), 0, 0, | 1220 | if (pixmap) { |
1221 | 0, 0, | 1221 | buffer.copyArea(pixmap, |
1222 | item_w, item_h); | 1222 | theme().hiliteGC().gc(), pixmap_x, pixmap_y, |
1223 | } else { | 1223 | 0, 0, |
1224 | buffer.fillRectangle(theme().hiliteGC().gc(), | 1224 | item_w, item_h); |
1225 | 0, 0, item_w, item_h); | 1225 | } else { |
1226 | } | 1226 | buffer.fillRectangle(theme().hiliteGC().gc(), |
1227 | menu.frame.updateTransparent(item_x, item_y, item_w, item_h, buffer.drawable(), true); | 1227 | 0, 0, item_w, item_h); |
1228 | } | 1228 | } |
1229 | 1229 | menu.frame.updateTransparent(item_x, item_y, item_w, item_h, buffer.drawable(), true); | |
1230 | 1230 | ||
1231 | drawItem(buffer, index, true, true); | 1231 | drawItem(buffer, index, true, true); |
1232 | 1232 | ||