aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-04-25 10:40:31 (GMT)
committerfluxgen <fluxgen>2003-04-25 10:40:31 (GMT)
commitdd7755ae01f04601eef1d633075cd488ff89c668 (patch)
tree58a0b900747af84d8ed1d48dd17094941b456bcc /src
parenta55326455055ecbcf901c5f6ddeedb2c2cf4f0a9 (diff)
downloadfluxbox_paul-dd7755ae01f04601eef1d633075cd488ff89c668.zip
fluxbox_paul-dd7755ae01f04601eef1d633075cd488ff89c668.tar.bz2
fixed roottheme
Diffstat (limited to 'src')
-rw-r--r--src/IconBar.cc25
1 files changed, 16 insertions, 9 deletions
diff --git a/src/IconBar.cc b/src/IconBar.cc
index 7a65b09..5de8558 100644
--- a/src/IconBar.cc
+++ b/src/IconBar.cc
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: IconBar.cc,v 1.30 2003/04/15 12:05:47 fluxgen Exp $ 22// $Id: IconBar.cc,v 1.31 2003/04/25 10:40:31 fluxgen Exp $
23 23
24#include "IconBar.hh" 24#include "IconBar.hh"
25 25
@@ -28,6 +28,7 @@
28#include "Window.hh" 28#include "Window.hh"
29#include "ImageControl.hh" 29#include "ImageControl.hh"
30#include "Text.hh" 30#include "Text.hh"
31#include "RootTheme.hh"
31 32
32#include <algorithm> 33#include <algorithm>
33 34
@@ -155,15 +156,18 @@ IconBar::WindowList *IconBar::delAllIcons() {
155/** 156/**
156 renders theme to m_focus_pm 157 renders theme to m_focus_pm
157 with the size width * height 158 with the size width * height
159
158*/ 160*/
159void IconBar::loadTheme(unsigned int width, unsigned int height) { 161void IconBar::loadTheme(unsigned int width, unsigned int height) {
162 //!! TODO: iconbar style theme
163
160 FbTk::ImageControl *image_ctrl = screen().getImageControl(); 164 FbTk::ImageControl *image_ctrl = screen().getImageControl();
161 Pixmap tmp = m_focus_pm; 165 Pixmap tmp = m_focus_pm;
162 const FbTk::Texture *texture = &(screen().getWindowStyle()->tab.l_focus); 166 const FbTk::Texture *texture = &(screen().winFrameTheme().labelFocusTexture());
163 167
164 //If we are working on a PARENTRELATIVE, change to right focus value 168 //If we are working on a PARENTRELATIVE, change to right focus value
165 if (texture->type() & FbTk::Texture::PARENTRELATIVE ) { 169 if (texture->type() & FbTk::Texture::PARENTRELATIVE ) {
166 texture = &(screen().getWindowStyle()->tab.t_focus); 170 texture = &(screen().winFrameTheme().titleFocusTexture());
167 } 171 }
168 172
169 if (texture->type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) { 173 if (texture->type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) {
@@ -183,9 +187,10 @@ void IconBar::loadTheme(unsigned int width, unsigned int height) {
183 border, border width of the window 187 border, border width of the window
184*/ 188*/
185void IconBar::decorate(Window win) { 189void IconBar::decorate(Window win) {
186 190 //!! TODO iconbar border width style
187 XSetWindowBorderWidth(m_display, win, screen().getWindowStyle()->tab.border_width); 191 XSetWindowBorderWidth(m_display, win, 1);
188 XSetWindowBorder(m_display, win, screen().getWindowStyle()->tab.border_color.pixel()); 192 XSetWindowBorder(m_display, win, BlackPixel(FbTk::App::instance()->display(),
193 screen().getScreenNumber()));
189 if (m_focus_pm) 194 if (m_focus_pm)
190 XSetWindowBackgroundPixmap(m_display, win, m_focus_pm); 195 XSetWindowBackgroundPixmap(m_display, win, m_focus_pm);
191 else 196 else
@@ -287,7 +292,9 @@ Window IconBar::createIconWindow(FluxboxWindow *fluxboxwin, Window parent) {
287 XSetWindowAttributes attrib; 292 XSetWindowAttributes attrib;
288 attrib.background_pixmap = None; 293 attrib.background_pixmap = None;
289 attrib.background_pixel = attrib.border_pixel = 294 attrib.background_pixel = attrib.border_pixel =
290 fluxboxwin->getScreen().getWindowStyle()->tab.border_color.pixel(); 295 BlackPixel(m_display,
296 screen().getScreenNumber());
297 // fluxboxwin->getScreen().getWindowStyle()->tab.border_color.pixel();
291 attrib.colormap = fluxboxwin->getScreen().colormap(); 298 attrib.colormap = fluxboxwin->getScreen().colormap();
292 attrib.override_redirect = True; 299 attrib.override_redirect = True;
293 attrib.event_mask = ButtonPressMask | ButtonReleaseMask | 300 attrib.event_mask = ButtonPressMask | ButtonReleaseMask |
@@ -315,7 +322,7 @@ void IconBar::draw(const IconBarObj * const obj, int width) const {
315 title_text_w = m_font.textWidth( 322 title_text_w = m_font.textWidth(
316 fluxboxwin->getIconTitle().c_str(), fluxboxwin->getIconTitle().size()); 323 fluxboxwin->getIconTitle().c_str(), fluxboxwin->getIconTitle().size());
317 324
318 unsigned int bevel_w = screen().getBevelWidth(); 325 unsigned int bevel_w = screen().rootTheme().bevelWidth();
319 int dx=bevel_w*2; 326 int dx=bevel_w*2;
320 327
321 // center by default 328 // center by default
@@ -338,7 +345,7 @@ void IconBar::draw(const IconBarObj * const obj, int width) const {
338 m_font.drawText( 345 m_font.drawText(
339 iconwin, 346 iconwin,
340 screen().getScreenNumber(), 347 screen().getScreenNumber(),
341 screen().getWindowStyle()->tab.l_text_focus_gc, 348 screen().winFrameTheme().labelTextFocusGC(),
342 fluxboxwin->getIconTitle().c_str(), newlen, 349 fluxboxwin->getIconTitle().c_str(), newlen,
343 dx, dy, m_vertical); 350 dx, dy, m_vertical);
344 351