Bundle-Name: %fragmentName
Bundle-SymbolicName: org.eclipse.e4.ui.swt.gtk;singleton:=true
Bundle-Version: 1.0.0.qualifier
-Fragment-Host: org.eclipse.e4.ui.css.swt
+Fragment-Host: org.eclipse.e4.ui.css.swt.theme;bundle-version="0.10.0.qualifier"
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-Vendor: %providerName
Eclipse-PlatformFilter: (osgi.ws=gtk)
Import-Package: org.eclipse.e4.core.services.events,
- org.eclipse.e4.ui.css.swt.theme,
org.osgi.service.event;version="1.3.1"
import org.osgi.service.event.Event;
import org.osgi.service.event.EventHandler;
-@SuppressWarnings("restriction")
public class DarkThemeProcessor {
@Inject
@Override
public void run() {
- OS.gdk_flush();
- OS.g_object_set(OS.gtk_settings_get_default(), "gtk-application-prefer-dark-theme".getBytes(), //$NON-NLS-1$
- isDark, 0);
- OS.g_object_notify(OS.gtk_settings_get_default(),
- "gtk-application-prefer-dark-theme".getBytes());
+ OS.setDarkThemePreferred(isDark);
}
});
}