Re: size requests/allocations of own widgets
- From: Sven Neumann <sven gimp org>
- To: Ronald Bultje <rbultje ronald bitfreak net>
- Cc: gtk-list gnome org
- Subject: Re: size requests/allocations of own widgets
- Date: 26 Jan 2001 16:21:57 +0100
Ronald Bultje <rbultje ronald bitfreak net> writes:
> I have made my own simple widget, it works, but one thing I don't like is
> that if I request a size (width/height) and one of them gets bigger, the
> other doesn't. Now, I really want the ration width:height to be 4:3. My
> simple solution was to just draw it bigger in the function
> gtk_<widget)_expose();, but that doesn't work. The image gets bigger but
> the allocated space doesn't, so the widgets below it are layed over my own.
> Does anyone know how to make a "fixed" width/height ration?
Put your widget inside a GtkAspectFrame?! Another possibility is to override
the parent's size_allocate function and take care of keeping the aspect_ratio
there.
Salut, Sven
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]