aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2002-10-15 17:06:29 (GMT)
committerfluxgen <fluxgen>2002-10-15 17:06:29 (GMT)
commita72c167e9dc1958905360f9833438eadfb6fadfd (patch)
treee718d7a2042bd84e52d1e0f494597f0a6e867289 /src
parent8140009ae05dba9f5957f254f222215d1123741f (diff)
downloadfluxbox-a72c167e9dc1958905360f9833438eadfb6fadfd.zip
fluxbox-a72c167e9dc1958905360f9833438eadfb6fadfd.tar.bz2
using new font system
Diffstat (limited to 'src')
-rw-r--r--src/Tab.cc36
1 files changed, 17 insertions, 19 deletions
diff --git a/src/Tab.cc b/src/Tab.cc
index b39ca1c..9cfff4b 100644
--- a/src/Tab.cc
+++ b/src/Tab.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: Tab.cc,v 1.33 2002/09/12 14:55:11 rathnor Exp $ 22// $Id: Tab.cc,v 1.34 2002/10/15 17:06:29 fluxgen Exp $
23 23
24#include "Tab.hh" 24#include "Tab.hh"
25 25
@@ -366,7 +366,8 @@ void Tab::draw(bool pressed) const {
366 m_win->getScreen()->getWindowStyle()->tab.l_text_unfocus_gc); 366 m_win->getScreen()->getWindowStyle()->tab.l_text_unfocus_gc);
367 367
368 // Different routines for drawing rotated text 368 // Different routines for drawing rotated text
369 if ((m_win->getScreen()->getTabPlacement() == PLEFT || 369 // TODO: rotated font
370 /*if ((m_win->getScreen()->getTabPlacement() == PLEFT ||
370 m_win->getScreen()->getTabPlacement() == PRIGHT) && 371 m_win->getScreen()->getTabPlacement() == PRIGHT) &&
371 (!m_win->isShaded() && m_win->getScreen()->isTabRotateVertical())) { 372 (!m_win->isShaded() && m_win->getScreen()->isTabRotateVertical())) {
372 373
@@ -381,24 +382,21 @@ void Tab::draw(bool pressed) const {
381 m_win->frame.bevel_w, m_win->getTitle().c_str()); 382 m_win->frame.bevel_w, m_win->getTitle().c_str());
382 383
383 } else { 384 } else {
384 if (I18n::instance()->multibyte()) { // TODO: maybe move this out from here? 385 */
385 XRectangle ink, logical; 386 XClearWindow(m_display, m_tabwin);
386 XmbTextExtents(m_win->getScreen()->getWindowStyle()->tab.font.set,
387 m_win->getTitle().c_str(), m_win->getTitle().size(),
388 &ink, &logical);
389 tabtext_w = logical.width;
390 } else {
391 tabtext_w = XTextWidth(
392 m_win->getScreen()->getWindowStyle()->tab.font.fontstruct,
393 m_win->getTitle().c_str(), m_win->getTitle().size());
394 }
395 tabtext_w += (m_win->frame.bevel_w * 4);
396 387
397 DrawUtil::DrawString(m_display, m_tabwin, gc, 388 tabtext_w = m_win->getScreen()->getWindowStyle()->tab.font.textWidth(
398 &m_win->getScreen()->getWindowStyle()->tab.font, 389 m_win->getTitle().c_str(), m_win->getTitle().size());
399 tabtext_w, m_size_w, 390 tabtext_w += (m_win->frame.bevel_w * 4);
400 m_win->frame.bevel_w, m_win->getTitle().c_str()); 391
401 } 392 m_win->getScreen()->getWindowStyle()->tab.font.drawText(
393 m_tabwin,
394 m_win->getScreen()->getScreenNumber(),
395 gc,
396 m_win->getTitle().c_str(), m_win->getTitle().size(),
397 m_win->frame.bevel_w,
398 m_win->getScreen()->getWindowStyle()->tab.font.height());
399 //}
402} 400}
403 401
404//----------------------------------------------- 402//-----------------------------------------------