using wimp with new php-gtk v2.0 release

View: New views
3 Messages — Rating Filter:   Alert me  

using wimp with new php-gtk v2.0 release

by kksou :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Have found 3 minor "bugs" with the new version, which I traced to be cause of using wimp in gtkrc:

1) The downward arrow for the pulldown menu is displaced to the left and to the bottom by 1 or 2 pixels.

sample code: http://www.kksou.com/php-gtk2/articles/setup-and-process-GtkComboBox.php

sample output:


Compare this with the output from beta release:


2) The downward arrow for GtkCellRendererCombo is displaced to the left by about 3 pixels and to the bottom by 1 pixel.

sample code: http://www.kksou.com/php-gtk2/articles/set-up-combobox-in-treeview-with-colors---Part-3.php

sample output:


Compare this with the output from beta release:


3) You can't set the background color of a GtkButton

sample code: http://www.kksou.com/php-gtk2/articles/set-the-background-color-of-GtkButton.php

sample output:


Compare this with the output from beta release:


I found out that if I comment out the following 3 lines in gtkrc,
  #engine "wimp"
  #{
  #}

All the above 3 problems are gone!

So apparently, it's the wimp engine that causes the 'bugs'!

I researched the net and it says when using wimp, "when running on Windows XP or 2003, the Windows theming API is used so that GTK widgets look like native widgets."

Could somebody please explain exactly what difference in widgets do we see between using and NOT using wimp?

I replaced
        engine "wimp"
        {
        }
by
        font_name = "tahoma 8"
in gtkrc

From what I see, all widgets looked exactly the same - whether it's using wimp or not. This is true for all widgets - be it GtkButtons, GtkComboBox, GtkMenu or GtkToolbar. I really don't see any difference between using and not using wimp in php-gtk.

So what do they mean by "GTK widgets look like native widgets"? What are the missing 'features' if we don't use the wimp engine on windows platform?

Regards,
/kksou

Re: using wimp with new php-gtk v2.0 release

by Elizabeth M Smith :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

kksou wrote:
> Hi,
>
> Have found 3 minor "bugs" with the new version, which I traced to be cause
> of using wimp in gtkrc:


Once again, these are NOT bugs in PHP-GTK2 but rather bugs in the GTK
library itself.  You can work around them by using the old wimp engine
dll from the beta, but since they are different builds you may get
random crashes.

What does the "wimp" theme do?  It uses the windows themeing instead of
the flat gtk default look.

http://callicore.net/wimp.jpg - with wimp
http://callicore.net/nowimp.jpg - without wimp

If you remove the gtkrc file from the new release and you're still
getting the "pretty" theming, it means you have another version of the
libwimp.dll somewhere in your PATH, or you have an alternate gtkrc file
somewhere on your system (GTK will look for one in your user profile
directory)

Elizabeth Smith


--
PHP-GTK General Mailing List (http://gtk.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: using wimp with new php-gtk v2.0 release

by kksou :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Elizabeth M Smith wrote:
What does the "wimp" theme do?  It uses the windows themeing instead of
the flat gtk default look.

http://callicore.net/wimp.jpg - with wimp
http://callicore.net/nowimp.jpg - without wimp
Hi Elizabeth,

Thanks much for the screenshots. A picture is worth a thousand words. They clearly explain the effect of using wimp.

Elizabeth M Smith wrote:
If you remove the gtkrc file from the new release and you're still
getting the "pretty" theming, it means you have another version of the
libwimp.dll somewhere in your PATH, or you have an alternate gtkrc file
somewhere on your system (GTK will look for one in your user profile
directory)
This is useful info. Now I understand why I don't see any difference between using and not using wimp.

Thanks and Regards,
/kksou