Summary: | [Dark][API] Enhance ToolItem API to support setBackground() and/or setSelectedBackground | ||
---|---|---|---|
Product: | [Eclipse Project] Platform | Reporter: | Stefan Winkler <stefan> |
Component: | SWT | Assignee: | Platform-SWT-Inbox <platform-swt-inbox> |
Status: | NEW --- | QA Contact: | |
Severity: | enhancement | ||
Priority: | P3 | CC: | arunkumar.thondapu, ericwill, gautier.desaintmartinlacaze, ipun, Lars.Vogel, lshanmug, niraj.modi, pgbakker, psuzzi, pyvesdev |
Version: | 4.5 | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
Bug Depends on: | |||
Bug Blocks: | 577357, 578260, 430162, 491531 |
Description
Stefan Winkler
2015-03-28 10:37:07 EDT
Good point there. As a code-note: For Gtk, I'd recommend to set 'background' as oppose to 'background-image' as background-image doesn't seem to be well supported by all widgets with all themes. e.g (not tested.. gtk3...) setBackgroundColor(... GdkRGB rgba) { String css ="* {\n"; if (rgba != null) { String color = gtk_rgba_to_css_string (rgba); css += "background: " + color + ";\n"; } css += "}\n"; gtk_css_provider_load_from_css (context, css); It's technically possible on Gtk3. (Not sure about gtk2). Can this be done on Win32/Cocoa? We are past API freeze for 4.6, moving bug to the 4.7 list. We are past API freeze for 4.7, moving out of 4.7. (In reply to Leo Ufimtsev from comment #1) > Good point there. > > As a code-note: > For Gtk, I'd recommend to set 'background' as oppose to 'background-image' > as background-image doesn't seem to be well supported by all widgets with > all themes. > > e.g (not tested.. gtk3...) > setBackgroundColor(... GdkRGB rgba) { > String css ="* {\n"; > if (rgba != null) { > String color = gtk_rgba_to_css_string (rgba); > css += "background: " + color + ";\n"; > } > css += "}\n"; > gtk_css_provider_load_from_css (context, css); Hey Leo, is your suggestion a viable patch? Perhaps you can post and I can test it to see if its a feasible addition for 4.8 (In reply to Ian Pun from comment #5) > Hey Leo, > > is your suggestion a viable patch? Perhaps you can post and I can test it to > see if its a feasible addition for 4.8 Maybe. My todo list at the moment is kinda long. Wouldn't get to this any time soon if at all. (In reply to Leo Ufimtsev from comment #6) > (In reply to Ian Pun from comment #5) > > Hey Leo, > > > > is your suggestion a viable patch? Perhaps you can post and I can test it to > > see if its a feasible addition for 4.8 > > Maybe. My todo list at the moment is kinda long. Wouldn't get to this any > time soon if at all. I would be willing to work on this once I return to work full time. (In reply to Eric Williams from comment #7) > I would be willing to work on this once I return to work full time. Any news on this one? Would be a great addition to the API in general, not just for the dark theme. :) |