diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-01-23 01:44:01 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-01-23 01:44:01 +0000 |
| commit | e64d90be4d5b86a497ed8f03c6ba40512765e239 (patch) | |
| tree | f3f8cc2e621363633f4c28d54fd0a353573c394f /otk | |
| parent | 46441f7d60c008b11a170516734ae7a5932a738e (diff) | |
new render system in effect. now ot make it look right
Diffstat (limited to 'otk')
| -rw-r--r-- | otk/font.cc | 12 | ||||
| -rw-r--r-- | otk/font.hh | 6 | ||||
| -rw-r--r-- | otk/renderstyle.cc | 4 |
3 files changed, 13 insertions, 9 deletions
diff --git a/otk/font.cc b/otk/font.cc index 21b9bfb0..4fc09fcf 100644 --- a/otk/font.cc +++ b/otk/font.cc @@ -82,7 +82,7 @@ Font::~Font(void) } -unsigned int Font::measureString(const ustring &string) const +int Font::measureString(const ustring &string) const { XGlyphInfo info; @@ -93,19 +93,19 @@ unsigned int Font::measureString(const ustring &string) const XftTextExtents8(**display, _xftfont, (FcChar8*)string.c_str(), string.bytes(), &info); - return info.xOff + (_shadow ? _offset : 0); + return (signed) info.xOff + (_shadow ? _offset : 0); } -unsigned int Font::height(void) const +int Font::height(void) const { - return _xftfont->height + (_shadow ? _offset : 0); + return (signed) _xftfont->height + (_shadow ? _offset : 0); } -unsigned int Font::maxCharWidth(void) const +int Font::maxCharWidth(void) const { - return _xftfont->max_advance_width; + return (signed) _xftfont->max_advance_width; } } diff --git a/otk/font.hh b/otk/font.hh index afc36dea..16c47f27 100644 --- a/otk/font.hh +++ b/otk/font.hh @@ -57,10 +57,10 @@ public: inline const std::string &fontstring() const { return _fontstring; } - unsigned int height() const; - unsigned int maxCharWidth() const; + int height() const; + int maxCharWidth() const; - unsigned int measureString(const ustring &string) const; + int measureString(const ustring &string) const; // The RenderControl classes use the internal data to render the fonts, but // noone else needs it, so its private. diff --git a/otk/renderstyle.cc b/otk/renderstyle.cc index c1d5685e..7e8b6446 100644 --- a/otk/renderstyle.cc +++ b/otk/renderstyle.cc @@ -168,6 +168,7 @@ RenderStyle::RenderStyle(int screen, const std::string &stylefile) 0x0); _label_font = new Font(_screen, "Arial,Sans-9:bold", true, 1, 0x40); + _label_justify = RightJustify; _max_mask = new PixmapMask(); _max_mask->w = _max_mask->h = 8; @@ -208,6 +209,9 @@ RenderStyle::RenderStyle(int screen, const std::string &stylefile) display->screenInfo(_screen)->rootWindow(), data, 8, 8); } + + _bevel_width = 1; + _handle_width = 4; } RenderStyle::~RenderStyle() |
