PDA

View Full Version : Windec and RTL script



Maxilys
9th January 2006, 11:50
A user reported to me a strange bug in my windec Powder with RTL script --Hebrew in that case. I don't understand why since it works perfectly with any LTR scripts but the window width is set to zero with Hebrew. It happens only after a restart though. If the user switch from English to Hebrew without restarting KDE, the windec works normally.

I've been trying for some time to solve this problem but to no avail. I guessed there was some layout problem but all my attemps led me nowhere.

The layout I use in Powder is a QVBoxLayout() which is built this way:

mainLayout->addItem(m_topSpacer);
mainLayout->addLayout(titleLayout);
mainLayout->addItem(m_decoSpacer);
mainLayout->addLayout(midLayout);
mainLayout->addItem(m_bottomSpacer);

I modelled my layout on CDE which the user told me works fine with Hebrew. It also uses a QVBoxLayout and I create the layouts I insert in mainLayout the same way it does, e.g.:

titleLayout = new QBoxLayout(0, QBoxLayout::LeftToRight, 0, 0, 0);

After that I got lost. I don't understand the relation in between the direction of the text and the layout. If the layout is somehow bugged it should misbehave in both directions, shouldn't it?

By the way, is there an "official" way to build a layout? From top to bottom or from bottom to top. In Powder I begin with the children that I put in their parents up to the main layout. Maybe doing it the other way around --from parent to children-- would solve my RTL problem? I don't know.

Please, shed some light in my dark cave... ;-)

elcuco
19th January 2006, 19:04
can you post a link to that app...?

Maxilys
23rd February 2006, 03:25
It's been a while... I've been working on something else but solving this bug is still on my todo list.

Powder windec is on KDE-Look but I put the last version here. (http://home.tele2.fr/mxls/archives/powder-0.7.tar.bz2) It includes the last modifications I modelled on the windecs available in KDE sources... and that don't work any better.

My eternal gratitude to you or anybody who finds a cure.