Re: Scrolls in GTK



В Пнд, 20/11/2006 в 17:59 +0000, Peter Clifton пишет:
> On Mon, 2006-11-20 at 20:26 +0300, Nickolay V. Shmyrev wrote:
> [snip]
> > It should be scrollbar-spacing style option 
> > 
> > http://developer.gnome.org/doc/API/2.0/gtk/GtkScrolledWindow.html#GtkScrolledWindow--scrollbar-spacing
> > 
> > you might want to try to set it in your .gtkrc-2.0
> > 
> > [code]
> > style "test"                                                                    
> > {                                                                               
> >    GtkScrolledWindow::scrollbar-spacing = 0                                     
> > }                                                                               
> >                                                                                 
> > class "GtkScrolledWindow"  style "test"
> > [/code]
> 
> That indeed sorts the spacing, however I think a nicer subtlety would be
> to not round the end corner of the scrollbar's buttons which adjoin the
> scrolled window. This wasn't completely clear in the original picture,
> however it did appear to be the intention.
> 
> I suspect such a change would be theme-engine territory, however I'd
> like to add that this is based upon zero knowledge of how theme-engines
> like Clearlooks work, more what clearlooks Vs. native GTK looks like,
> and what is achieved there.
> 
> Regards
> 
> Peter Clifton

Well, this should be rather simple task

Look at clearlooks code at the function
clearlooks_draw_scrollbar_stepper

http://cvs.gnome.org/viewcvs/gtk-engines/engines/clearlooks/src/clearlooks_draw.c?rev=1.54&view=markup

This code rounds corners:

	if (scrollbar->horizontal)
	{
		if (stepper->stepper == CL_STEPPER_A)
			corners = CL_CORNER_TOPLEFT | CL_CORNER_BOTTOMLEFT;
		else if (stepper->stepper == CL_STEPPER_D)
			corners = CL_CORNER_TOPRIGHT | CL_CORNER_BOTTOMRIGHT;
	}
	else
	{
		if (stepper->stepper == CL_STEPPER_A)
			corners = CL_CORNER_TOPLEFT | CL_CORNER_TOPRIGHT;
		else if (stepper->stepper == CL_STEPPER_D)
			corners = CL_CORNER_BOTTOMLEFT | CL_CORNER_BOTTOMRIGHT;
	}

you just need to set correct corners to be rounded

Attachment: signature.asc
Description: =?koi8-r?Q?=FC=D4=C1?= =?koi8-r?Q?_=DE=C1=D3=D4=D8?= =?koi8-r?Q?_=D3=CF=CF=C2=DD=C5=CE=C9=D1?= =?koi8-r?Q?_=D0=CF=C4=D0=C9=D3=C1=CE=C1?= =?koi8-r?Q?_=C3=C9=C6=D2=CF=D7=CF=CA?= =?koi8-r?Q?_=D0=CF=C4=D0=C9=D3=D8=C0?=



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