* Re: [PATCH] fixed progress_bar highlight_style box displaying
@ 2013-03-07 4:29 Vladimir Testov
2013-03-07 6:04 ` Andrey Borzenkov
0 siblings, 1 reply; 6+ messages in thread
From: Vladimir Testov @ 2013-03-07 4:29 UTC (permalink / raw)
To: grub-devel
[-- Attachment #1: Type: text/plain, Size: 751 bytes --]
>I am curious why would you need border elements. To me having left and
>right padding sounds like being wrong for horizontal progress bar. It
>draws something when there is zero content.
Didn't get your idea. If we don't have borders of the highlight_style element
then paddings of the element are zero and everything is the same as before. If
we want to have more detailed view of the highlight_style element - we can use
it. (with the patch)
Or maybe you didn't get how exactly the scrollbar is beeing drawn in "styled"
mode...
Please, be more specific.
Should I sent some screenshots, describing what exactly has been changed and
why?
--
With best regards,
_______________________________
Vladimir Testov, ROSA Laboratory.
www.rosalab.ru
[-- Attachment #2: Type: text/html, Size: 3581 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] fixed progress_bar highlight_style box displaying
2013-03-07 4:29 [PATCH] fixed progress_bar highlight_style box displaying Vladimir Testov
@ 2013-03-07 6:04 ` Andrey Borzenkov
0 siblings, 0 replies; 6+ messages in thread
From: Andrey Borzenkov @ 2013-03-07 6:04 UTC (permalink / raw)
To: The development of GNU GRUB
On Thu, Mar 7, 2013 at 8:29 AM, Vladimir Testov
<vladimir.testov@rosalab.ru> wrote:
>>I am curious why would you need border elements. To me having left and
>
>>right padding sounds like being wrong for horizontal progress bar. It
>
>>draws something when there is zero content.
>
> Didn't get your idea. If we don't have borders of the highlight_style
> element then paddings of the element are zero and everything is the same as
> before. If we want to have more detailed view of the highlight_style element
> - we can use it. (with the patch)
>
>
>
> Or maybe you didn't get how exactly the scrollbar is beeing drawn in
> "styled" mode...
>
>
>
> Please, be more specific.
>
>
>
> Should I sent some screenshots, describing what exactly has been changed and
> why?
>
It always makes sense when dealing with GUI
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] fixed progress_bar highlight_style box displaying
@ 2013-03-07 7:50 Vladimir Testov
2013-03-08 7:13 ` Andrey Borzenkov
0 siblings, 1 reply; 6+ messages in thread
From: Vladimir Testov @ 2013-03-07 7:50 UTC (permalink / raw)
To: grub-devel
[-- Attachment #1: Type: text/plain, Size: 376 bytes --]
Before - without patch.
After - with patch.
bar_style and highlight_style - both set to different pixmap boxes with 9
slices.
Though the color scheme is not ideal, screenshots are demonstrating my idea.
The differences are in bottom and right sides.
See screenshots.
--
With best regards,
_______________________________
Vladimir Testov, ROSA Laboratory.
www.rosalab.ru
[-- Attachment #2: before-1.png --]
[-- Type: image/png, Size: 1848 bytes --]
[-- Attachment #3: before-2.png --]
[-- Type: image/png, Size: 1972 bytes --]
[-- Attachment #4: after-2.png --]
[-- Type: image/png, Size: 2048 bytes --]
[-- Attachment #5: after-1.png --]
[-- Type: image/png, Size: 1990 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] fixed progress_bar highlight_style box displaying
2013-03-07 7:50 Vladimir Testov
@ 2013-03-08 7:13 ` Andrey Borzenkov
0 siblings, 0 replies; 6+ messages in thread
From: Andrey Borzenkov @ 2013-03-08 7:13 UTC (permalink / raw)
To: grub-devel
В Thu, 07 Mar 2013 11:50:27 +0400
Vladimir Testov <vladimir.testov@rosalab.ru> пишет:
> Before - without patch.
> After - with patch.
>
> bar_style and highlight_style - both set to different pixmap boxes with 9
> slices.
>
> Though the color scheme is not ideal, screenshots are demonstrating my idea.
>
> The differences are in bottom and right sides.
>
> See screenshots.
>
This looks interesting indeed and explains your patch pretty well.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] fixed progress_bar highlight_style box displaying
@ 2013-03-06 13:08 Vladimir Testov
2013-03-06 18:20 ` Andrey Borzenkov
0 siblings, 1 reply; 6+ messages in thread
From: Vladimir Testov @ 2013-03-06 13:08 UTC (permalink / raw)
To: grub-devel
[-- Attachment #1: Type: text/plain, Size: 307 bytes --]
In current state we could not correctly use styled box for highlight_style.
We could set only center slice for highlight_style. Otherwise highlighted area
won't be correctly displayed.
Patch included.
--
With best regards,
_______________________________
Vladimir Testov, ROSA Laboratory.
www.rosalab.ru
[-- Attachment #2: grub-2.00-fix-progress-bar-highligh.patch --]
[-- Type: text/x-patch, Size: 1073 bytes --]
diff -Naur grub-2.00/grub-core/gfxmenu/gui_progress_bar.c grub-new/grub-core/gfxmenu/gui_progress_bar.c
--- grub-2.00/grub-core/gfxmenu/gui_progress_bar.c 2012-03-10 22:37:48.000000000 +0400
+++ grub-new/grub-core/gfxmenu/gui_progress_bar.c 2013-03-06 16:55:17.444044638 +0400
@@ -139,6 +139,12 @@
int bar_b_pad = bar->get_bottom_pad (bar);
int bar_h_pad = bar_l_pad + bar_r_pad;
int bar_v_pad = bar_t_pad + bar_b_pad;
+ int hl_l_pad = hl->get_left_pad (hl);
+ int hl_r_pad = hl->get_right_pad (hl);
+ int hl_t_pad = hl->get_top_pad (hl);
+ int hl_b_pad = hl->get_bottom_pad (hl);
+ int hl_h_pad = hl_l_pad + hl_r_pad;
+ int hl_v_pad = hl_t_pad + hl_b_pad;
int tracklen = w - bar_h_pad;
int trackheight = h - bar_v_pad;
int barwidth;
@@ -148,7 +154,7 @@
barwidth = (tracklen * (self->value - self->start)
/ (self->end - self->start));
- hl->set_content_size (hl, barwidth, h - bar_v_pad);
+ hl->set_content_size (hl, barwidth - hl_h_pad, h - bar_v_pad - hl_v_pad);
bar->draw (bar, 0, 0);
hl->draw (hl, bar_l_pad, bar_t_pad);
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] fixed progress_bar highlight_style box displaying
2013-03-06 13:08 Vladimir Testov
@ 2013-03-06 18:20 ` Andrey Borzenkov
0 siblings, 0 replies; 6+ messages in thread
From: Andrey Borzenkov @ 2013-03-06 18:20 UTC (permalink / raw)
To: grub-devel
В Wed, 06 Mar 2013 17:08:16 +0400
Vladimir Testov <vladimir.testov@rosalab.ru> пишет:
> In current state we could not correctly use styled box for highlight_style.
>
> We could set only center slice for highlight_style. Otherwise highlighted area
> won't be correctly displayed.
>
> Patch included.
I am curious why would you need border elements. To me having left and
right padding sounds like being wrong for horizontal progress bar. It
draws something when there is zero content.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-03-08 7:13 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-07 4:29 [PATCH] fixed progress_bar highlight_style box displaying Vladimir Testov
2013-03-07 6:04 ` Andrey Borzenkov
-- strict thread matches above, loose matches on Subject: below --
2013-03-07 7:50 Vladimir Testov
2013-03-08 7:13 ` Andrey Borzenkov
2013-03-06 13:08 Vladimir Testov
2013-03-06 18:20 ` Andrey Borzenkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).