[Dillo-dev] change FLTK scheme for in dillo2

Johannes Hofmann Johannes.Hofmann at gmx.de
Thu May 14 20:49:01 CEST 2009


On Thu, May 14, 2009 at 10:32:25AM -0400, Jorge Arellano Cid wrote:
> On Wed, May 13, 2009 at 10:46:36PM +0200, Johannes Hofmann wrote:
> > On Wed, May 13, 2009 at 04:33:26PM -0400, Jorge Arellano Cid wrote:
> > > On Wed, May 13, 2009 at 07:11:10PM +0200, Johannes Hofmann wrote:
> > > > On Wed, May 13, 2009 at 01:02:22PM -0400, Jorge Arellano Cid wrote:
> > > > > On Mon, May 11, 2009 at 12:18:34AM +0200, Johannes Hofmann wrote:
> > > > > > On Fri, May 08, 2009 at 12:37:50AM +0200, Johannes Hofmann wrote:
> > > > > > > On Thu, May 07, 2009 at 03:44:19PM +0000, corvid wrote:
> > > > > > > > IL'dar wrote:
> > > > > > > > > Can I change colours of dialogues and scrollbar in dillo2?
> > > > > > > > > I would like to gets something less bright.
> > > > > > > > > Even something like fluid2's -bg option will be ok.
> > > > > > > > 
> > > > > > > > Not currently.
> > > > > > > > 
> > > > > > > > I would not necessarily be opposed to making ui_fg and ui_bg prefs and
> > > > > > > > adding a bunch of [class]::default_style->[whatever]color()
> > > > > > > > to dillo.cc, although I wouldn't be surprised if we ran into our
> > > > > > > > share of places where fltk hardcodes things to, say, GRAY75.
> > > > > > > 
> > > > > > > What do people think about reading X resources as in attached patch
> > > > > > > (mainly copied from commented fltk2 code)?
> > > > > > > It allows to specify e.g.
> > > > > > > 
> > > > > > > dillo.background:red
> > > > > > > dillo.foreground:white
> > > > > > > 
> > > > > > > in your .Xdefaults 
> > > > > > 
> > > > > > Jorge, what do you think about this. I actually like it more and
> > > > > > more after using it for some days.
> > > > > 
> > > > >   The ability to set colors as a theme is a good one.
> > > > > Unfortunately I've tried the patch here and saw no difference.
> > > > > Am I doing something wrong? (Just applied the patch and set my
> > > > > ~/.Xdefaults to what you suggested. No difference in "open file",
> > > > > nor "web search" dialogs).
> > > > 
> > > > Hm, did you restart X or use xrdb -merge to load the new config?
> > > >
> > > > You could also set the colors for all clients like this:
> > > > 
> > > > *foreground:            #ffffff
> > > > *background:            #555555
> > > > *selectForeground:      #000000
> > > > *selectBackground:      orange
> > > > *cursorColor:           orange
> > > > 
> > > > 
> > > > and verify that other programs (e.g. xterm) have the color set properly.
> > > 
> > >   Logged out into GDM, and also tried rebooting with the suggested
> > > file and nothing happens.
> > > 
> > >   xserver-xorg-core Version: 2:1.6.0-0ubuntu14 (Jaunty)
> > 
> > Weird. Can you try "xrdb -merge ~/.Xdefaults" with the settings
> > above and then start an xterm?
> 
>   Here,  for  some  reason, xterm didn't react to *foreground nor
> *background,  but  honored  "*cursorColor". At the same time Xpdf
> reacted to *background though.

Hm, maybe you have xterm specific resources set somewhere in your
system. I guess these would overwrite the wildcard ones.
With "appres xterm" you can get all matching resources for
"xterm".

> 
>   Sometimes dillo changed its colors after a "xrdb -merge ~/.Xdefaults".
> Others  a  xserver  restart  was  needed.  In  a  nutshell, here,
> sometimes it works, and sometimes it doesn't.

Very strange. The X resources mechanism is quite old and normally
works reliably.

> 
>   That,  and  considering  dillo  running  native in OSX, left me
> wondering why not just making theme-colors plain dillorc options.
> AFAIS it would work more reliably and in more platforms.

I strongly prefer to use the standard mechanism for theming on each
platform. On X11 this is X resources.
That way you can consistently theme all your applications (at least the
well behaved ones) with just a few lines in a central file.
Also I think it is a great advantage of X resources that they are
stored server side.
So even applictions that are running remotely will use the
consistent set of colors.

Nevertheless I agree that this theme code actually  belongs in the
fltk library. I can try to send a patch to the fltk list that
reenables the currently commented out X resources code.

Cheers,
Johannes



More information about the Dillo-dev mailing list