Mercurial > molko
comparison src/libmlk-ui/ui/notify.c @ 411:d74f53299252
make: add basic GNU make support
author | David Demelier <markand@malikania.fr> |
---|---|
date | Fri, 07 Oct 2022 14:35:31 +0200 |
parents | 460c78706989 |
children | 8f59201dc76b |
comparison
equal
deleted
inserted
replaced
410:1bf7d6669f0a | 411:d74f53299252 |
---|---|
28 #include "align.h" | 28 #include "align.h" |
29 #include "frame.h" | 29 #include "frame.h" |
30 #include "label.h" | 30 #include "label.h" |
31 #include "notify.h" | 31 #include "notify.h" |
32 #include "theme.h" | 32 #include "theme.h" |
33 #include "ui_p.h" | |
34 | 33 |
35 #define WIDTH (window.w / 3) | 34 #define WIDTH (window.w / 3) |
36 #define HEIGHT (window.h / 10) | 35 #define HEIGHT (window.h / 10) |
37 | 36 |
38 struct geo { | 37 struct geo { |
79 geo->frame_w = WIDTH; | 78 geo->frame_w = WIDTH; |
80 geo->frame_h = HEIGHT; | 79 geo->frame_h = HEIGHT; |
81 | 80 |
82 /* Align icon at the left center. */ | 81 /* Align icon at the left center. */ |
83 if (n->icon->h >= HEIGHT) { | 82 if (n->icon->h >= HEIGHT) { |
84 tracef(_("notification icon is too large: %u > %u"), n->icon->h, HEIGHT); | 83 tracef("notification icon is too large: %u > %u", n->icon->h, HEIGHT); |
85 geo->icon_x = x + geo->theme->padding; | 84 geo->icon_x = x + geo->theme->padding; |
86 geo->icon_y = y + geo->theme->padding; | 85 geo->icon_y = y + geo->theme->padding; |
87 } else { | 86 } else { |
88 align(ALIGN_LEFT, &geo->icon_x, &geo->icon_y, n->icon->w, n->icon->h, x, y, WIDTH, HEIGHT); | 87 align(ALIGN_LEFT, &geo->icon_x, &geo->icon_y, n->icon->w, n->icon->h, x, y, WIDTH, HEIGHT); |
89 geo->icon_x += geo->icon_y - y; | 88 geo->icon_x += geo->icon_y - y; |