本文整理了Java中org.eclipse.swt.widgets.ToolBar.gtk_css_provider_load_from_css()
方法的一些代码示例,展示了ToolBar.gtk_css_provider_load_from_css()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ToolBar.gtk_css_provider_load_from_css()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.ToolBar
类名称:ToolBar
方法名:gtk_css_provider_load_from_css
暂无
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
void restoreBackground () {
/*
* We need to restore the cached background color in order to prevent
* setting the foreground color from overriding the background color
* (or replacing it with black).
*/
int /*long*/ context = OS.gtk_widget_get_style_context(handle);
String finalCss = display.gtk_css_create_css_color_string (this.cssBackground, cssForeground, SWT.BACKGROUND);
gtk_css_provider_load_from_css (context, finalCss);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
void restoreBackground () {
/*
* We need to restore the cached background color in order to prevent
* setting the foreground color from overriding the background color
* (or replacing it with black).
*/
long /*int*/ context = OS.gtk_widget_get_style_context(handle);
String finalCss = display.gtk_css_create_css_color_string (this.cssBackground, cssForeground, SWT.BACKGROUND);
gtk_css_provider_load_from_css (context, finalCss);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
void restoreBackground () {
/*
* We need to restore the cached background color in order to prevent
* setting the foreground color from overriding the background color
* (or replacing it with black).
*/
int /*long*/ context = OS.gtk_widget_get_style_context(handle);
String finalCss = display.gtk_css_create_css_color_string (this.cssBackground, cssForeground, SWT.BACKGROUND);
gtk_css_provider_load_from_css (context, finalCss);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
@Override
void setBackgroundColor (int /*long*/ context, int /*long*/ handle, GdkRGBA rgba) {
if (OS.GTK_VERSION >= OS.VERSION(3, 16, 0)) {
// Form background string
String name = OS.GTK_VERSION >= OS.VERSION(3, 20, 0) ? "toolbar" : "GtkToolbar";
String css = name + " {background-color: " + display.gtk_rgba_to_css_string(rgba) + "}";
// Cache background color
this.cssBackground = css;
// Apply background color and any foreground color
String finalCss = display.gtk_css_create_css_color_string (cssBackground, cssForeground, SWT.BACKGROUND);
gtk_css_provider_load_from_css(context, finalCss);
} else {
super.setBackgroundColor(context, handle, rgba);
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
@Override
void setBackgroundColor (long /*int*/ context, long /*int*/ handle, GdkRGBA rgba) {
if (OS.GTK_VERSION >= OS.VERSION(3, 16, 0)) {
// Form background string
String name = OS.GTK_VERSION >= OS.VERSION(3, 20, 0) ? "toolbar" : "GtkToolbar";
String css = name + " {background-color: " + display.gtk_rgba_to_css_string(rgba) + "}";
// Cache background color
this.cssBackground = css;
// Apply background color and any foreground color
String finalCss = display.gtk_css_create_css_color_string (cssBackground, cssForeground, SWT.BACKGROUND);
gtk_css_provider_load_from_css(context, finalCss);
} else {
super.setBackgroundColor(context, handle, rgba);
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
@Override
void setBackgroundColor (int /*long*/ context, int /*long*/ handle, GdkRGBA rgba) {
if (OS.GTK_VERSION >= OS.VERSION(3, 16, 0)) {
// Form background string
String name = OS.GTK_VERSION >= OS.VERSION(3, 20, 0) ? "toolbar" : "GtkToolbar";
String css = name + " {background-color: " + display.gtk_rgba_to_css_string(rgba) + "}";
// Cache background color
this.cssBackground = css;
// Apply background color and any foreground color
String finalCss = display.gtk_css_create_css_color_string (cssBackground, cssForeground, SWT.BACKGROUND);
gtk_css_provider_load_from_css(context, finalCss);
} else {
super.setBackgroundColor(context, handle, rgba);
}
}
内容来源于网络,如有侵权,请联系作者删除!