Borders on form-elements

Allan Sandfeld Jensen kde at carewolf.com
Thu Nov 18 17:23:48 GMT 2004


On Thursday 18 November 2004 16:19, Leo Savernik wrote:
> Am Donnerstag, 18. November 2004 15:06 schrieb Allan Sandfeld Jensen:
> > Hi again
> >
> > I've implemented some quick support for CSS-borders on some form-element
> > (textarea, lineedit, filebutton and label). Inorder not to lose native
> > "borders" painted by the widget-style. I've introduced a new border-type
> > called -khtml-native, which is painted only if set on all four borders.
> > When any other border is set, the native border is hidden in Qt and a
> > CSS-border painted instead.
>
> *Thank you!* One item to tick off on my todo list :-)
>
> > It seems safe now, but just wan't to make sure noone thinks it might
> > interfere with borders on any other elements.
>
> Did you check border-collapse? It is very picky about the order of the
> border styles.
>
I have given BNATIVE the lowest collapse order, and it is treated as BNONE if 
set for anything other than widgets. 

> When issuing
>
> input { border-bottom: none; }
>
> and leaving the rest, then the top, right and left borders are painted
> natively in IE. What does khtml do in such a case (how is a -khtml-native
> style border be painted by paintBorders)?
>
It is not rendered by paintBorder, but by paintWidget. Therefor the only way 
to change it is to change the style(QFrame::Shape) of the entire frame, and 
since Qt does not have partial frames, we cannot paint it partially (short of 
extending KStyle, and implement partial frames in all the KDE styles).

`Allan




More information about the kfm-devel mailing list