[Digikam-devel] Re: [Patch] make UI more usable on small screens

Matthias Welwarsky matze at welwarsky.de
Thu Feb 10 19:46:45 GMT 2011


On Thursday 10 February 2011 19:39:33 Marcel Wiesweg wrote:
> > what do you think about the following changes to make UI more usable on
> > 
> > small screens:
> >      - SideBarWidget is now a QScrollArea
> >      - minimumSizeHint() enforces minimum width of 20% of screen width,
> > 
> > regardless of minimum sizes of managed widgets
> > 
> >      - adjust left sidebar widgets to play nice with QScrollArea
> 
> It's all right for me if it works.
> Things to avoid though:
> - scrollbars per default on a normal screen (netbook, small laptop)
> - scrollbars within scrollbars
> - important UI elements disappearing

With the patch, any SidebarWidget derivative actually becomes a QScrollArea, 
which contains the actual tool view. To determine an appropriate 
minimumSizeHint(), it requests the minimumSizeHint() of the widget it contains 
and makes sure the width is not larger than 20% of the screen width. 

Before, the largest minimumSizeHint() of all widgets in the sidebar would 
determine its minimum width. For widgets like the gpssearch this was > 300 
pixels, which means the sidebar took more than 1/3rd of a 1024 pixel screen, 
no matter which tool was opened.

The patch allows the sidebar to become smaller than what the largest tool 
widget demands. To achieve this, overriding the minimumSizeHint() in class 
SidebarWidget would have been enough, but then tools demanding larger size 
become squeezed pretty badly.  Hence the addition of a QScrollArea.

The patch is against 2.0, by the way.

> 
> Marcel
> _______________________________________________
> Digikam-devel mailing list
> Digikam-devel at kde.org
> https://mail.kde.org/mailman/listinfo/digikam-devel




More information about the Digikam-devel mailing list