View Issue Details

IDProjectCategoryView StatusLast Update
0019384LazarusWidgetsetpublic2018-11-25 11:38
Reportergitspielen Assigned ToZeljan Rikalo  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Summary0019384: TCanvas.Brush.Color problem on GTK2
DescriptionHi guys.

I already discussed this problem with Bart on the forum:
http://lazarus.freepascal.org/index.php/topic,13167.msg68590.html#msg68590

And we made a conclusion there seems to be without any problem with TMaskEdit component itself.

I guess there must be an issue with root permission:
http://lazarus.freepascal.org/index.php/topic,13167.msg68649.html#msg68649

In addition, no one gives me any suggestion with TCanvas.Brush problem yet :(

Thanks.
Additional InformationUbuntu 11.04 with Unity and GTK2 2.24.0
Korean Language pack installed.
Tested under FPC 2.4.2 + Lazarus 0.9.30 from Synaptic and trunk version via SVN.
TagsNo tags attached.
Fixed in Revision36929
LazTarget1.0
Widgetset
Attached Files

Relationships

related to 0019413 closedBart Broersma TEdit.KeyPress does not fire anymore after the first keypress (Ubuntu 11.04 GTK2) 
related to 0021863 closedZeljan Rikalo Cannot set background color for drawing text 
related to 0011958 resolvedJuha Manninen Canvas.TextOut is differ in Win32 and GTK2 implementations 

Activities

gitspielen

2011-05-25 15:04

reporter   ~0048582

The first issue is duplicated by this: http://bugs.freepascal.org/view.php?id=19413

But still the second one remained.

Flávio Etrusco

2011-08-09 11:04

developer   ~0050635

You reported the bug in the wrong project (Mantis support)...

Bart Broersma

2012-04-18 13:10

developer   ~0058716

Last edited: 2012-04-18 20:14

Quoted gitspielen from the forum:


=============================================
[quote]
secondly i wrote some texts on timage.canvas setting its brush.color for their background colors like this:

Code:
with Image1.Canvas do
begin
  Font.Color:=clRed;
  Brush.Color:=clYellow;
  Brush.Style:=bsSolid;
  TextOut(5, 5, 'blah blah');
end;

red texts on yellow displayed on windows box as i expected but only the text color changed on linux. what's wrong with that?

[/quote]
=============================================

I have adjusted the topic title to reflect the problem.

Zeljan Rikalo

2012-04-18 18:47

developer   ~0058723

Bart, please attach complete example.

Bart Broersma

2012-04-18 20:13

developer   ~0058728

@Zeljan: You should ask gitspielen.
I merely tried to clarify what this bugreport is about (the actual description was rather vague), citing his posting on the forum.

Bart Broersma

2012-04-20 10:18

developer   ~0058788

@gitspielen: please provide a sample program (sources only) demonstrating the issue.

Zeljan Rikalo

2012-04-20 12:51

developer   ~0058793

hm...qt works fine, but indeed gtk2 does not change brush bg in this case.

Zeljan Rikalo

2012-04-20 12:51

developer   ~0058794

I confirm that this is bug on gtk2.

Zeljan Rikalo

2012-04-20 12:56

developer   ~0058795

This is *workaround* atm (only for gtk2):
with Image1.Canvas do
begin
  Font.Color:=clRed;
  Brush.Color:=clYellow;
  // Brush.Style:=bsSolid; NOT NEEDED FOR TRUNK, bsSolid is already setted up
  // when Color is changed
  FillRect(3, 3, TextWidth('blah blah') + 2,TextHeight('blah') + 2);
  TextOut(5, 5, 'blah blah');
end;

Zeljan Rikalo

2012-04-20 13:43

developer   ~0058799

actually gtk2 does not respect brush state + color when drawing text.

Zeljan Rikalo

2012-04-20 13:46

developer   ~0058800

Please test and close if ok.

Issue History

Date Modified Username Field Change
2011-05-20 01:08 gitspielen New Issue
2011-05-25 15:04 gitspielen Note Added: 0048582
2011-08-09 11:04 Flávio Etrusco Note Added: 0050635
2012-04-16 11:16 Vincent Snijders Relationship added related to 0019413
2012-04-16 11:16 Vincent Snijders Project Mantis => Lazarus
2012-04-18 13:10 Bart Broersma LazTarget => -
2012-04-18 13:10 Bart Broersma Note Added: 0058716
2012-04-18 13:10 Bart Broersma Category => Widgetset
2012-04-18 13:10 Bart Broersma Summary TMaskEdit and TCanvas.Brush => TCanvas.Brush.Color problem on GTK2
2012-04-18 13:10 Bart Broersma Note Edited: 0058716
2012-04-18 13:11 Bart Broersma Note Edited: 0058716
2012-04-18 18:47 Zeljan Rikalo Note Added: 0058723
2012-04-18 20:13 Bart Broersma Note Added: 0058728
2012-04-18 20:14 Bart Broersma Note Edited: 0058716
2012-04-20 10:18 Bart Broersma Note Added: 0058788
2012-04-20 10:18 Bart Broersma Status new => feedback
2012-04-20 12:51 Zeljan Rikalo Note Added: 0058793
2012-04-20 12:51 Zeljan Rikalo Note Added: 0058794
2012-04-20 12:51 Zeljan Rikalo Status feedback => confirmed
2012-04-20 12:56 Zeljan Rikalo Note Added: 0058795
2012-04-20 13:27 Zeljan Rikalo Status confirmed => assigned
2012-04-20 13:27 Zeljan Rikalo Assigned To => Zeljan Rikalo
2012-04-20 13:43 Zeljan Rikalo Note Added: 0058799
2012-04-20 13:46 Zeljan Rikalo Fixed in Revision => 36929
2012-04-20 13:46 Zeljan Rikalo LazTarget - => 1.0
2012-04-20 13:46 Zeljan Rikalo Status assigned => resolved
2012-04-20 13:46 Zeljan Rikalo Resolution open => fixed
2012-04-20 13:46 Zeljan Rikalo Note Added: 0058800
2012-04-26 06:48 Zeljan Rikalo Relationship added related to 0021863
2018-11-25 11:38 Juha Manninen Relationship added related to 0011958