开发者

SWT: Detect OS theme change

In SWT, I have customized the look of my CTabFolder to match the system colors, in this case using SWT.COLOR_TITLE_BACKGROUND and SWT.COLOR_TITLE_FOREGROUND. The problem is that when the user changes the OS colors (for example by switching from the Windows Classic theme to some other theme), the CTabFolder retains the old colors.

So my question is: Does anybody know how to rece开发者_运维问答ive notification when the system colors and/or the OS theme changes? (Regularly polling the system colors is something I'd like to avoid.)


You can add a listener to the Display for SWT.Settings:

display.addListener(SWT.Settings, yourListener);
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜