Borders on form-elements

Leo Savernik l.savernik at aon.at
Thu Nov 18 15:19:56 GMT 2004


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.

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)?

Then some nit on the patch:

@@ -305,6 +305,15 @@ void RenderWidget::updateFromElement()
         }
         else
             m_widget->unsetPalette();
+        // Border:
+        if (m_widget->inherits("QFrame")) {

use ::qt_cast<QFrame *>(m_widget)

Otherwise, patch looks good.

>
> There are wishes for outlines as well, maybe they can be handled the same
> way.

Yeah, why not? But first try to tackle the partial border styling problem ;-)

>
> `Allan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20041118/30e75720/attachment.sig>


More information about the kfm-devel mailing list