Re: Difference between Gtk2 and Gtk3 output

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

 



On Sat, Feb 16, 2013 at 9:16 PM, HW Krus <hwkrus@xxxxxxxxx> wrote:
> Thanks Tristan.
>
>>
>> One thing I dont understand, is why you have a viewport
>> outside of a scrolled window, what is that intended to do ?
>>
>
> The original Gtk2 code is presented in the first post (and is from Krauses'
> book). The idea is simple: having two packed widgets and limited space one
> might to scroll one window and the other one follows suit (scrolls the same
> amount, both horizontally and vertically). In Gtk2 it works flawlessly, but
> I cannot make it work using Gtk3.

I see.

>
>>
>> Certainly, the viewport requires all the vertical space and
>> so none is left over for the scrolled window below (how
>> would that be unexpected ?).
>>
>
> Well to me a viewport is a (sub)window of a larger space. Just by using a
> viewport you already sending a "message" that you do not want to see all the
> contents at once. The same message is implied by using a scrolled window;
> hence both widgets should ask for the same space in the vertical box (as
> they do with Gtk2).

A GtkViewport is a utility that lets you pack widgets into a scrolled window,
particularly widget's that have no native scrolling ability (like treeviews,
iconviews and textviews do).

The functionality you are looking for, is a part of scrolled window, i.e.
the scrolled window does not require space to hold it's child, the viewport
however does (and the viewport uses it's size to negotiate the adjustment
offsets which result in moving the scrollbars and moving the window offset).

Unfortunately there is no feature that let's you hide the scrollbars of
a GtkScrolledWindow, perhaps there should be (and I would suggest
you file a bug and suggest some real use cases for this, it would work
out better than hard coding size requests).

As far as I can see, what you are trying to do is just not a feature of GTK+.

Cheers,
    -Tristan
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-list


[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux