Received: from list by lists.gnu.org with archive (Exim 4.71) id 1UQFU1-0007FT-9o for mharc-grub-devel@gnu.org; Thu, 11 Apr 2013 07:16:01 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60153) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQFTv-0007DJ-2L for grub-devel@gnu.org; Thu, 11 Apr 2013 07:16:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UQFTr-0001lE-On for grub-devel@gnu.org; Thu, 11 Apr 2013 07:15:54 -0400 Received: from collab.rosalab.ru ([217.199.216.181]:51168) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQFTr-0001kN-8g for grub-devel@gnu.org; Thu, 11 Apr 2013 07:15:51 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by collab.rosalab.ru (Postfix) with ESMTP id 91C6D29C33C for ; Thu, 11 Apr 2013 15:15:49 +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 jfp8nctDPV9e for ; Thu, 11 Apr 2013 15:15:49 +0400 (MSK) Received: from icedphoenix.localnet (unknown [10.168.1.56]) by collab.rosalab.ru (Postfix) with ESMTPSA id ECC3529C14B for ; Thu, 11 Apr 2013 15:15:48 +0400 (MSK) From: Vladimir Testov To: grub-devel@gnu.org Subject: [PATCH] [6/11] [gfxmenu/list] print scrollbar in the center slice Date: Thu, 11 Apr 2013 15:15:48 +0400 Message-ID: <1584836.6mXlT8Ks1I@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/mixed; boundary="nextPart1603388.0y96323b3o" 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: Thu, 11 Apr 2013 11:16:00 -0000 This is a multi-part message in MIME format. --nextPart1603388.0y96323b3o Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" now the scrollbar is printed entirely in the east slice of menu_pixmap_style. With this patch scrollbar is printed in the center slice if needed. Also when scrollbar is printed - width of every item is decreased (for the scrollbar to be printed) When it's not - width remains the same as before. I don't think this patch should go with included screenshots. But I can easily make and sent them if it will be necessary. -- With best regards, _______________________________ Vladimir Testov, ROSA Laboratory. www.rosalab.ru --nextPart1603388.0y96323b3o Content-Disposition: attachment; filename="grub-2.00-list-print-scrollbar-in-center-slice.patch" Content-Transfer-Encoding: 7Bit Content-Type: text/x-patch; charset="UTF-8"; name="grub-2.00-list-print-scrollbar-in-center-slice.patch" diff -Naur grub-new6/grub-core/gfxmenu/gui_list.c grub-new7/grub-core/gfxmenu/gui_list.c --- grub-new6/grub-core/gfxmenu/gui_list.c 2013-03-26 18:54:29.635995696 +0400 +++ grub-new7/grub-core/gfxmenu/gui_list.c 2013-03-28 14:56:58.157916412 +0400 @@ -391,16 +391,26 @@ box->draw (box, 0, 0); + if (drawing_scrollbar && (self->list_version > 0)) + { + grub_gfxmenu_box_t frame = self->scrollbar_frame; + int frame_horizontal_pad = frame->get_left_pad (frame) + + frame->get_right_pad (frame); + content_rect.width -= frame_horizontal_pad + self->scrollbar_width; + } + grub_gui_set_viewport (&content_rect, &vpsave2); draw_menu (self, num_shown_items); grub_gui_restore_viewport (&vpsave2); + int rightx = self->bounds.width - box_right_pad; + if (self->list_version == 0) + rightx += self->scrollbar_width; if (drawing_scrollbar) draw_scrollbar (self, self->first_shown_index, num_shown_items, 0, self->view->menu->size, - self->bounds.width - box_right_pad - + self->scrollbar_width, + rightx, box_top_pad, self->bounds.height - box_top_pad - box_bottom_pad); } --nextPart1603388.0y96323b3o--