diff options
author | fluxgen <fluxgen> | 2003-08-19 21:28:57 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2003-08-19 21:28:57 (GMT) |
commit | 2ccb04a1db2056d49c51ed930ae20fb500bd863e (patch) | |
tree | b67854a99a29fffcae7cbaa4dfe278e3d95f0cd1 /src/Toolbar.cc | |
parent | c7dbf0dd65b318f69a5046ec909a330c74a7a8a5 (diff) | |
download | fluxbox_pavel-2ccb04a1db2056d49c51ed930ae20fb500bd863e.zip fluxbox_pavel-2ccb04a1db2056d49c51ed930ae20fb500bd863e.tar.bz2 |
fixed some theme items
Diffstat (limited to 'src/Toolbar.cc')
-rw-r--r-- | src/Toolbar.cc | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/src/Toolbar.cc b/src/Toolbar.cc index cbe5148..8d748d4 100644 --- a/src/Toolbar.cc +++ b/src/Toolbar.cc | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: Toolbar.cc,v 1.111 2003/08/16 12:10:19 fluxgen Exp $ | 25 | // $Id: Toolbar.cc,v 1.112 2003/08/19 21:28:57 fluxgen Exp $ |
26 | 26 | ||
27 | #include "Toolbar.hh" | 27 | #include "Toolbar.hh" |
28 | 28 | ||
@@ -38,6 +38,7 @@ | |||
38 | #include "I18n.hh" | 38 | #include "I18n.hh" |
39 | #include "fluxbox.hh" | 39 | #include "fluxbox.hh" |
40 | #include "Screen.hh" | 40 | #include "Screen.hh" |
41 | #include "ImageControl.hh" | ||
41 | 42 | ||
42 | #include "EventManager.hh" | 43 | #include "EventManager.hh" |
43 | #include "SimpleCommand.hh" | 44 | #include "SimpleCommand.hh" |
@@ -201,6 +202,7 @@ Toolbar::Toolbar(BScreen &scrn, FbTk::XLayer &layer, FbTk::Menu &menu, size_t wi | |||
201 | m_editing(false), | 202 | m_editing(false), |
202 | m_hidden(false), | 203 | m_hidden(false), |
203 | frame(*this, scrn.screenNumber()), | 204 | frame(*this, scrn.screenNumber()), |
205 | m_window_pm(0), | ||
204 | m_screen(scrn), | 206 | m_screen(scrn), |
205 | m_toolbarmenu(menu), | 207 | m_toolbarmenu(menu), |
206 | m_placementmenu(*scrn.menuTheme(), | 208 | m_placementmenu(*scrn.menuTheme(), |
@@ -212,6 +214,9 @@ Toolbar::Toolbar(BScreen &scrn, FbTk::XLayer &layer, FbTk::Menu &menu, size_t wi | |||
212 | this, | 214 | this, |
213 | true), | 215 | true), |
214 | m_theme(scrn.screenNumber()), | 216 | m_theme(scrn.screenNumber()), |
217 | m_clock_theme(scrn.screenNumber(), "toolbar.clock", "Toolbar.Clock"), | ||
218 | m_workspace_theme(scrn.screenNumber(), "toolbar.workspace", "Toolbar.Workspace"), | ||
219 | m_iconbar_theme(scrn.screenNumber(), "toolbar.iconbar", "Toolbar.Iconbar"), | ||
215 | m_layeritem(frame.window, layer), | 220 | m_layeritem(frame.window, layer), |
216 | m_strut(0), | 221 | m_strut(0), |
217 | // lock rcmanager here | 222 | // lock rcmanager here |
@@ -229,9 +234,6 @@ Toolbar::Toolbar(BScreen &scrn, FbTk::XLayer &layer, FbTk::Menu &menu, size_t wi | |||
229 | scrn.name() + ".toolbar.placement", scrn.altName() + ".Toolbar.Placement"), | 234 | scrn.name() + ".toolbar.placement", scrn.altName() + ".Toolbar.Placement"), |
230 | m_rc_height(scrn.resourceManager(), 0, scrn.name() + ".toolbar.height", scrn.altName() + ".Toolbar.Height"), | 235 | m_rc_height(scrn.resourceManager(), 0, scrn.name() + ".toolbar.height", scrn.altName() + ".Toolbar.Height"), |
231 | m_shape(new Shape(frame.window, 0)), | 236 | m_shape(new Shape(frame.window, 0)), |
232 | m_clock_theme(scrn.screenNumber(), "toolbar.clock", "Toolbar.Clock"), | ||
233 | m_workspace_theme(scrn.screenNumber(), "toolbar.workspace", "Toolbar.Workspace"), | ||
234 | m_iconbar_theme(scrn.screenNumber(), "toolbar.iconbar", "Toolbar.Iconbar"), | ||
235 | m_resize_lock(false) { | 237 | m_resize_lock(false) { |
236 | 238 | ||
237 | // we need to get notified when the theme is reloaded | 239 | // we need to get notified when the theme is reloaded |
@@ -289,6 +291,9 @@ Toolbar::~Toolbar() { | |||
289 | m_item_list.pop_back(); | 291 | m_item_list.pop_back(); |
290 | } | 292 | } |
291 | 293 | ||
294 | if (m_window_pm) | ||
295 | screen().imageControl().removeImage(m_window_pm); | ||
296 | |||
292 | clearStrut(); | 297 | clearStrut(); |
293 | } | 298 | } |
294 | 299 | ||
@@ -384,9 +389,19 @@ void Toolbar::reconfigure() { | |||
384 | frame.window.moveResize(frame.x, frame.y, | 389 | frame.window.moveResize(frame.x, frame.y, |
385 | frame.width, frame.height); | 390 | frame.width, frame.height); |
386 | } | 391 | } |
387 | 392 | // render frame window | |
388 | 393 | Pixmap tmp = m_window_pm; | |
389 | 394 | if (theme().toolbar().type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) { | |
395 | m_window_pm = 0; | ||
396 | frame.window.setBackgroundColor(theme().toolbar().color()); | ||
397 | } else { | ||
398 | m_window_pm = screen().imageControl().renderImage(frame.window.width(), frame.window.height(), | ||
399 | theme().toolbar()); | ||
400 | frame.window.setBackgroundPixmap(m_window_pm); | ||
401 | } | ||
402 | if (tmp) | ||
403 | screen().imageControl().removeImage(tmp); | ||
404 | |||
390 | frame.window.setBorderColor(theme().border().color()); | 405 | frame.window.setBorderColor(theme().border().color()); |
391 | frame.window.setBorderWidth(theme().border().width()); | 406 | frame.window.setBorderWidth(theme().border().width()); |
392 | frame.window.clear(); | 407 | frame.window.clear(); |