[KPhotoAlbum] [PATCH 2/3] SettingsData: Default window geometry calculated

Michael Witten mfwitten at MIT.EDU
Wed Sep 24 14:16:25 BST 2008


On 24 Sep 2008, at 3:00 AM, Henner Zeller wrote:

> Hi,
>
> On Wed, Sep 24, 2008 at 12:44 AM, Michael Witten <mfwitten at mit.edu>  
> wrote:
>>
>> On 23 Sep 2008, at 3:33 PM, Henner Zeller wrote:
>>
>>> The constant calculation in the beginning to estimate a useful  
>>> size is
>>> probably ok but adds a lot of clutter with not much gain. How about
>>> starting with
>>>
>>> const float ratioW = 0.6;
>>> const float ratioH = 0.6;
>>>
>>> .. and go from there ?
>>
>> The constants provide tweak-able parameters that have rationale
>> behind them. To keep them is to keep information, while to throw
>> them out is to remove information. I suggest we keep information.
>
> Well, but these parameters are arbitrary guesses.

They are not arbitrary. They are educated.

> You assume that a typical size of a screen is 1440x900 for instance.
> You're right, that it is more information, but all constants along
> the way are arbitrary guesses it would be simpler to replace them
> with a simple constant that is at least easy to relate to (like 60%).

But it's more complicated than that, as Qt is cross-platform and doesn't
provide an guarantees on frames. As such, it's necessary to have  
educated
guesses---heuristics if you will; this particularly applies to the  
modeling
of a standard frame's borders an title bar, which makes a difference.
As far as choosing a typical screen size of 1440x900, you can change  
those
values if you have a valid reason, so that the rest of the constants are
updated automatically.

> As you state yourself: "I admittedly went a little overboard, ...".
>
>>> Another thing: if you have really small screens and end up smaller
>>> than say 600x400 you might want to boost the size again up to the
>>> screensize - some pixels.
>>
>> The "- some pixels" is the hard part that will probably fail in a
>> not insignificant number of cases.
>>
>> However, what about view->setWindowState( Qt::WindowFullScreen ); ?
>
> I was only suggesting the "minus some pixels" in case it won't work
> for Qt on Mac-OS. But if it does, then full-screen is probably a good
> choice. For the small screens I am thinking
> of cell-phones or an Asus-eeePC.

Unless cell-phones have resolutions around 800x600 or greater, it's
just not really going to work well, and I'm not sure fullscreen makes
any difference. Perhaps a more compact interface should be designed
for such cases.



More information about the Kphotoalbum mailing list