[Done] 5.72 Textgadget with QT subsystem does not wrap lines

Post bugreports for the Linux version here
User avatar
Kukulkan
Addict
Addict
Posts: 1261
Joined: Mon Jun 06, 2005 2:35 pm
Location: germany
Contact:

[Done] 5.72 Textgadget with QT subsystem does not wrap lines

Post by Kukulkan »

Try this with standard subsystem (gtk) and qt subsystem.

Using GTK, the gadget looks good and wraps lines.
Using QT, it is all one line (not readable).

Image

Code: Select all

EnableExplicit

If OpenWindow(0, 0, 0, 250, 200, "TextGadget Test", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
  TextGadget(0, 0, 0,  250, 200, "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam"+
                                 "nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam"+
                                 " erat, sed diam voluptua. ")
  Repeat
    Define Event = WaitWindowEvent()
   
  Until Event = #PB_Event_CloseWindow
EndIf
I tried several workarounds using

Code: Select all

QtScript(~"gadget(0).lineWrapMode = 1;")
QtScript(~"gadget(0).wordWrapMode = 1;")
But no success in any combination.

Also, vertical alignment is wrong. I expect it to be on top (as usual with PB on other platforms).
User avatar
Kukulkan
Addict
Addict
Posts: 1261
Joined: Mon Jun 06, 2005 2:35 pm
Location: germany
Contact:

Re: [5.72] Textgadget with QT subsystem does not wrap lines

Post by Kukulkan »

I just partially solved it using

Code: Select all

QtScript(~"gadget(0).alignment = 33"); -> Qt::AlignLeft + Qt::AlignTop in decimal
QtScript(~"gadget(0).wordWrap = 1")
This aligns it to the top and left and enables wordwrap.

Still a bug...
Fred
Administrator
Administrator
Posts: 14348
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: [5.72] Textgadget with QT subsystem does not wrap lines

Post by Fred »

It looks good with your fix, is it something else missing as you said 'partially' ?
User avatar
Kukulkan
Addict
Addict
Posts: 1261
Joined: Mon Jun 06, 2005 2:35 pm
Location: germany
Contact:

Re: [5.72] Textgadget with QT subsystem does not wrap lines

Post by Kukulkan »

Hi Fred,

partially, because the Textgadget also offers #PB_Text_Center, #PB_Text_Right and #PB_Text_Border. I did not implement solutions for this.
Fred
Administrator
Administrator
Posts: 14348
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: [5.72] Textgadget with QT subsystem does not wrap lines

Post by Fred »

I see. It works for these as well.
Post Reply