aboutsummaryrefslogtreecommitdiff
path: root/src/Screen.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2002-10-15 17:17:00 (GMT)
committerfluxgen <fluxgen>2002-10-15 17:17:00 (GMT)
commit3e972e83bd2716f7e5941f4ef8edcb67f4f2a3b5 (patch)
tree570346082cf5339b76767e62d205ab980245064b /src/Screen.cc
parent715f363016995cbe188e7c47d9c389c8581b9fb1 (diff)
downloadfluxbox-3e972e83bd2716f7e5941f4ef8edcb67f4f2a3b5.zip
fluxbox-3e972e83bd2716f7e5941f4ef8edcb67f4f2a3b5.tar.bz2
using new font system for labelstyle, windowstyle
Diffstat (limited to 'src/Screen.cc')
-rw-r--r--src/Screen.cc39
1 files changed, 31 insertions, 8 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index f70e6e9..4159141 100644
--- a/src/Screen.cc
+++ b/src/Screen.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: Screen.cc,v 1.73 2002/10/15 13:05:55 fluxgen Exp $ 25// $Id: Screen.cc,v 1.74 2002/10/15 17:12:23 fluxgen Exp $
26 26
27//use GNU extensions 27//use GNU extensions
28#ifndef _GNU_SOURCE 28#ifndef _GNU_SOURCE
@@ -288,7 +288,7 @@ resource(rm, screenname, altscreenname)
288 "0: 0000 x 0: 0000"); 288 "0: 0000 x 0: 0000");
289 289
290 int l = strlen(s); 290 int l = strlen(s);
291 291 /*
292 if (i18n->multibyte()) { 292 if (i18n->multibyte()) {
293 XRectangle ink, logical; 293 XRectangle ink, logical;
294 XmbTextExtents(theme->getWindowStyle().font.set, s, l, &ink, &logical); 294 XmbTextExtents(theme->getWindowStyle().font.set, s, l, &ink, &logical);
@@ -301,7 +301,10 @@ resource(rm, screenname, altscreenname)
301 301
302 geom_w = XTextWidth(theme->getWindowStyle().font.fontstruct, s, l); 302 geom_w = XTextWidth(theme->getWindowStyle().font.fontstruct, s, l);
303 } 303 }
304 304 */
305 geom_h = theme->getWindowStyle().font.height();
306 geom_w = theme->getWindowStyle().font.textWidth(s, l);
307
305 geom_w += getBevelWidth()*2; 308 geom_w += getBevelWidth()*2;
306 geom_h += getBevelWidth()*2; 309 geom_h += getBevelWidth()*2;
307 310
@@ -527,7 +530,7 @@ void BScreen::reconfigure() {
527 FBNLS::ScreenSet, FBNLS::ScreenPositionLength, 530 FBNLS::ScreenSet, FBNLS::ScreenPositionLength,
528 "0: 0000 x 0: 0000"); 531 "0: 0000 x 0: 0000");
529 int l = strlen(s); 532 int l = strlen(s);
530 533 /*
531 if (i18n->multibyte()) { 534 if (i18n->multibyte()) {
532 XRectangle ink, logical; 535 XRectangle ink, logical;
533 XmbTextExtents(theme->getWindowStyle().font.set, s, l, &ink, &logical); 536 XmbTextExtents(theme->getWindowStyle().font.set, s, l, &ink, &logical);
@@ -540,7 +543,10 @@ void BScreen::reconfigure() {
540 geom_h = theme->getWindowStyle().font.fontstruct->ascent + 543 geom_h = theme->getWindowStyle().font.fontstruct->ascent +
541 theme->getWindowStyle().font.fontstruct->descent; 544 theme->getWindowStyle().font.fontstruct->descent;
542 } 545 }
543 546 */
547 //TODO: repeat from somewhere else?
548 geom_h = theme->getWindowStyle().font.height();
549 geom_w = theme->getWindowStyle().font.textWidth(s, l);
544 geom_w += getBevelWidth()*2; 550 geom_w += getBevelWidth()*2;
545 geom_h += getBevelWidth()*2; 551 geom_h += getBevelWidth()*2;
546 552
@@ -1620,7 +1626,7 @@ void BScreen::showPosition(int x, int y) {
1620 "X: %4d x Y: %4d"), x, y); 1626 "X: %4d x Y: %4d"), x, y);
1621 1627
1622 XClearWindow(getBaseDisplay()->getXDisplay(), geom_window); 1628 XClearWindow(getBaseDisplay()->getXDisplay(), geom_window);
1623 1629 /*
1624 if (I18n::instance()->multibyte()) 1630 if (I18n::instance()->multibyte())
1625 XmbDrawString(getBaseDisplay()->getXDisplay(), geom_window, 1631 XmbDrawString(getBaseDisplay()->getXDisplay(), geom_window,
1626 theme->getWindowStyle().font.set, theme->getWindowStyle().l_text_focus_gc, 1632 theme->getWindowStyle().font.set, theme->getWindowStyle().l_text_focus_gc,
@@ -1633,7 +1639,15 @@ void BScreen::showPosition(int x, int y) {
1633 theme->getBevelWidth(), 1639 theme->getBevelWidth(),
1634 theme->getWindowStyle().font.fontstruct->ascent + 1640 theme->getWindowStyle().font.fontstruct->ascent +
1635 theme->getBevelWidth(), label, strlen(label)); 1641 theme->getBevelWidth(), label, strlen(label));
1636 1642 */
1643 theme->getWindowStyle().font.drawText(
1644 geom_window,
1645 getScreenNumber(),
1646 theme->getWindowStyle().l_text_focus_gc,
1647 label, strlen(label),
1648 theme->getBevelWidth(), theme->getBevelWidth() +
1649 theme->getWindowStyle().font.height());
1650
1637} 1651}
1638 1652
1639 1653
@@ -1664,7 +1678,7 @@ void BScreen::showGeometry(unsigned int gx, unsigned int gy) {
1664 "W: %4d x H: %4d"), gx, gy); 1678 "W: %4d x H: %4d"), gx, gy);
1665 1679
1666 XClearWindow(getBaseDisplay()->getXDisplay(), geom_window); 1680 XClearWindow(getBaseDisplay()->getXDisplay(), geom_window);
1667 1681 /*
1668 if (I18n::instance()->multibyte()) 1682 if (I18n::instance()->multibyte())
1669 XmbDrawString(getBaseDisplay()->getXDisplay(), geom_window, 1683 XmbDrawString(getBaseDisplay()->getXDisplay(), geom_window,
1670 theme->getWindowStyle().font.set, theme->getWindowStyle().l_text_focus_gc, 1684 theme->getWindowStyle().font.set, theme->getWindowStyle().l_text_focus_gc,
@@ -1677,6 +1691,15 @@ void BScreen::showGeometry(unsigned int gx, unsigned int gy) {
1677 theme->getBevelWidth(), 1691 theme->getBevelWidth(),
1678 theme->getWindowStyle().font.fontstruct->ascent + 1692 theme->getWindowStyle().font.fontstruct->ascent +
1679 theme->getBevelWidth(), label, strlen(label)); 1693 theme->getBevelWidth(), label, strlen(label));
1694 */
1695 //TODO: geom window again?! repeat
1696 theme->getWindowStyle().font.drawText(
1697 geom_window,
1698 getScreenNumber(),
1699 theme->getWindowStyle().l_text_focus_gc,
1700 label, strlen(label),
1701 theme->getBevelWidth(), theme->getBevelWidth() +
1702 theme->getWindowStyle().font.height());
1680} 1703}
1681 1704
1682 1705