[patch] Accessibility fix for KUrlLabel

Jarosław Staniek js at iidea.pl
Fri Dec 23 12:21:25 GMT 2005


Hello,
Please review the attached (BC) patch before commiting (for 3.5.1, then for 4.0):

KUrlLabel has QWidget::NoFocus focus policy by default. Changing focus policy 
by hand for current implementation of the widget does not lead to drawing 
focus rect even when the widget is properly focused.

With this patch:
- QWidget::StrongFocus is the default, so applications using the widget are 
still accessible without a mouse
- focus rect obtained from widgets style is painted
- while painting, label's margin, indent and alignment is carefully taken into 
account
- default margin is set to 3 to allow appropriate drawing of the focus rect
- pressing Enter/Return keys does the same as LMB clicking

Related fix:
Layout fix for hardcoded KAboutDialog's layout geometry: setMargin(0) is 
called for URL labels.

-- 
regards / pozdrawiam,
  Jaroslaw Staniek / OpenOffice Polska

  Kexi Developer:      http://www.kexi-project.org | http://koffice.org/kexi
  Kexi Support:        http://www.kexi-project.org/support.html
  Kexi For MS Windows: http://kexi.pl/wiki/index.php/Kexi_for_MS_Windows
  KDE3, KDE4 Libraries For Developing MS Windows Applications:
                       http://www.kdelibs.com/wiki
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: kurllabel.patch
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20051223/f53220e6/attachment.ksh>


More information about the kde-core-devel mailing list