FW: Strange coloring for GTK build

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

FW: Strange coloring for GTK build

Larson, David
I sent this just as the mail server died. Resending....

-----Original Message-----
From: Larson, David
Sent: Monday, June 11, 2007 12:22 PM
To: vim-dev
Subject: Strange coloring for GTK build

Hi all,

When I compile the sources for the GTK gui some of the colors do not
turn out right. I've attached a screen clipping showing the two builds.
The one on the left is a MOTIF gui, the one on the right is GTK. Notice
the differences for SpecialKey, NonText, Directory, LineNr, WarningMsg,
to name a few and some of the colors are correct, like ErrorMsg and
Search. Also notice that the FireBrick color turns out correctly for
ErrorMsg, but it is blue for WarningMsg, then it is correct again for
SpellBad.

The GTK build info follows:

:version
VIM - Vi IMproved 7.1 (2007 May 12, compiled Jun 11 2007 11:56:48)
Included patches: 1
[...]
Big version with GTK2 GUI.  Features included (+) or not (-):
[...]
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK
-I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I
/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/X11R6/include
-I/usr/include/freetype2 -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include     -g -O2  -I/usr/X11R6/include
Linking: gcc  -L/usr/X11R6/lib   -L/usr/local/lib -o vim
-Wl,--export-dynamic -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.
0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0
-lgobject-2.0 -lgmodule-2.0 -lglib-2.0   -lXt -lncurs
es -lacl -lgpm

And here is the Motif build:

:version
VIM - Vi IMproved 7.1 (2007 May 12, compiled Jun  7 2007 14:24:37)
Included patches: 1
[...]
Big version with X11-Motif GUI.  Features included (+) or not (-):
[...]
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MOTIF
-DFUNCPROTO=15 -DNARROWPROTO -I/usr/X11R6/include
 -g -O2  -I/usr/X11R6/include
Linking: gcc -L/usr/X11R6/lib -L/usr/X11R6/lib   -L/usr/local/lib -o vim
-lXext -lXm -lXpm -lncurses -lacl -lgpm

Can anyone help me out?

Thanks!
David

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---


GTKcolor.jpg (402K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: Strange coloring for GTK build

Larson, David
Here is a better picture showing the problem for gtk2. This is what the
color test shows.

Notice that setting the color as the foreground does not always match
the color when it is set as the background. Especially for the red and
blues. Any ideas on how to fix this?

> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On
Behalf

> Of Larson, David
> Sent: Friday, July 20, 2007 2:28 PM
> To: [hidden email]
> Subject: FW: Strange coloring for GTK build
>
> I sent this just as the mail server died. Resending....
>
> -----Original Message-----
> From: Larson, David
> Sent: Monday, June 11, 2007 12:22 PM
> To: vim-dev
> Subject: Strange coloring for GTK build
>
> Hi all,
>
> When I compile the sources for the GTK gui some of the colors do not
> turn out right. I've attached a screen clipping showing the two
builds.
> The one on the left is a MOTIF gui, the one on the right is GTK.
Notice
> the differences for SpecialKey, NonText, Directory, LineNr,
WarningMsg,

> to name a few and some of the colors are correct, like ErrorMsg and
> Search. Also notice that the FireBrick color turns out correctly for
> ErrorMsg, but it is blue for WarningMsg, then it is correct again for
> SpellBad.
>
> The GTK build info follows:
>
> :version
> VIM - Vi IMproved 7.1 (2007 May 12, compiled Jun 11 2007 11:56:48)
> Included patches: 1
> [...]
> Big version with GTK2 GUI.  Features included (+) or not (-):
> [...]
> Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK
> -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I
> /usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/X11R6/include
> -I/usr/include/freetype2 -I/usr/include/glib-2.0
> -I/usr/lib/glib-2.0/include     -g -O2  -I/usr/X11R6/include
> Linking: gcc  -L/usr/X11R6/lib   -L/usr/local/lib -o vim
> -Wl,--export-dynamic -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.
> 0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0
> -lgobject-2.0 -lgmodule-2.0 -lglib-2.0   -lXt -lncurs
> es -lacl -lgpm
>
> And here is the Motif build:
>
> :version
> VIM - Vi IMproved 7.1 (2007 May 12, compiled Jun  7 2007 14:24:37)
> Included patches: 1
> [...]
> Big version with X11-Motif GUI.  Features included (+) or not (-):
> [...]
> Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MOTIF
> -DFUNCPROTO=15 -DNARROWPROTO -I/usr/X11R6/include
>  -g -O2  -I/usr/X11R6/include
> Linking: gcc -L/usr/X11R6/lib -L/usr/X11R6/lib   -L/usr/local/lib -o
vim
> -lXext -lXm -lXpm -lncurses -lacl -lgpm
>
> Can anyone help me out?
>
> Thanks!
> David
>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---


colortest.jpg (166K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Strange coloring for GTK build

Tony Mechelynck

Larson, David wrote:
> Here is a better picture showing the problem for gtk2. This is what the
> color test shows.
>
> Notice that setting the color as the foreground does not always match
> the color when it is set as the background. Especially for the red and
> blues. Any ideas on how to fix this?

Many text consoles, including the Windows console, have only 8 background
colors as opposed to 16 foreground colors. In that case, trying to set a
"bright" color as the background will fail. For instance, trying to set a red
background will give "dark red" which is usually a kind of dark reddish brown,
more /lie-de-vin/ than true dark red.

To see all the terminal names in your system's terminfo library in
alphabetical order, use

        toe|sort|less

at the shell prompt. You may try setting 'term' and/or $TERM to one of them
(with caution) to see if the result is better.


Best regards,
Tony.
--
As I was going up Punch Card Hill,
        Feeling worse and worser,
There I met a C.R.T.
        And it drop't me a cursor.

C.R.T., C.R.T.,
        Phosphors light on you!
If I had fifty hours a day
        I'd spend them all at you.

                -- Uncle Colonel's Cursory Rhymes

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

RE: Strange coloring for GTK build

Larson, David

> Larson, David wrote:
> > Here is a better picture showing the problem for gtk2. This is what
the
> > color test shows.
> >
> > Notice that setting the color as the foreground does not always
match
> > the color when it is set as the background. Especially for the red
and
> > blues. Any ideas on how to fix this?
>
> Many text consoles, including the Windows console, have only 8
background
> colors as opposed to 16 foreground colors. In that case, trying to set
a
> "bright" color as the background will fail. For instance, trying to
set a
> red
> background will give "dark red" which is usually a kind of dark
reddish
> brown,
> more /lie-de-vin/ than true dark red.

Actually, that isn't what is happening here. The colors aren't a little
off, they are completely wrong. The "red" foreground is blue and the
"blue" foreground is red. Strangely, the background colors are
correct...

David

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Strange coloring for GTK build

Tony Mechelynck

Larson, David wrote:

>> Larson, David wrote:
>>> Here is a better picture showing the problem for gtk2. This is what
> the
>>> color test shows.
>>>
>>> Notice that setting the color as the foreground does not always
> match
>>> the color when it is set as the background. Especially for the red
> and
>>> blues. Any ideas on how to fix this?
>> Many text consoles, including the Windows console, have only 8
> background
>> colors as opposed to 16 foreground colors. In that case, trying to set
> a
>> "bright" color as the background will fail. For instance, trying to
> set a
>> red
>> background will give "dark red" which is usually a kind of dark
> reddish
>> brown,
>> more /lie-de-vin/ than true dark red.
>
> Actually, that isn't what is happening here. The colors aren't a little
> off, they are completely wrong. The "red" foreground is blue and the
> "blue" foreground is red. Strangely, the background colors are
> correct...
>
> David

Then your system may be confusing "MS-DOS" colours with "X" colours, see
":help highlight-cterm" and in particular ":help cterm-colors". You may still
try playing with the $TERM environment variable (before starting Vim) and see
if it behaves better. Use something that's not too different from the actual
terminal you're using.


Best regards,
Tony.
--
What garlic is to food, insanity is to art.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---