From owner-freebsd-libh Sat Oct 13 10:44:33 2001 Delivered-To: freebsd-libh@freebsd.org Received: from r220-1.rz.RWTH-Aachen.DE (r220-1.rz.RWTH-Aachen.DE [134.130.3.31]) by hub.freebsd.org (Postfix) with ESMTP id 4D7A837B414 for ; Sat, 13 Oct 2001 10:40:28 -0700 (PDT) Received: from r220-1.rz.RWTH-Aachen.DE (relay2.RWTH-Aachen.DE [134.130.3.1]) by r220-1.rz.RWTH-Aachen.DE (8.10.1/8.11.3-2) with ESMTP id f9DHePj24697; Sat, 13 Oct 2001 19:40:25 +0200 (MEST) Received: from kawoserv.kawo2.rwth-aachen.de (root@kawoserv.kawo2.RWTH-Aachen.DE [134.130.180.1]) by r220-1.rz.RWTH-Aachen.DE (8.10.1/8.11.3/6) with ESMTP id f9DHeOo24693; Sat, 13 Oct 2001 19:40:24 +0200 (MEST) Received: from fump.kawo2.rwth-aachen.de (root@fump.kawo2.rwth-aachen.de [134.130.181.148]) by kawoserv.kawo2.rwth-aachen.de (8.9.3/8.9.3) with ESMTP id TAA19580; Sat, 13 Oct 2001 19:40:25 +0200 Received: (from alex@localhost) by fump.kawo2.rwth-aachen.de (8.11.3/8.11.3) id f9DHf1j77170; Sat, 13 Oct 2001 19:41:02 +0200 (CEST) (envelope-from alex) Date: Sat, 13 Oct 2001 19:41:00 +0200 From: Alexander Langer To: The Anarcat Cc: Libh Subject: Re: doc/hui Message-ID: <20011013194100.A77141@fump.kawo2.rwth-aachen.de> References: <20011013130619.C739@shall.anarcat.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Mutt/1.2.5i In-Reply-To: <20011013130619.C739@shall.anarcat.dyndns.org>; from anarcat@anarcat.dyndns.org on Sat, Oct 13, 2001 at 01:06:19PM -0400 X-PGP-Fingerprint: 44 28 CA 4C 46 5B D3 A8 A8 E3 BA F3 4E 60 7D 7F X-PGP-at: finger alex@big.endian.de X-Verwirrung: Dieser Header dient der allgemeinen Verwirrung. Sender: owner-freebsd-libh@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Thus spake The Anarcat (anarcat@anarcat.dyndns.org): > Now the problem is that this file mentions "boxes". There are no boxes > in the example (hello world). It is quite confusing. :) Yes, boxes have been removed by me about one year ago. > hit "eval". :) I have been able to make the box little, only now. But > it's ackward. And the call is: > $cmd_cont resize "3 -1" > Now I don't know, but this is odd. If I make this "1 -1", for example > the Y dimension shrinks. Not x!!! Why? And what does the -1 *do* > exactly? And what are the units for these dimensions??? -1 has a special meaning if you don't you free placement (=3D=3D arranging) of widgets. Arranging means, it raises the sub-widgets to max. possible size, giving all sub-widgets the same width/height (depending on if it is arranging horizontally or vertically). Now, if you for example want a fixed size of 2 for one widget, but the others shall be arranged automatically (you can still use "free" arranging and do everything manually...), use -1. So, if you want a fixed height of 2 for example, use resize "-1 2" =20 (resize "width height"). If you are using "free" arrangement (I believe you do), using -1 should have NO effect: void HuiQt::Widget::resize(const QSize& to, int is_arranging =3D 0) { if (to.width() =3D=3D -1 && to.height() =3D=3D -1) return; if (to.width() >=3D 0 && to.height() >=3D 0) { /* real resize */ if (qwidget()) qwidget()->resize(to); setsize(to); return; } if ((to.width() >=3D 0 || to.height() >=3D 0) && !is_arranging) { ContainerWidget *cp =3D dynamic_cast( (Hui::Widget*) parent()); GroupWidget *gp =3D dynamic_cast( (Hui::Widget*) parent()); mFixedSize =3D (to.width() < 0) ? to.height() : to.width(); /* arrange parent again since we changed the fixed size */ if (cp !=3D NULL) cp->arrange(); if (gp !=3D NULL) gp->arrange(); } } // HuiQt::Widget::resize So I don't know what's happening there, it should just do nothing. (Note that widgets still have a default size, probably given by Qt. So if this is the only resize statement you are using on this widget, it is probably using Qt's default size for that widget, which is the reason why it shrinks X and not Y :) Alex To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message