Re: [Planner Dev] Bug 128983 – Gantt bar height doesn't match treeview row height



Hi,

Francisco Moraes wrote:
> 
> I've looked at the gtktreeview.c source and this is what I found:
> 
> - starting with GTK 2.7.0, the background area got 2*focus-line-width 
> widget style added to the vertical size (focus-line-width defaults to 1)
> - starting with GTK 2.7.3, it got changed from 2*focus-line-width to 
> vertical-separator (set to 2 and read-only as far as I understand it 
> from GTK)

There is no point in trying 2.7.x, only even numbers since those are the
released stable versions (2.8, 2.10, etc). I still don't think it has
anything directly to do with the GTK+ version, as since I've said,
people have been reporting this bug since the early 2.x days.

> I didn't find a clean way to figure out the size until I think the 
> treeview has been exposed. At least it doesn't seem to work consistently 
> in the method that matches the row heights because I get a null path 
> that is needed in the call to get the background area height.

It should suffice to do the measuring in the realize method or in
style_set. I think we do it in style_set right now, but it might be that
we need to do it in both (style_set is needed so that we update when the
theme changes).

> to this would be to add vertical-separator to the row height if GTK >= 
> 2.7.0. This wouldn't be perfect if widget styles can be changed somehow. 
> Any comments? Any know if widget styles can be changed from their default?

Themes change that value (but it can be read so that's not a problem).
But let's try to do the measurement at the right time first.

/Richard

-- 
Imendio AB, http://www.imendio.com/



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