From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1UPUXY-0003Va-Gq for mharc-grub-devel@gnu.org; Tue, 09 Apr 2013 05:08:32 -0400 Received: from eggs.gnu.org ([208.118.235.92]:54338) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPUXQ-0003Um-7R for grub-devel@gnu.org; Tue, 09 Apr 2013 05:08:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UPUXO-0006pc-FU for grub-devel@gnu.org; Tue, 09 Apr 2013 05:08:24 -0400 Received: from collab.rosalab.ru ([217.199.216.181]:35985) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPUXO-0006pB-3s for grub-devel@gnu.org; Tue, 09 Apr 2013 05:08:22 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by collab.rosalab.ru (Postfix) with ESMTP id 72D3529C2F2 for ; Tue, 9 Apr 2013 13:08:19 +0400 (MSK) X-Virus-Scanned: amavisd-new at rosalab.ru Received: from collab.rosalab.ru ([127.0.0.1]) by localhost (collab.rosalab.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nOGphVyXRAcK for ; Tue, 9 Apr 2013 13:08:18 +0400 (MSK) Received: from icedphoenix.localnet (unknown [10.168.1.56]) by collab.rosalab.ru (Postfix) with ESMTPSA id D1CE829C248 for ; Tue, 9 Apr 2013 13:08:18 +0400 (MSK) From: Vladimir Testov To: grub-devel@gnu.org Subject: Re: [PATCH] fix menu size calculation in presence of selected item pixmap Date: Tue, 09 Apr 2013 13:08:16 +0400 Message-ID: <2360845.vp9XZQrH5p@icedphoenix> User-Agent: KMail/4.9.5 (Linux/3.5.0-26-generic; KDE/4.9.5; x86_64; ; ) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="nextPart2031444.FyW1dY550i" Content-Transfer-Encoding: 7Bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 217.199.216.181 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: Tue, 09 Apr 2013 09:08:30 -0000 This is a multi-part message in MIME format. --nextPart2031444.FyW1dY550i Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" >I don't see the logic behind this. item_top in draw_menu doesn't >increase more on selected item than on any other one. Current function does not take into account pixmap style of the selected item. This pixmap style needs for additional space to be drawn. Overall height of the selected item is: sel_top_pad + sel_bottom_pad + item_height - 1 So the number of shown items is miscalculated. And in some cases we will have the bottom item not fully drawn. I can sent a screenshot. -- With best regards, _______________________________ Vladimir Testov, ROSA Laboratory. www.rosalab.ru --nextPart2031444.FyW1dY550i Content-Transfer-Encoding: 7Bit Content-Type: text/html; charset="us-ascii"
>I don't see the logic behind this. item_top in draw_menu doesn't
>increase more on selected item than on any other one.

Current function does not take into account pixmap style of the selected item.
This pixmap style needs for additional space to be drawn. 
Overall height of the selected item is:
sel_top_pad + sel_bottom_pad + item_height - 1

So the number of shown items is miscalculated.
And in some cases we will have the bottom item not fully drawn. I can sent a screenshot.

--

With best regards,

_______________________________

Vladimir Testov, ROSA Laboratory.

www.rosalab.ru

--nextPart2031444.FyW1dY550i--