forked from AuroraMiddleware/gtk
menuitem: force odd height if we're not using wide separators
So that the 1px line can receive the same amount of space above and below. https://bugzilla.gnome.org/show_bug.cgi?id=666242
This commit is contained in:
parent
20e94c1275
commit
713df0c72b
@ -945,6 +945,16 @@ gtk_menu_item_get_preferred_height (GtkWidget *widget,
|
||||
min_height += separator_height;
|
||||
nat_height += separator_height;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* force odd, so that we can have the same space above and
|
||||
* below the line.
|
||||
*/
|
||||
if (min_height % 2 == 0)
|
||||
min_height += 1;
|
||||
if (nat_height % 2 == 0)
|
||||
nat_height += 1;
|
||||
}
|
||||
}
|
||||
|
||||
accel_width = 0;
|
||||
@ -1071,6 +1081,16 @@ gtk_menu_item_get_preferred_height_for_width (GtkWidget *widget,
|
||||
min_height += separator_height;
|
||||
nat_height += separator_height;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* force odd, so that we can have the same space above and
|
||||
* below the line.
|
||||
*/
|
||||
if (min_height % 2 == 0)
|
||||
min_height += 1;
|
||||
if (nat_height % 2 == 0)
|
||||
nat_height += 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (minimum_size)
|
||||
|
Loading…
Reference in New Issue
Block a user