diff options
author | fluxgen <fluxgen> | 2003-08-27 18:05:12 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2003-08-27 18:05:12 (GMT) |
commit | 84c9a6a804814b46dec0c0d56e586d4edfa8ed12 (patch) | |
tree | 41c24380ebc14077a0e85391535b2fba391321b9 /src/TextTheme.cc | |
parent | 1c3ddb390bf8abd95fe26e5b32eac17b02453461 (diff) | |
download | fluxbox_pavel-84c9a6a804814b46dec0c0d56e586d4edfa8ed12.zip fluxbox_pavel-84c9a6a804814b46dec0c0d56e586d4edfa8ed12.tar.bz2 |
using FbTk GContext
Diffstat (limited to 'src/TextTheme.cc')
-rw-r--r-- | src/TextTheme.cc | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/TextTheme.cc b/src/TextTheme.cc index 3a18b4b..bebf010 100644 --- a/src/TextTheme.cc +++ b/src/TextTheme.cc | |||
@@ -20,7 +20,7 @@ | |||
20 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 20 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
21 | // DEALINGS IN THE SOFTWARE. | 21 | // DEALINGS IN THE SOFTWARE. |
22 | 22 | ||
23 | // $Id: TextTheme.cc,v 1.5 2003/08/16 11:33:13 fluxgen Exp $ | 23 | // $Id: TextTheme.cc,v 1.6 2003/08/27 18:05:12 fluxgen Exp $ |
24 | 24 | ||
25 | #include "TextTheme.hh" | 25 | #include "TextTheme.hh" |
26 | 26 | ||
@@ -33,9 +33,7 @@ TextTheme::TextTheme(FbTk::Theme &theme, | |||
33 | m_font(theme, name + ".font", altname + ".Font"), | 33 | m_font(theme, name + ".font", altname + ".Font"), |
34 | m_text_color(theme, name + ".textColor", altname + ".TextColor"), | 34 | m_text_color(theme, name + ".textColor", altname + ".TextColor"), |
35 | m_justify(theme, name + ".justify", altname + ".Justify"), | 35 | m_justify(theme, name + ".justify", altname + ".Justify"), |
36 | m_text_gc(XCreateGC(FbTk::App::instance()->display(), | 36 | m_text_gc(RootWindow(FbTk::App::instance()->display(), theme.screenNum())) { |
37 | RootWindow(FbTk::App::instance()->display(), | ||
38 | theme.screenNum()), 0, 0)) { | ||
39 | *m_justify = FbTk::LEFT; | 37 | *m_justify = FbTk::LEFT; |
40 | // set default values | 38 | // set default values |
41 | m_font->load("fixed"); | 39 | m_font->load("fixed"); |
@@ -45,15 +43,11 @@ TextTheme::TextTheme(FbTk::Theme &theme, | |||
45 | } | 43 | } |
46 | 44 | ||
47 | TextTheme::~TextTheme() { | 45 | TextTheme::~TextTheme() { |
48 | if (m_text_gc) | 46 | |
49 | XFreeGC(FbTk::App::instance()->display(), m_text_gc); | ||
50 | } | 47 | } |
51 | 48 | ||
52 | void TextTheme::update() { | 49 | void TextTheme::update() { |
53 | XGCValues gcv; | 50 | m_text_gc.setForeground(*m_text_color); |
54 | gcv.foreground = m_text_color->pixel(); | ||
55 | XChangeGC(FbTk::App::instance()->display(), m_text_gc, | ||
56 | GCForeground, &gcv); | ||
57 | } | 51 | } |
58 | 52 | ||
59 | void TextTheme::setAntialias(bool value) { | 53 | void TextTheme::setAntialias(bool value) { |