[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-i18n-doc
Subject:    Re: Tooltips in KDE 4.2
From:       Diego Iastrubni <elcuco () kde ! org>
Date:       2008-09-21 19:54:40
Message-ID: 200809212254.40564.elcuco () kde ! org
[Download RAW message or body]

On Sunday 21 September 2008 22:42:38 Albert Astals Cid wrote:
> > In Qt3, tooltips had to be written using this notation "<qt>some
> > text</qt>". In Qt4, this is no longer needed, but it's still used widly
> > in KDE4. They told that Qt4 treats different text put in <qt> or <html>
> > tags: when putting text inside those tags the text direction will not
> > follow the widgets text-direction, but will always by LTR, and this will
> > mess up RTL environments.
>
> Any reason for that? That's just seems a bug on their side, tell them to
> fix it.
Actually, it's not a bug: its a feture, and a well designed one if you ask me. 
It gives the developer an option to control how the text will look in a very 
smart way.

The assumption is that normal richtext in applications will not use the "full 
html markup" and will just a dump of html. For example, you would put on a 
label:
	setText( "<h1>This is the <b>main</b> menu </h1>");

In this case, the label should inherit the paragraph direction from the 
QWidget::layoutDirection. Howver, if you are using a full HTML, that usually 
means you want something specific (output of applications, or very specific 
markup). 

For example, KHTML content is LTR by default, even in RTL desktops, otherwise 
you will see your page... well, to understand just type this into firefox 
while browsing kde.org (does not work on konqueror): 

javascript: document.getElementsByTagName("body")[0].setAttribute("dir","rtl")

I can paste the ofiginal text the trolls sent me. Maybe it will explain better 
the issue.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic