mirror of
https://github.com/labwc/labwc.git
synced 2025-11-05 13:29:58 -05:00
output: access texture width/height directly
wlr_texture_get_size() is removed in wlroots@6369f709 so we have to access width and height directly.
This commit is contained in:
parent
9769fad7a5
commit
892e93dd84
1 changed files with 4 additions and 2 deletions
|
|
@ -405,8 +405,10 @@ render_icon(struct output *output, pixman_region32_t *output_damage,
|
||||||
struct wlr_box *box, struct wlr_texture *texture)
|
struct wlr_box *box, struct wlr_texture *texture)
|
||||||
{
|
{
|
||||||
/* centre-align icon if smaller than designated box */
|
/* centre-align icon if smaller than designated box */
|
||||||
struct wlr_box button;
|
struct wlr_box button = {
|
||||||
wlr_texture_get_size(texture, &button.width, &button.height);
|
.width = texture->width,
|
||||||
|
.height = texture->height,
|
||||||
|
};
|
||||||
if (box->width > button.width) {
|
if (box->width > button.width) {
|
||||||
button.x = box->x + (box->width - button.width) / 2;
|
button.x = box->x + (box->width - button.width) / 2;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue