all repos — fluxbox @ 822c02e96a88a90540fa622afa5ab196b9ba5a7c

custom fork of the fluxbox windowmanager

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.
nacitar sevaht nacitar@ubercpp.com
commit

822c02e96a88a90540fa622afa5ab196b9ba5a7c

parent

fd6fbb80e7a6c1d62d696a4f598edc1101b13194

1 files changed, 20 insertions(+), 11 deletions(-)

jump to
M src/TextDialog.ccsrc/TextDialog.cc

@@ -135,19 +135,28 @@

} void TextDialog::render() { - Pixmap tmp = m_pixmap; - if (!m_screen.focusedWinFrameTheme()->iconbarTheme().texture().usePixmap()) { - m_label.setBackgroundColor(m_screen.focusedWinFrameTheme()->iconbarTheme().texture().color()); - m_pixmap = 0; + if (m_screen.focusedWinFrameTheme()->iconbarTheme().texture().type() & + FbTk::Texture::PARENTRELATIVE) { + if (!m_screen.focusedWinFrameTheme()->titleTexture().usePixmap()) { + m_pixmap = None; + m_label.setBackgroundColor(m_screen.focusedWinFrameTheme()->titleTexture().color()); + } else { + m_pixmap = m_screen.imageControl().renderImage(m_label.width(), m_label.height(), + m_screen.focusedWinFrameTheme()->titleTexture()); + m_label.setBackgroundPixmap(m_pixmap); + } } else { - m_pixmap = m_screen.imageControl().renderImage(m_label.width(), m_label.height(), - m_screen.focusedWinFrameTheme()->iconbarTheme().texture()); - m_label.setBackgroundPixmap(m_pixmap); + if (!m_screen.focusedWinFrameTheme()->iconbarTheme().texture().usePixmap()) { + m_pixmap = None; + m_label.setBackgroundColor(m_screen.focusedWinFrameTheme()->iconbarTheme().texture().color()); + } else { + m_pixmap = m_screen.imageControl().renderImage(m_label.width(), m_label.height(), + m_screen.focusedWinFrameTheme()->iconbarTheme().texture()); + m_label.setBackgroundPixmap(m_pixmap); + } } - - if (tmp) - m_screen.imageControl().removeImage(tmp); - + if (m_pixmap) + m_screen.imageControl().removeImage(m_pixmap); } void TextDialog::init() {