登录 用户中心() [退出] 后台管理 注册
   
您的位置: 首页 >> 程序员学前班[不再更新,只读] >> 主题: gtk 在 windows 如何选择/使用皮肤/主题(theme)     [回主站]     [分站链接]
标题
gtk 在 windows 如何选择/使用皮肤/主题(theme)
clq
浏览(0) + 2006-11-02 13:13:25 发表 编辑

关键字:


今天偶然发现 gtkthemeselector.exe 可以改变gtk程序的外观,此程序在gtk的运行环境目录中.例如: C:\Program Files\Common Files\GTK\2.0\bin

不过怎么制作 gtk 的 皮肤/主题(theme) 呢? 这是一个大问题呀.


附送更改了主题的界面一张 :)

[图片]
clq
2006-11-2 17:35:15 发表 编辑

呵呵,不用了.发现一个使用现有众多 theme 的办法.

http://www.gnope.org/forum/post-211.html
的介绍.

关键点是 1.不是所有的 theme 都能在你的当前gtk中能够使用; 2.可以通过替换 theme 引擎 dll 的方法来使用一些 theme .

3.它推荐 theme 的下载地址为
http://art.gnome.org/themes/gtk2?page=2&sort_by=date&limit=12&view=list&order=DESC

全文如下:
------------------------------------------------------
kingrs



Joined: 15 Jan 2006
Posts: 30
Location: Stafford, UK Posted: Mon Jan 16, 2006 6:19 pm Post subject: Themes using gnope distro of GTK2

I have tried to get themes using the libpixmap.dll to work in the gnope distribution and made it work.

1.
From the glade2 directory copy glade2.exe and gtkthemeselector.exe to the gnope path
ie
c:\gnope

2.
Edit C:\gnope\etc\gtk-2.0\gtkrc and change the theme
gtk-theme-name = "H2O-gtk2-Ruby"
(Important: Clear out all other lines in this file.)

3.
Download the theme from http://art.gnome.org/themes/gtk2
ie
H20-gtk2-Ruby

Put this in c:\gnope\share\themes

4.
copy the engines from the glade2 for windows to the gnope engines directory:
ie.
C:\Glade2\lib\gtk-2.0\2.4.0\engines

C:\Gnope\lib\gtk-2.0\2.4.0\engines

5.
Run glade2 to check the themes are working.
Run gtkthemeselector to change the theme

6.
Build app using gtk2 and glade.


Cheers

Rob

Back to top


karlbowden



Joined: 18 Dec 2005
Posts: 21
Location: Taree, NSW, Australia Posted: Wed Jan 18, 2006 5:34 am Post subject:

Hey rob. What version gtk did the pixmap engine you are using come from?
And if possible what site did you get it from?

I have followed your instructions, but I only see colour changes on widgets, ie. it's not using the libpixmap.dll engine.

from: gtk-win32-2.8.8-rc2.exe

I know the pixmap engine works with it's install of gtk it came with, just not dropped into gnope.

Back to top


cweiske



Joined: 08 Dec 2005
Posts: 430
Location: Leipzig/Germany Posted: Wed Jan 18, 2006 9:10 am Post subject:

karlbowden wrote:
What version gtk did the pixmap engine you are using come from?


Gnope itself installs and uses Gtk 2.6.9, if that is of any help for you.

Back to top


kingrs



Joined: 15 Jan 2006
Posts: 30
Location: Stafford, UK Posted: Wed Jan 18, 2006 10:32 am Post subject: libpixmap.dll 50kb 28/08/2003

I had to re-do this to figure out which libpixmap.dll worked, the one that comes with glade2 for windows (v2.10.0 - 29k) does not, and there is not one in the gnope 1.0 - any chance this can be included in 1.1?

Download:
http://konap.sourceforge.net/gtk-themes-win32-2003-09-01.tar.gz

6mb download, copy the libpixmap.dll engine from the
gtk-themes-win32\lib\gtk-2.0\2.2.0\engines directory to your
share\themes\gtk-2.0\2.4.0\engines

Looks like going backwards a version but it works.

let me know if this works

Rob

Back to top


kingrs



Joined: 15 Jan 2006
Posts: 30
Location: Stafford, UK Posted: Wed Jan 18, 2006 10:49 am Post subject:

This is where I found the article about it:
http://mail.gnome.org/archives/gtk-app-devel-list/2003-September/msg00009.html

Maybe someone can recompile it for gtk+ 2.4.0 ?

Back to top


kingrs



Joined: 15 Jan 2006
Posts: 30
Location: Stafford, UK Posted: Wed Jan 18, 2006 11:46 am Post subject: Correction

Sorry correct that, the dll needs to be copied from
gtk-themes-win32\lib\gtk-2.0\2.2.0\engines
to
lib\gtk-2.0\2.4.0\engines


Rob

Back to top


karlbowden



Joined: 18 Dec 2005
Posts: 21
Location: Taree, NSW, Australia Posted: Thu Jan 19, 2006 2:56 am Post subject:

That did the trick spot on.

Great work guys.

I would also put in a +1 for seeing even just the pixmap engine (50kb) included in gnope. I have it deployed to a few machines at the automotive dealership I work at, using the wimp engine on xp machines, and the pixmap engine - vista theme on others. Most users here like the conststancy.

I also add a couple of standard php modules to the gnope install - curl and sqlite (also needs pdo). Other than that great work.

Karlos

Back to top


cweiske



Joined: 08 Dec 2005
Posts: 430
Location: Leipzig/Germany Posted: Thu Jan 19, 2006 9:03 am Post subject:

karlbowden wrote:
I also add a couple of standard php modules to the gnope install - curl and sqlite (also needs pdo). Other than that great work.


I pondered long with the decision what modules to include in Gnope, but I can't include all - file size would be too big. Or doesn't that matter? 8 instead of 6 MiB?

Back to top


kingrs



Joined: 15 Jan 2006
Posts: 30
Location: Stafford, UK Posted: Thu Jan 19, 2006 10:30 am Post subject:

My additions would be:

ext\php_pdo.dll
ext\php_pdo_mysql.dll
ext\php_pdo_sqlite.dll

(total zipped size = 172k and gives mysql and sqlite support using pdo)

lib\gtk-2.0\2.4.0\engines\libpixmap.dll

share\themes\Metal\gtk-2.0\gtkrc

Set default theme in etc\gtk-2.0\gtkrc to metal

All thats needed then is to take the updated NDIS file and add the package that you need to install on the client machine, and recompile a new distro.

Back to top


cweiske



Joined: 08 Dec 2005
Posts: 430
Location: Leipzig/Germany Posted: Thu Jan 19, 2006 10:35 am Post subject:

kingrs wrote:
Set default theme in etc\gtk-2.0\gtkrc to metal


That's a wish I can't fulfill - PHP-Gtk shall look as integrated as possible, thus I chose the Wimp-Theme. One could perhaps deliver some more engines and themes, but not as default theme.

Back to top


Osiris



Joined: 17 Dec 2005
Posts: 63
Posted: Thu Jan 19, 2006 10:44 am Post subject:

cweiske wrote:

I pondered long with the decision what modules to include in Gnope, but I can't include all - file size would be too big. Or doesn't that matter? 8 instead of 6 MiB?



The Problem is, that every developer needs other packages within his application.
At the time you start to include one module, another developer has the wish to include the next module and so on.

While your gnope-PHP5-Version is the same, as the current PHP.net-Version, developers can easily download the modules they need.

I've done it so, because some PECL-Modules and Standard-modules have some nice additional features, I can use in my application

Greetings

Christian

Back to top


karlbowden



Joined: 18 Dec 2005
Posts: 21
Location: Taree, NSW, Australia Posted: Fri Jan 20, 2006 9:40 am Post subject:

I personally dont mind adding the extra modules I need, it's not too much hassel. 8 meg i dont mind to much either, i only need to download it once.

I do like wimp, but i have noticed that there are not as many icons on the default 'ok' and 'cancel' buttons etc.., but I would still use it. Looks nice and natural on xp.

clq
2006-11-2 17:38:27 发表 编辑

[图片]
它让我们下载的那个 DLL 包中还有非常多的 Themes .图中为我中意的一个,如果加以改进是可以弄出一个商业版本的.

clq
2006-11-2 17:42:45 发表 编辑

[图片]
上传一个吧.

clq
2006-11-2 17:45:26 发表 编辑

http://linuxtoy.org/archives/howto_install_theme_part_i.html#more-397

这里有一个介绍 linux 下安装的文章.听作者说准备介绍制作的方法.

guest
2006-11-2 17:56:09 发表 编辑

http://linuxtoy.org/archives/howto_install_theme_part_i.html#more-397
guest
2006-11-2 18:01:05 发表 编辑

http://developer.gnome.org/doc/API/2.0/gtk/GtkSettings.html
--------------------------------------------------
gtk_settings_set_string_property

guest
2006-11-2 18:02:09 发表 编辑

void gtk_settings_set_string_property
(GtkSettings *settings,
const gchar *name,
const gchar *v_string,
const gchar *origin);

guest
2006-11-2 18:03:50 发表 编辑

...
guest
2008-3-21 14:06:18 发表 编辑

..
abc020
2009-11-4 7:00:55 发表 编辑

谢谢。学会了。

总数:10 页次:1/1 首页 尾页  
总数:10 页次:1/1 首页 尾页  


所在合集/目录



发表评论:
文本/html模式切换 插入图片 文本/html模式切换


附件:



NEWBT官方QQ群1: 276678893
可求档连环画,漫画;询问文本处理大师等软件使用技巧;求档softhub软件下载及使用技巧.
但不可"开车",严禁国家敏感话题,不可求档涉及版权的文档软件.
验证问题说明申请入群原因即可.

Copyright © 2005-2020 clq, All Rights Reserved
版权所有
桂ICP备15002303号-1