View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0008684 | Lazarus | Widgetset | public | 2007-04-13 06:06 | 2008-07-10 01:00 |
Reporter | Jay Binks | Assigned To | Felipe Monteiro de Carvalho | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 0.9.23 (SVN) | ||||
Fixed in Version | 0.9.25 (SVN) | ||||
Summary | 0008684: GTK2 TEdit color Strange behaviour | ||||
Description | TEdit ( and others ?? ) on GTK2 ( linux ) dosnt respond to clWindow, clBtnface etc but does to clRed, clGreen or Hex format colors $00BBGGRR kinda strange hey ..... | ||||
Tags | gtk2 | ||||
Fixed in Revision | 14834 | ||||
LazTarget | 1.2 | ||||
Widgetset | GTK 2 | ||||
Attached Files |
|
related to | 0008708 | closed | Felipe Monteiro de Carvalho | GTK2 - TEdit - Cant change font color |
related to | 0008942 | closed | Jesus Reyes | Panel not undestand color clBtnFace |
|
when I change the color of the TEdit control, the SELECTION Color is changed also... to be the same as the edit.color meaning if I set edit.color := clwhite then the selection is drawn as clwhite also. after modifying the edit.color there is no way to make it paint properly again. so effectivly the only way to make sure a TEdit draws correctly is to not edit the edit.color property. |
|
Interesting to note is that if I use this code to change the color ( instead of TEdit.color := clBlue ) the color change then works as expected. function myAllocGDKColor(const AColor: LongInt): TGDKColor; begin with Result do begin Red := ((AColor shl 8) and $00FF00) or ((AColor ) and $0000FF); Green := ((AColor ) and $00FF00) or ((AColor shr 8 ) and $0000FF); Blue := ((AColor shr 8) and $00FF00) or ((AColor shr 16) and $0000FF); end; gdk_colormap_alloc_color(gdk_colormap_get_system, @Result, False, True); end; procedure set_TextViewColor( aTextView : TCustomEdit; aColor : Tcolor ); var lTextView : PGtkTextView; lGdkColor : TGDKColor; begin lTextView := GTK_TEXT_VIEW( GetWidgetInfo( PGtkWidget( TCustomEdit( aTextView ).Handle ), false )^.CoreWidget ); lGdkColor := myAllocGDKColor( aColor ); gtk_widget_modify_base ( pGtkWidget( lTextView ), GTK_STATE_NORMAL, @lGdkColor); end; |
|
Fixed. Documented here: http://wiki.lazarus.freepascal.org/GTK2_Interface#Done:_System_Colors |
Date Modified | Username | Field | Change |
---|---|---|---|
2007-04-13 06:06 | Jay Binks | New Issue | |
2007-04-13 06:06 | Jay Binks | Widgetset | => GTK 2 |
2007-04-13 14:39 | Vincent Snijders | LazTarget | => 1.2 |
2007-04-13 14:39 | Vincent Snijders | Status | new => acknowledged |
2007-04-18 01:12 | Jay Binks | Note Added: 0012257 | |
2007-12-18 05:31 | Jay Binks | Note Added: 0016783 | |
2007-12-18 06:12 | Jesus Reyes | Relationship added | related to 0008942 |
2008-04-12 12:42 | Felipe Monteiro de Carvalho | Tag Attached: gtk2 | |
2008-04-15 17:17 | Felipe Monteiro de Carvalho | Relationship added | related to 0008708 |
2008-04-15 17:18 | Felipe Monteiro de Carvalho | Status | acknowledged => confirmed |
2008-04-15 17:18 | Felipe Monteiro de Carvalho | Status | confirmed => assigned |
2008-04-15 17:18 | Felipe Monteiro de Carvalho | Assigned To | => Felipe Monteiro de Carvalho |
2008-04-15 19:22 | Felipe Monteiro de Carvalho | Fixed in Revision | => 14834 |
2008-04-15 19:22 | Felipe Monteiro de Carvalho | Status | assigned => resolved |
2008-04-15 19:22 | Felipe Monteiro de Carvalho | Fixed in Version | => 0.9.25 (SVN) |
2008-04-15 19:22 | Felipe Monteiro de Carvalho | Resolution | open => fixed |
2008-04-15 19:22 | Felipe Monteiro de Carvalho | Note Added: 0018824 | |
2008-07-10 01:00 | Marc Weustink | Status | resolved => closed |