aboutsummaryrefslogtreecommitdiff
path: root/src/TextTheme.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/TextTheme.cc')
-rw-r--r--src/TextTheme.cc14
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
47TextTheme::~TextTheme() { 45TextTheme::~TextTheme() {
48 if (m_text_gc) 46
49 XFreeGC(FbTk::App::instance()->display(), m_text_gc);
50} 47}
51 48
52void TextTheme::update() { 49void 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
59void TextTheme::setAntialias(bool value) { 53void TextTheme::setAntialias(bool value) {