Difference between revisions of "GUI design"

From Lazarus wiki
Jump to navigationJump to search
(moved from discussion)
 
(91 intermediate revisions by 11 users not shown)
Line 1: Line 1:
 +
{{GUI design}}
 +
 
==Overview==
 
==Overview==
  
When working on lazarus, certain design guidelines need to be taken into consideration. To prevent a diversity of styles and ensure the clarity of dialogs. The next article tries to summarize several guidelines to help you designing.
+
When working on lazarus, certain design guidelines need to be taken into consideration. To prevent a diversity of styles and ensure the clarity of dialogs. This article tries to summarize these guidelines to help you designing. There is also a buch of screenshots, artwork and dialog information available.
 
 
==Dialogs==
 
Dialogs are special forms that need the user to make / change some setting before lazarus can continue.  
 
 
 
 
 
===Dialog Settings===
 
Settings that should be applied in general are;
 
  
* '''BorderStyle''' : bsSizeToolWin
+
* [[GUI design guidelines]]
* '''Position''' : poScreenCenter
+
* [[Screenshots / examples]]
* '''FormStyle''' : fsStayOnTop (or show the dialog using ShowModal)
+
* [[Lazarus dialogs information]]
 +
* [[Lazarus art work]]
  
===General layout===
+
==Comments==
* On the bottom all required buttons to close / cancel the dialog, or to recieve help should be placed
+
=== Cross platform ===
* At least fit a screen of 800x640
+
What you need to keep in mind is the cross-platform nature of Lazarus.  If you make all the changes you suggest, the text on the buttons won't be visible in most standard GTK+ themes, or there will be other problems.  I fully support the idea of some tweaks like this, but it should be tested in Linux, Win32 and even in Mac OS X (you guys are running it in Mac OS X already, right?) before it's committed.
* Close on Escape (if key not used otherwise)
+
-[http://wiki.lazarus.freepascal.org/index.php/User:Tonymaro Tony Maro]
* Define default button and Return activates it (if key not used)
+
:That's the only way to do it ;). I have patches of the different dialogs and I would encourage people to test them and post screenshots here. - Darius
* Medium to complex dialogs should be resizable and size is stored
 
  
====Button panel====
+
=== CAFE standard ===
The button panel should consist at least of the following elements;
+
I found these ideas on form designs very interesting.  If you can, I would be grateful if you could visit http://www.nvtech.com.au/ProjCurr/CAFE/CAFE.html to read about a convention called CAFE; standing for "Common Application Front End".
  
* OK button
+
The intention of CAFE is not so much to have attractive forms but to have ones that reduce:
* Cancel button
+
* training required for application users,
* Next button (optional)
+
* effort required to input data and navigate around the application, and
* Previous button (optional)
+
* the chances of a user accidentally inputting incorrect data.
* Help button
 
  
An example is shown below:
+
The keypoints of the CAFE standard are that it requires each form to:
 +
* have a menu of options displayed (ie, not drop down menus or other hidden features)
 +
* be capable of being driven by both keyboard and pointing device with the option selection being done primarily by using numbers typed into the number pad on a conventional keyboard (tests have shown that clerks using the keyboard and number-pad are 60% faster than those that have to take their hands off a keyboard to use a pointing device.)
 +
* have a field devoted to "form help" which tells the user the purpose of the form and a field devoted to "field help" which changes as focus moves from field to field on the form.  The "field help" informs the user of the purpose of the field and the input into that field which is acceptable.
  
<center>bottom panel.jpg</center>
+
If all contractors wrote their applications to conform with the CAFE standard, not only would it ensure an application that was best for business, but it would also allow many different contractors to participate in software development with all applications having exactly the same look and feel and so giving the perception they all belonged to one coherent applications suite.  This would be good for everyone.
  
===Anchoring===
+
I hope you find these ideas interesting.
To make sure that a dialog after resizing will keep on showing the components in a good way, anchoring is being used. Each components has a property called Anchors. With this property you can determine the way a component is anchored to it's parent.
 
  
===Aligning===
+
Kevin Loughrey
Another way to organise components is using alignment. Each component has a property Align. By selecting the appropriate align position several components can be positioned properly.
 
  
====BorderSpacing====
+
CEO Non Volatile Technologies Pty Ltd
Especially usefull in combination with Align is the BorderSpacing property. (Also found on the Anchors dialog). A typical borderspacing of 6 pixels around a component is used.
 
  
==Dialogs to be converted to LFM==
+
(NVTech supports and promotes the use of Open Source Software as a means of accelerating societal advancement throughout the world.)
<strike>Striked items</strike> are already converted.
 
  
'''Bold items''' are being worked on
+
== See also ==
 +
* [http://www.lazarus.freepascal.org/list_archives/lazarus/msg08842.html Lazarus look and feel, 16 Jul 2005] Related discussions on the mailing list
  
* /lazarus/ide/addtoprojectdlg.pas
+
[[Category:Artwork]]
* /lazarus/ide/buildlazdialog.pas
+
[[Category:Guidelines]]
* /lazarus/ide/clipboardhistory.pas
+
[[Category:GUI]]
* /lazarus/ide/codetemplatedialog.pp
 
* /lazarus/ide/codetoolsdefines.pas
 
* /lazarus/ide/codetoolsoptions.pas
 
* /lazarus/ide/compileroptionsdlg.pp
 
* <strike>/lazarus/ide/diffdialog.pas</strike>
 
* /lazarus/ide/diskdiffsdialog.pas
 
* <strike>/lazarus/ide/editoroptions.pp</strike>
 
* <strike>/lazarus/ide/environmentopts.pp</strike>
 
* /lazarus/ide/exttooldialog.pas
 
* /lazarus/ide/exttooleditdlg.pas
 
* /lazarus/ide/findinfilesdlg.pas
 
* /lazarus/ide/findreplacedialog.pp
 
* /lazarus/ide/helpmanager.pas
 
* /lazarus/ide/inputfiledialog.pas
 
* /lazarus/ide/keymapping.pp
 
* /lazarus/ide/macropromptdlg.pas
 
* /lazarus/ide/mainbar.pas
 
* /lazarus/ide/makeresstrdlg.pas
 
* '''/lazarus/ide/msgview.pp'''
 
* '''/lazarus/ide/newdialog.pas'''
 
* /lazarus/ide/newprojectdlg.pp
 
* /lazarus/ide/patheditordlg.pas
 
* /lazarus/ide/projectinspector.pas
 
* /lazarus/ide/projectopts.pp
 
* '''/lazarus/ide/runparamsopts.pas'''
 
* /lazarus/ide/searchresultview.pp
 
* /lazarus/ide/sortselectiondlg.pas
 
* '''/lazarus/ide/splash.pp'''
 
* /lazarus/ide/sysvaruseroverridedlg.pas
 
* /lazarus/ide/todolist.pp
 
* /lazarus/ide/unitdependencies.pas
 
* /lazarus/ide/uniteditor.pp
 
* /lazarus/ide/unitinfodlg.pp
 
* /lazarus/ide/viewunit_dlg.pp
 
* /lazarus/debugger/debuggerdlg.pp
 
* /lazarus/debugger/test
 
* <strike>/lazarus/debugger/watchpropertydlg.pp</strike>
 
* /lazarus/designer/aligncompsdlg.pp
 
* /lazarus/designer/designermenu.pp
 
* /lazarus/designer/menueditorform.pas
 
* /lazarus/designer/menupropedit.pp
 
* /lazarus/designer/noncontrolforms.pas
 
* /lazarus/designer/objinspext.pas
 
* /lazarus/designer/scalecompsdlg.pp
 
* /lazarus/designer/sizecompsdlg.pp
 
* /lazarus/ideintf/columndlg.pp
 
* /lazarus/ideintf/componenteditors.pas
 
* /lazarus/ideintf/graphpropedits.pas
 
* /lazarus/ideintf/imagelisteditor.pp
 
* /lazarus/ideintf/listviewpropedit.pp
 
* /lazarus/ideintf/propedits.pp
 
* /lazarus/packager/addtopackagedlg.pas
 
* /lazarus/packager/brokendependenciesdlg.pas
 
* /lazarus/packager/packagedefs.pas
 
* /lazarus/packager/pkggraphexplorer.pas
 
* /lazarus/packager/pkgoptionsdlg.pas
 
* /lazarus/tools/apiwizz/apiwizard.pp
 

Latest revision as of 16:07, 10 August 2014

Deutsch (de) English (en) français (fr) 日本語 (ja)

Overview

When working on lazarus, certain design guidelines need to be taken into consideration. To prevent a diversity of styles and ensure the clarity of dialogs. This article tries to summarize these guidelines to help you designing. There is also a buch of screenshots, artwork and dialog information available.

Comments

Cross platform

What you need to keep in mind is the cross-platform nature of Lazarus. If you make all the changes you suggest, the text on the buttons won't be visible in most standard GTK+ themes, or there will be other problems. I fully support the idea of some tweaks like this, but it should be tested in Linux, Win32 and even in Mac OS X (you guys are running it in Mac OS X already, right?) before it's committed. -Tony Maro

That's the only way to do it ;). I have patches of the different dialogs and I would encourage people to test them and post screenshots here. - Darius

CAFE standard

I found these ideas on form designs very interesting. If you can, I would be grateful if you could visit http://www.nvtech.com.au/ProjCurr/CAFE/CAFE.html to read about a convention called CAFE; standing for "Common Application Front End".

The intention of CAFE is not so much to have attractive forms but to have ones that reduce:

  • training required for application users,
  • effort required to input data and navigate around the application, and
  • the chances of a user accidentally inputting incorrect data.

The keypoints of the CAFE standard are that it requires each form to:

  • have a menu of options displayed (ie, not drop down menus or other hidden features)
  • be capable of being driven by both keyboard and pointing device with the option selection being done primarily by using numbers typed into the number pad on a conventional keyboard (tests have shown that clerks using the keyboard and number-pad are 60% faster than those that have to take their hands off a keyboard to use a pointing device.)
  • have a field devoted to "form help" which tells the user the purpose of the form and a field devoted to "field help" which changes as focus moves from field to field on the form. The "field help" informs the user of the purpose of the field and the input into that field which is acceptable.

If all contractors wrote their applications to conform with the CAFE standard, not only would it ensure an application that was best for business, but it would also allow many different contractors to participate in software development with all applications having exactly the same look and feel and so giving the perception they all belonged to one coherent applications suite. This would be good for everyone.

I hope you find these ideas interesting.

Kevin Loughrey

CEO Non Volatile Technologies Pty Ltd

(NVTech supports and promotes the use of Open Source Software as a means of accelerating societal advancement throughout the world.)

See also