View Issue Details

IDProjectCategoryView StatusLast Update
0021697LazarusLCLpublic2012-04-15 21:49
ReporterVojtech Cihak Assigned ToZeljan Rikalo  
Status closedResolutionfixed 
Product Version0.9.31 (SVN) 
Summary0021697: TStaticText behaves differently in GTK2 and Qt4
DescriptionLonger text is spitted in GTK2 but not in Qt (when AutoSize=True).

I don't provide demo project because it is both design time and run time problem and easy to reproduce:

1) Add TStaticText to Form
2) Set its text (caption property) longer, like: "StaticText1gsdfgbfdsgb"
3) Set its AutoSize property to True (now Width cannot be changed).

On Qt4 text is in one line
On GTK2 it is splitted to two lines, like this:
or similar.
Additional InformationGTK2: fpc 20780 / Laz.: 36707
Qt4: Lazarus 0.9.31 r35805M FPC 2.5.1 x86_64-linux-qt

but IIRC it is older problem.
TagsNo tags attached.
Fixed in Revision36711
WidgetsetGTK 2, QT
Attached Files


has duplicate 0021698 closedZeljan Rikalo TStaticText behaves differently in GTK2 and Qt4 
related to 0021877 resolvedJuha Manninen TStaticText : bad Width with Autosize := True; 


Zeljan Rikalo

2012-04-10 15:15

developer   ~0058472

What is correct ? Seem that wordwrap is missing under qt , or it should not do any wordrapping (so gtk2 is wrong in that case).

Zeljan Rikalo

2012-04-10 15:26

developer   ~0058474

Please test and close if ok. I've enabled wordwrap on handle of TStaticText for Qt.

Vojtech Cihak

2012-04-10 15:27

reporter   ~0058475

I don't know. Someone with Windows or Carbon should write here how it behaves there.

Vojtech Cihak

2012-04-10 16:04

reporter   ~0058477

Yes, now word-wrapping works well in Qt. But I still think it is buggy in GTK.
When I set Anchor [left, top, right] (this enables me to change the Width even if AutoSize is True) the text and word-wrapping does not change.
Text like this: "StaticText1 ghf l-fdhfd l-fghl-fg l-fhgfgl glhfglh" changes on Qt (as expected) but nothing happens on GTK2.

Zeljan Rikalo

2012-04-11 13:06

developer   ~0058497

I'm afraid that it won't be easy fix for gtk2 since GtkLabel wordwrap depend on size request of widget, so that's why it's not updated as you want.

Vojtech Cihak

2012-04-15 21:49

reporter   ~0058631


Issue History

Date Modified Username Field Change
2012-04-10 14:46 Vojtech Cihak New Issue
2012-04-10 14:46 Vojtech Cihak Widgetset => GTK 2, QT
2012-04-10 15:13 Zeljan Rikalo Relationship added has duplicate 0021698
2012-04-10 15:15 Zeljan Rikalo Note Added: 0058472
2012-04-10 15:26 Zeljan Rikalo Fixed in Revision => 36711
2012-04-10 15:26 Zeljan Rikalo LazTarget => -
2012-04-10 15:26 Zeljan Rikalo Status new => resolved
2012-04-10 15:26 Zeljan Rikalo Resolution open => fixed
2012-04-10 15:26 Zeljan Rikalo Assigned To => Zeljan Rikalo
2012-04-10 15:26 Zeljan Rikalo Note Added: 0058474
2012-04-10 15:27 Vojtech Cihak Note Added: 0058475
2012-04-10 16:04 Vojtech Cihak Note Added: 0058477
2012-04-11 13:06 Zeljan Rikalo Note Added: 0058497
2012-04-15 21:49 Vojtech Cihak Status resolved => closed
2012-04-15 21:49 Vojtech Cihak Note Added: 0058631
2012-04-29 09:49 Zeljan Rikalo Relationship added related to 0021877