Opened 9 years ago

Closed 9 years ago

#5440 closed bug (fixed)

[Interface Kit] empty space between selected item and menu item separator is 1px more than necessary

Reported by: diver Owned by: axeld
Priority: normal Milestone: R1
Component: Kits/Interface Kit Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All


Tested with hrev35548 in VirtualBox 3.0.12.

Attachments (1)

Deskbar.png (21.2 KB) - added by diver 9 years ago.

Download all attachments as: .zip

Change History (4)

Changed 9 years ago by diver

Attachment: Deskbar.png added

comment:1 Changed 9 years ago by diver

Version: R1/alpha1R1/Development

comment:2 Changed 9 years ago by jackburton

One of the problem, I think, is that, while the separator height changes with the font size, the actual drawing is always just 2 horizontal lines:

BSeparatorItem::GetContentSize(float* _width, float* _height)
	if (_width != NULL)
		*_width = 2.0;

	if (_height != NULL) {
		BFont font(be_plain_font);
		if (Menu())
		*_height = floorf(font.Size() * 0.8);


	menu->SetHighColor(tint_color(lowColor, B_DARKEN_1_TINT));
	menu->StrokeLine(BPoint(bounds.left + 1.0f, + 4.0f),
		BPoint(bounds.right - 1.0f, + 4.0f));
	menu->SetHighColor(tint_color(lowColor, B_LIGHTEN_2_TINT));
	menu->StrokeLine(BPoint(bounds.left + 1.0f, + 5.0f),
		BPoint(bounds.right - 1.0f, + 5.0f));

So, either we use a fixed size for the separator item, or change some code in its drawing (and also in BMenu drawing code, I think), to accomodate the variable sized separator.

comment:3 Changed 9 years ago by jackburton

Resolution: fixed
Status: newclosed

Should be fixed in hrev35856,

Note: See TracTickets for help on using tickets.