fixed parentrelative menu highlight bug
This commit is contained in:
parent
9db57d56d3
commit
d948abb81b
2 changed files with 15 additions and 12 deletions
|
@ -1,5 +1,8 @@
|
|||
(Format: Year/Month/Day)
|
||||
Changes for 1.0rc3:
|
||||
*07/03/11:
|
||||
* Fixed display bug with ParentRelative menu highlight (thanks Julien Trolet)
|
||||
FbTk/Menu.cc
|
||||
*07/03/10:
|
||||
* Autogrouped windows weren't getting added to the workspace menu (Mark)
|
||||
Screen.cc
|
||||
|
|
|
@ -1214,19 +1214,19 @@ void Menu::highlightItem(int index) {
|
|||
|
||||
FbPixmap buffer = FbPixmap(menu.frame, item_w, item_h, menu.frame.depth());
|
||||
|
||||
if (menu.hilite_pixmap != ParentRelative) {
|
||||
if (menu.hilite_pixmap) {
|
||||
buffer.copyArea(menu.hilite_pixmap,
|
||||
theme().hiliteGC().gc(), 0, 0,
|
||||
0, 0,
|
||||
item_w, item_h);
|
||||
} else {
|
||||
buffer.fillRectangle(theme().hiliteGC().gc(),
|
||||
0, 0, item_w, item_h);
|
||||
}
|
||||
menu.frame.updateTransparent(item_x, item_y, item_w, item_h, buffer.drawable(), true);
|
||||
bool parent_rel = menu.hilite_pixmap == ParentRelative;
|
||||
Pixmap pixmap = parent_rel ? menu.frame_pixmap : menu.hilite_pixmap;
|
||||
int pixmap_x = parent_rel ? item_x : 0, pixmap_y = parent_rel ? item_y : 0;
|
||||
if (pixmap) {
|
||||
buffer.copyArea(pixmap,
|
||||
theme().hiliteGC().gc(), pixmap_x, pixmap_y,
|
||||
0, 0,
|
||||
item_w, item_h);
|
||||
} else {
|
||||
buffer.fillRectangle(theme().hiliteGC().gc(),
|
||||
0, 0, item_w, item_h);
|
||||
}
|
||||
|
||||
menu.frame.updateTransparent(item_x, item_y, item_w, item_h, buffer.drawable(), true);
|
||||
|
||||
drawItem(buffer, index, true, true);
|
||||
|
||||
|
|
Loading…
Reference in a new issue