Re: Computing border size of GtkFrame

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

 



On 23.03.2016 at 16:52 Igor Korot wrote:

> Hi, Andreas,

> On Wed, Mar 23, 2016 at 11:34 AM, Andreas Falkenhahn
> <andreas@xxxxxxxxxxxxxx> wrote:
>> I need to compute the border sizes of a GtkFrame before the window containing
>> that GtkFrame has been realized. Precisely, I need the distances between the
>> GtkFrame container widget and its child. AFAICS, this isn't possible to get
>> before the GtkFrame has been realized. So I thought that I could use a workaround
>> that creates a top-level window, adds a GtkFrame with a GtkButton and computes
>> the size and destroys everything again. Here is the code:

> What is it that you are trying to accomplish/achieve?

Fixing wxWidgets. src/common/sizer.cpp calls wxStaticBox::GetBordersForSizer()
at a time when the window hasn't been realized yet. Hence, the values returned
are spurious.

> Maybe this is possible in some other way?

Sure there is. But then you'd probably have to rewrite major parts of the wxSizer
logic. So I prefer keeping the logic that we have and force the GTK+ backend to
make it do what we need, even if it's a hackish solution. But maybe there's a nicer
and cleaner.... that's why I was asking here, so please don't hijack this thread,
Igor :)

-- 
Best regards,
 Andreas Falkenhahn                            mailto:andreas@xxxxxxxxxxxxxx

_______________________________________________
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