From: Benny M. <ben...@gm...> - 2011-02-28 20:26:02
|
Nick, Is it possible the tag code puts the color in the listviews to black for normal entries? In 3.2, the color is the correct white in my color scheme, but in trunk they are black and almost not readable (dark theme here). Benny |
From: Benny M. <ben...@gm...> - 2011-02-28 20:28:27
|
Here an example on how to obtain gtk style colors with python: https://gist.github.com/raw/74192/fbfde162b1022fe5f6c1c7644322e1df8a460a6b/wine_colors_from_gtk.py Benny 2011/2/28 Benny Malengier <ben...@gm...> > Nick, > > Is it possible the tag code puts the color in the listviews to black for > normal entries? > In 3.2, the color is the correct white in my color scheme, but in trunk > they are black and almost not readable (dark theme here). > > Benny > |
From: Nick H. <nic...@ho...> - 2011-03-01 17:15:30
Attachments:
fg_style.patch
|
Benny Malengier wrote: > Nick, > > Is it possible the tag code puts the color in the listviews to black > for normal entries? Yes, at the moment the foreground colour is defined by a column in the model. The default colour if no tag is present for the row is black. The problem is that the model is not aware of the front-end, and hence does not know what default colour to use. I think that we could write a custom handler for this in the ListView rather than using the colour from the model directly. Please would you apply the debug in the attached patched and see if the result gives a sensible colour for your scheme. Thanks, Nick. > In 3.2, the color is the correct white in my color scheme, but in > trunk they are black and almost not readable (dark theme here). > > Benny |
From: Benny M. <ben...@gm...> - 2011-03-01 20:05:39
|
The patch produces as result: #000 Which is black :-( On gramps32 the same, although I see white. If I instead use the code: self.list = gtk.TreeView() self.list.show_all() rcstyle = self.list.rc_get_style() print 'fg', self.list.style.fg[gtk.STATE_NORMAL], rcstyle.fg[gtk.STATE_NORMAL] print 'text', self.list.style.text[gtk.STATE_NORMAL], rcstyle.text[gtk.STATE_NORMAL] then I obtain fg #000 #e0c3def8dbe6 text #000 #d4bbd2f0cfde Which seems correct, as #e0c3def8dbe6 is (I think) very whitish. Benny 2011/3/1 Nick Hall <nic...@ho...> > > > Benny Malengier wrote: > >> Nick, >> >> Is it possible the tag code puts the color in the listviews to black for >> normal entries? >> > > Yes, at the moment the foreground colour is defined by a column in the > model. The default colour if no tag is present for the row is black. > > The problem is that the model is not aware of the front-end, and hence does > not know what default colour to use. > > I think that we could write a custom handler for this in the ListView > rather than using the colour from the model directly. > > Please would you apply the debug in the attached patched and see if the > result gives a sensible colour for your scheme. > > Thanks, > > > Nick. > > > > In 3.2, the color is the correct white in my color scheme, but in trunk >> they are black and almost not readable (dark theme here). >> >> Benny >> > |
From: Nick H. <nic...@ho...> - 2011-03-03 15:40:14
Attachments:
fg_color.patch
|
Benny, Actually, I may not actually have to know the colour. The attached patch uses a cell data function. Let me know if it works. Nick. Benny Malengier wrote: > The patch produces as result: > > #000 > > Which is black :-( > On gramps32 the same, although I see white. > > If I instead use the code: > > self.list = gtk.TreeView() > self.list.show_all() > rcstyle = self.list.rc_get_style() > print 'fg', self.list.style.fg[gtk.STATE_NORMAL], > rcstyle.fg[gtk.STATE_NORMAL] > print 'text', self.list.style.text[gtk.STATE_NORMAL], > rcstyle.text[gtk.STATE_NORMAL] > > then I obtain > > fg #000 > #e0c3def8dbe6 > > text #000 #d4bbd2f0cfde > > Which seems correct, as #e0c3def8dbe6 is (I think) very whitish. > > Benny > 2011/3/1 Nick Hall <nic...@ho... > <mailto:nic...@ho...>> > > > > Benny Malengier wrote: > > Nick, > > Is it possible the tag code puts the color in the listviews to > black for normal entries? > > > Yes, at the moment the foreground colour is defined by a column in > the model. The default colour if no tag is present for the row is > black. > > The problem is that the model is not aware of the front-end, and > hence does not know what default colour to use. > > I think that we could write a custom handler for this in the > ListView rather than using the colour from the model directly. > > Please would you apply the debug in the attached patched and see > if the result gives a sensible colour for your scheme. > > Thanks, > > > Nick. > > > > In 3.2, the color is the correct white in my color scheme, but > in trunk they are black and almost not readable (dark theme here). > > Benny > > |
From: Benny M. <ben...@gm...> - 2011-03-07 10:22:35
|
Yes this works. I think you can commit it after removing the commented code. Benny 2011/3/3 Nick Hall <nic...@ho...> > Benny, > > Actually, I may not actually have to know the colour. > > The attached patch uses a cell data function. > > Let me know if it works. > > Nick. > > > Benny Malengier wrote: > >> The patch produces as result: >> >> #000 >> >> Which is black :-( >> On gramps32 the same, although I see white. >> >> If I instead use the code: >> >> self.list = gtk.TreeView() >> self.list.show_all() >> rcstyle = self.list.rc_get_style() >> print 'fg', self.list.style.fg[gtk.STATE_NORMAL], >> rcstyle.fg[gtk.STATE_NORMAL] >> print 'text', self.list.style.text[gtk.STATE_NORMAL], >> rcstyle.text[gtk.STATE_NORMAL] >> >> then I obtain >> >> fg #000 #e0c3def8dbe6 >> >> text #000 #d4bbd2f0cfde >> >> Which seems correct, as #e0c3def8dbe6 is (I think) very whitish. >> >> Benny >> 2011/3/1 Nick Hall <nic...@ho... <mailto:nic...@ho... >> >> >> >> >> >> >> Benny Malengier wrote: >> >> Nick, >> >> Is it possible the tag code puts the color in the listviews to >> black for normal entries? >> >> >> Yes, at the moment the foreground colour is defined by a column in >> the model. The default colour if no tag is present for the row is >> black. >> >> The problem is that the model is not aware of the front-end, and >> hence does not know what default colour to use. >> >> I think that we could write a custom handler for this in the >> ListView rather than using the colour from the model directly. >> >> Please would you apply the debug in the attached patched and see >> if the result gives a sensible colour for your scheme. >> >> Thanks, >> >> >> Nick. >> >> >> >> In 3.2, the color is the correct white in my color scheme, but >> in trunk they are black and almost not readable (dark theme here). >> >> Benny >> >> >> |