aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authornacitar sevaht <nacitar@ubercpp.com>2011-05-16 20:05:30 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2011-05-16 20:09:57 (GMT)
commit822c02e96a88a90540fa622afa5ab196b9ba5a7c (patch)
tree524151895e0c1686db11ec736bdb7e93d77119e9 /src
parentfd6fbb80e7a6c1d62d696a4f598edc1101b13194 (diff)
downloadfluxbox_pavel-822c02e96a88a90540fa622afa5ab196b9ba5a7c.zip
fluxbox_pavel-822c02e96a88a90540fa622afa5ab196b9ba5a7c.tar.bz2
TextDialog now handles parentrelative labels
Prior to this patch, TextDialog did not handle parentrelative labels; borrowing code from OSDWindow, now TextDialog properly handles this. Eventually, I plan to combine the good parts of TextDialog and OSDWindow into OSDWindow, and then let TextDialog derive from OSDWindow... but for now, here's the band-aid fix for the issue without the refactorization.
Diffstat (limited to 'src')
-rw-r--r--src/TextDialog.cc31
1 files changed, 20 insertions, 11 deletions
diff --git a/src/TextDialog.cc b/src/TextDialog.cc
index dc35dbe..f86c1e6 100644
--- a/src/TextDialog.cc
+++ b/src/TextDialog.cc
@@ -135,19 +135,28 @@ void TextDialog::keyPressEvent(XKeyEvent &event) {
135} 135}
136 136
137void TextDialog::render() { 137void TextDialog::render() {
138 Pixmap tmp = m_pixmap; 138 if (m_screen.focusedWinFrameTheme()->iconbarTheme().texture().type() &
139 if (!m_screen.focusedWinFrameTheme()->iconbarTheme().texture().usePixmap()) { 139 FbTk::Texture::PARENTRELATIVE) {
140 m_label.setBackgroundColor(m_screen.focusedWinFrameTheme()->iconbarTheme().texture().color()); 140 if (!m_screen.focusedWinFrameTheme()->titleTexture().usePixmap()) {
141 m_pixmap = 0; 141 m_pixmap = None;
142 m_label.setBackgroundColor(m_screen.focusedWinFrameTheme()->titleTexture().color());
143 } else {
144 m_pixmap = m_screen.imageControl().renderImage(m_label.width(), m_label.height(),
145 m_screen.focusedWinFrameTheme()->titleTexture());
146 m_label.setBackgroundPixmap(m_pixmap);
147 }
142 } else { 148 } else {
143 m_pixmap = m_screen.imageControl().renderImage(m_label.width(), m_label.height(), 149 if (!m_screen.focusedWinFrameTheme()->iconbarTheme().texture().usePixmap()) {
144 m_screen.focusedWinFrameTheme()->iconbarTheme().texture()); 150 m_pixmap = None;
145 m_label.setBackgroundPixmap(m_pixmap); 151 m_label.setBackgroundColor(m_screen.focusedWinFrameTheme()->iconbarTheme().texture().color());
152 } else {
153 m_pixmap = m_screen.imageControl().renderImage(m_label.width(), m_label.height(),
154 m_screen.focusedWinFrameTheme()->iconbarTheme().texture());
155 m_label.setBackgroundPixmap(m_pixmap);
156 }
146 } 157 }
147 158 if (m_pixmap)
148 if (tmp) 159 m_screen.imageControl().removeImage(m_pixmap);
149 m_screen.imageControl().removeImage(tmp);
150
151} 160}
152 161
153void TextDialog::init() { 162void TextDialog::init() {