From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1U39W6-0005LD-NQ for mharc-grub-devel@gnu.org; Wed, 06 Feb 2013 13:14:42 -0500 Received: from eggs.gnu.org ([208.118.235.92]:38430) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U39W1-00058S-35 for grub-devel@gnu.org; Wed, 06 Feb 2013 13:14:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U39Vz-0006sM-P8 for grub-devel@gnu.org; Wed, 06 Feb 2013 13:14:37 -0500 Received: from mail-la0-x231.google.com ([2a00:1450:4010:c03::231]:33298) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U39Vz-0006s5-Hc for grub-devel@gnu.org; Wed, 06 Feb 2013 13:14:35 -0500 Received: by mail-la0-f49.google.com with SMTP id fs13so1708716lab.36 for ; Wed, 06 Feb 2013 10:14:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:date:from:to:cc:subject:message-id:in-reply-to :references:x-mailer:mime-version:content-type :content-transfer-encoding; bh=CA8LcbDo1/3S2G7HQfAEbzhS9Iz6QDH3iokgDd/iYZI=; b=rHbAxuGju3yqnMo6gihiyqWunbQZhBjUBjML9PwwoNz3au7v9GbP6JpB9vd9Y4oXDp 1UJu7MyfKJme35PvO6eFjuskvLkEP9keviVq/FSNcr1BitvQCZKfo6Wz73c1Lvqb0+J9 DawVeEnQPO4A3m57Z7P6KihSyOsHLCuI3G1D/TLitHgQrL17dlPDD2n0BBHFp7JXMELO gxbVQ4aXZr3Pn0fn9vnNxpUeo7RWvD4dAlw/de2QRDQq1LuEvR/2ZC9ZzxkHk/oklX3n FdigVHPnPAoZPN8Z2c4IZ36ui9vl7dLb3mLRma4PtI1o1q/gXz+OYSC0FiGtDjo1eyeW AYIg== X-Received: by 10.152.144.4 with SMTP id si4mr27211054lab.10.1360174473589; Wed, 06 Feb 2013 10:14:33 -0800 (PST) Received: from opensuse.site (ppp91-78-198-46.pppoe.mtu-net.ru. [91.78.198.46]) by mx.google.com with ESMTPS id if8sm13360261lab.1.2013.02.06.10.14.31 (version=SSLv3 cipher=RC4-SHA bits=128/128); Wed, 06 Feb 2013 10:14:32 -0800 (PST) Date: Wed, 6 Feb 2013 22:14:29 +0400 From: Andrey Borzenkov To: The development of GNU GRUB Subject: Re: fixed item-height, item-spacing, max-elements-shown etc Message-ID: <20130206221429.6220950d@opensuse.site> In-Reply-To: <905524412.2504.1360082654149.JavaMail.root@collab.rosalab.ru> References: <1553109984.2496.1360082210371.JavaMail.root@collab.rosalab.ru> <905524412.2504.1360082654149.JavaMail.root@collab.rosalab.ru> X-Mailer: Claws Mail 3.9.0 (GTK+ 2.24.10; x86_64-suse-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::231 Cc: vladimir.testov@rosalab.ru X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Feb 2013 18:14:39 -0000 В Tue, 5 Feb 2013 19:44:14 +0300 (MSK) Vladimir Testov пишет: > 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.