summaryrefslogtreecommitdiffhomepage
path: root/patch/bar_fancybar.c
diff options
context:
space:
mode:
authorbakkeby <[email protected]>2022-03-06 11:38:22 +0100
committerbakkeby <[email protected]>2022-03-06 11:38:22 +0100
commitadc05c2332b6267c4af5bf506ff071629d16f281 (patch)
tree8ea1e605244b7cc46437117aaf8b85a12c956c20 /patch/bar_fancybar.c
parent5c321794f1ffb8f395de9b58e1c165e7137df711 (diff)
downloaddwm-flexipatch-adc05c2332b6267c4af5bf506ff071629d16f281.tar.gz
dwm-flexipatch-adc05c2332b6267c4af5bf506ff071629d16f281.zip
Upgrading winicon patch to v2.1 ref. #238
Diffstat (limited to 'patch/bar_fancybar.c')
-rw-r--r--patch/bar_fancybar.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/patch/bar_fancybar.c b/patch/bar_fancybar.c
index 623d1c3..40a1883 100644
--- a/patch/bar_fancybar.c
+++ b/patch/bar_fancybar.c
@@ -34,7 +34,7 @@ draw_fancybar(Bar *bar, BarArg *a)
tabw = TEXTW(m->sel->name);
#if BAR_WINICON_PATCH
if (m->sel->icon)
- tabw += m->sel->icon->width + ICONSPACING;
+ tabw += m->sel->icw + ICONSPACING;
#endif // BAR_WINICON_PATCH
mw = (tabw >= w || n == 1) ? 0 : (w - tabw) / (n - 1);
@@ -46,7 +46,7 @@ draw_fancybar(Bar *bar, BarArg *a)
tabw = TEXTW(c->name);
#if BAR_WINICON_PATCH
if (c->icon)
- tabw += c->icon->width + ICONSPACING;
+ tabw += c->icw + ICONSPACING;
#endif // BAR_WINICON_PATCH
if (tabw < mw)
ew += (mw - tabw);
@@ -62,7 +62,7 @@ draw_fancybar(Bar *bar, BarArg *a)
continue;
tabw = MIN(m->sel == c ? w : mw, TEXTW(c->name));
#if BAR_WINICON_PATCH
- ipad = c->icon ? c->icon->width + ICONSPACING : 0;
+ ipad = c->icon ? c->icw + ICONSPACING : 0;
tabw += ipad;
#endif // BAR_WINICON_PATCH
tx = x;
@@ -80,7 +80,7 @@ draw_fancybar(Bar *bar, BarArg *a)
#if BAR_WINICON_PATCH
if (ipad) {
- drw_img(drw, tx, a->y + (a->h - c->icon->height) / 2, c->icon, tmpicon);
+ drw_pic(drw, tx, a->y + (a->h - c->ich) / 2, c->icw, c->ich, c->icon);
tx += ipad;
tw -= ipad;
}