[Qgis-developer] Toolbar size

Tom Elwertowski telwertowski at comcast.net
Mon May 21 16:22:22 EDT 2007


Steven Bell wrote:
> Some of the discussion about menus and toolbars got me thinking about the
> toolbar setup in QGIS.
> My screen size is 1024x768 - on the small end these days, but pretty
> common.  I have toolbars across the top and down the right side, and I 
> still don't have room for all of the buttons.  My map canvas is roughly 620x530.
> I started thinking and comparing this to the OpenOffice.org interface, 
> which manages to fit even more buttons and information, while leaving a larger
> area for work.
> There are several places the GUI could save some space:
> -Toolbar and menu size.  OOo fits the menu and 2 toolbars into 85 pixels,
> where QGIS takes 105.

Toolbar icons were smaller in Qt 3. Sizing didn't work in Qt 4.0. Should 
be examined again for Qt 4.2.

> -Legend/Layer list.  It appears that its minimum size has been increased
> from v0.8.

My guess is that it's an unintentional change; perhaps only the default 
width should have increased.

> -Canvas.  It appears that the canvas is on a tabbed panel, with the tab
> title of "Map View".  Are there other views that were intended to go here?
> The way it currently is, removing the tabs and reducing the padding could
> save ~50px.

There might have been or still is a plan but it hasn't happened in two 
years. Based upon current issues, I don't think it will happen soon. I'm 
in favor of removing the tab until there is an actual use for it.

> -Bottom information.  OOo's bottom info bar is 22 px tall, while QGIS's is
> 48 px when you count the surrounding padding space.

This should be adjusted.

> I don't have much experience with QT GUI design, but it seems like these
> would be moderately simple changes which would greatly improve the 
> usability of the interface.
> How difficult would this really be to implement?  Is this worth doing?  I
> would be willing to work on this if there's interest and it isn't too hard.

I think it's worth doing. The difficulty is understanding GUI platform 
differences.

At present, QGIS supports 4 GUIs: GNOME, KDE, Mac and Win. Each of these 
requires different sizes for the same element in order to look good on 
that GUI.

To do a portable Qt GUI, absolute sizes need to be used both rarely and 
carefully in UI files. In order to look good on multiple platforms, the 
layout manager needs great freedom for choosing the right size.

Many QGIS GUI issues are caused by hard sizes where there should be 
autosizing or custom platform-specific differing sizes.

Qt3 created better compact layouts that Qt4. Some of the large items, 
especially toolbuttons, were a byproduct of the Qt 3 to 4 conversion. 
Some Qt UI functionality disappeared or just didn't work between Qt4.0 
and Qt4.2. Some parts of the QGIS UI should be revised again using more 
complete Qt4.2 functionality.

Qt Designer makes it very easy without realizing it to add 
platform-specific constants to UI files that are not good for other 
platforms.

QGIS developers love to "optimize" layouts for "their" platform. This 
introduces unpleasing sizes on other platforms.

Other applications solve this in several ways:

- Where staff and/or funding are not limited, projects tend to have 
duplicate UI files optimized for each platform.

- Where developer availability is limited, projects use common UI files 
and accept less compact layouts.

- An intermediate approach, which I think QGIS should use, is to use 
common GUI files and put all size "optimizations" into C++ code which 
runs only on certain platforms.

I encourage you to investigate all this. If you can't work directly on 
all platforms, however, part of the work is to start discussions and 
enlist some partners so that the layout is improved for all platforms.

Tom



More information about the Qgis-developer mailing list