[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fixed item-height, item-spacing, max-elements-shown etc

From: Andrey Borzenkov
Subject: Re: fixed item-height, item-spacing, max-elements-shown etc
Date: Wed, 6 Feb 2013 22:14:29 +0400

В Tue, 5 Feb 2013 19:44:14 +0300 (MSK)
Vladimir Testov <address@hidden> пишет:

> I'm going to write some patches for GRUB2 - mainly for theme handling.
> First one - I've faced some bug: maximum number of displayed boot elements is 
> counted in presumption that element's height is item_height and distance 
> between elements is item_spacing. Nevertheless, this conceptions does not 
> work during menu drawing if we have bitmap box of the selected element. Real 
> height of the element will be (item_height + box_pad_top + box_pad_bottom - 
> 1), where box_pad_top and box_pad_bottom are top and bottom dimensions of 
> bitmap box. So we will have strange difficulties with understanding of what 
> will be really drawn and what menu height we should use.
> The patch fixes these problemes. We will have item_height in every case. So, 
> there will be no troubles with item_height, item_spacing and menu height. 
> These three variables now mean what they suppose to mean.

I am not sure whether it is appropriate fix. After your patch "box
effect" on selected item is effectively lost (it makes
selected_item_box the same height as selected item itself).

The actual fix looks much simpler - get_num_shown_items() should
additionally account for self->selected_item_box->get_op_pad().

Could you make available theme that demonstrates this problem?

> Would be glad if this patch will be accepted. I also have many ideas how to 
> improve GRUB theming functionality. Some of them are completed and I can send 
> them as patches as soon as this patch is accepted.
> Should I create update-request in bugzilla?
> If something in the patch is not clear - you can ask me.
> Also, some time ago I've sent a patch which adds new option - 
> item_pixmap_style for bitmap box of unselected elements. It was not accepted 
> but I didn't received any feedback. With whom should I discuss this patch 
> (now I want to modify it, if the current patch will be accepted).
> Thanks for your attention.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]