~fluxbox-maintainers/fluxbox/debian

« back to all changes in this revision

Viewing changes to src/IconButton.cc

  • Committer: Paul Tagliamonte
  • Date: 2015-02-18 19:26:13 UTC
  • Revision ID: git-v1:4decd3cfddc6edc7a655cc05d2216fda87f91a14
Update Fluxbox to 1.3.7

Show diffs side-by-side

added added

removed removed

Lines of Context:
142
142
 
143
143
void IconButton::reconfigTheme() {
144
144
 
145
 
    if (m_theme->texture().usePixmap())
 
145
    setFont(m_theme->text().font());
 
146
    setGC(m_theme->text().textGC());
 
147
    setBorderWidth(m_theme->border().width());
 
148
    setBorderColor(m_theme->border().color());
 
149
    setJustify(m_theme->text().justify());
 
150
    setAlpha(parent()->alpha());
 
151
 
 
152
    if (m_theme->texture().usePixmap()) {
146
153
        m_pm.reset(m_win.screen().imageControl().renderImage(
147
154
                           width(), height(), m_theme->texture(),
148
155
                           orientation()));
149
 
    else
 
156
        setBackgroundPixmap(m_pm);
 
157
    } else{
150
158
        m_pm.reset(0);
151
 
 
152
 
    setAlpha(parent()->alpha());
153
 
 
154
 
    if (m_pm != 0)
155
 
        setBackgroundPixmap(m_pm);
156
 
    else
157
159
        setBackgroundColor(m_theme->texture().color());
158
 
 
159
 
    setGC(m_theme->text().textGC());
160
 
    setFont(m_theme->text().font());
161
 
    setJustify(m_theme->text().justify());
162
 
    setBorderWidth(m_theme->border().width());
163
 
    setBorderColor(m_theme->border().color());
 
160
    }
164
161
 
165
162
    updateBackground(false);
166
 
 
167
163
}
168
164
 
169
165
void IconButton::reconfigAndClear() {
254
250
}
255
251
 
256
252
void IconButton::drawText(int x, int y, FbTk::FbDrawable *drawable) {
 
253
 
257
254
    // offset text
258
255
    if (m_icon_pixmap.drawable() != 0)
259
256
        FbTk::TextButton::drawText(m_icon_window.x() + m_icon_window.width() + 1, y, drawable);
273
270
        FbTk::translatePosition(orient, iconx, icony, m_icon_window.width(), m_icon_window.height(), 0);
274
271
        m_icon_window.move(iconx, icony);
275
272
        return true;
276
 
    } else {
277
 
        return false;
278
273
    }
 
274
    return false;
279
275
}
280
276