From kde-core-devel Sun Jun 22 09:40:54 2008 From: Albert Astals Cid Date: Sun, 22 Jun 2008 09:40:54 +0000 To: kde-core-devel Subject: Re: Smaller KDialogs if needed Message-Id: <200806221140.54411.aacid () kde ! org> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=121412788814221 A Diumenge 22 Juny 2008, Olivier Goffart va escriure: > Le samedi 21 juin 2008, Albert Astals Cid a écrit : > > KDialog uses the mainwidget sizeHint to calculate it's minimumSizeHint, > > this results in BIG KDialogs and bad situations like for example > > $ keditfiletype text/html > > not fitting in a 1024x768 screen. > > > > The attached patch first uses sizeHint and if the calculated > > minimumSizeHint is bigger than 90% of available screen rect recalculates > > the minimumSizeHint using children's minimumSizeHint. > > > > That gives me a keditfiletype that fits nicely in a 1024x768 screen. > > > > Comments? > > Don't you think kdialog should always compute the minimum sizehint from the > minimum size hint of it's contents? It would seem sane yes, but if you do that, you'll end up with uglier dialogs by default, many components define a minimum sizehint that is really minimum, so that's why i just switched to using minimum sizehint if it does not fit. Albert