开发者

wx.SYS_COLOUR_WINDOW - Where do these system colours get set?

I'm looking at the source code for a wxpython application (I'm new to wx), and wanted to make a few changes to the colors used by the application - windows, tabs, etc.

What I found is that the developer had used things like:

sysTextColour = wx.SystemSettings.GetColour( wx.SYS_COLOUR_WINDOWT开发者_运维技巧EXT )
windowColor = wx.SystemSettings_GetColour(wx.SYS_COLOUR_WINDOW)

This of course makes a lot of sense, and my first preference would be to leave the code as-is, but instead change the system colors in such a way that all such toolkits will make used of them (wx, gtk, tk, etc). If "all" is a bit ambitious, then at least have all "wx" applications make use of them. My last preference would be to make changes to this code for changing the color theme.

I have no idea where to do this.

I'm running Linux, and wmii as the window manager - so unlike gnome/kde which probably give you a control panel to set these colors, wmii does not.

How would you recommend I go about making system-wide changes?


The system colours get set in different ways depending on the system type. On some systems they're hard-coded in (to wxWigets), on others they're read from information provided by the system.

I'm not entirely sure which "version" (wxGTK, wxMac, wxUniversal...) wmii would use. Certainly on wxGTK they're read from GTK. You could try theming wmii (see http://wmii.suckless.org/themes). Hopefully someone else might have more info on how to do that.

In wxPython itself though, you can either take the options SystemSettings gives you, or use your own colours, but you can't set SystemSettings in wxPython. It's read-only.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜