[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#64440: 30.0.50; [PATCH] Highlight on non toolkit menu bar items
From: |
Manuel Giraud |
Subject: |
bug#64440: 30.0.50; [PATCH] Highlight on non toolkit menu bar items |
Date: |
Mon, 11 Sep 2023 20:56:37 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Eli Zaretskii <eliz@gnu.org> writes:
[...]
> Thanks. That's what I imagined we have there. So I guess considering
> that a string ends where is SCHARS end is reasonable.
>
> But note that the above means you could also detect where each item
> ends by looking for the glyph whose string position is -1. So maybe
> add an assertion there that the glyph after the last character has its
> position as -1, in case we could have some complications there with
> double-width characters or something.
What do you think of this:
+ /* Convert to pixels bounds. */
+ row = MATRIX_ROW (w->current_matrix, *vpos);
+ *x_start = 0;
+ for (i = 0; i < *h_start; ++i)
+ *x_start += row->glyphs[TEXT_AREA][i].pixel_width;
+
+ *x_end = *x_start;
+ for (i = *h_start; CHARPOS (row->glyphs[TEXT_AREA][i]) != -1; ++i)
+ *x_end += row->glyphs[TEXT_AREA][i].pixel_width;
--
Manuel Giraud
- bug#64440: 30.0.50; [PATCH] Highlight on non toolkit menu bar items, (continued)
- bug#64440: 30.0.50; [PATCH] Highlight on non toolkit menu bar items, Po Lu, 2023/09/01
- bug#64440: 30.0.50; [PATCH] Highlight on non toolkit menu bar items, Eli Zaretskii, 2023/09/02
- bug#64440: 30.0.50; [PATCH] Highlight on non toolkit menu bar items, Manuel Giraud, 2023/09/02
- bug#64440: 30.0.50; [PATCH] Highlight on non toolkit menu bar items, Manuel Giraud, 2023/09/05
- bug#64440: 30.0.50; [PATCH] Highlight on non toolkit menu bar items, Eli Zaretskii, 2023/09/10
- bug#64440: 30.0.50; [PATCH] Highlight on non toolkit menu bar items, Po Lu, 2023/09/10
- bug#64440: 30.0.50; [PATCH] Highlight on non toolkit menu bar items, Manuel Giraud, 2023/09/11
- bug#64440: 30.0.50; [PATCH] Highlight on non toolkit menu bar items, Eli Zaretskii, 2023/09/11
- bug#64440: 30.0.50; [PATCH] Highlight on non toolkit menu bar items, Manuel Giraud, 2023/09/11
- bug#64440: 30.0.50; [PATCH] Highlight on non toolkit menu bar items, Eli Zaretskii, 2023/09/11
- bug#64440: 30.0.50; [PATCH] Highlight on non toolkit menu bar items,
Manuel Giraud <=
- bug#64440: 30.0.50; [PATCH] Highlight on non toolkit menu bar items, Eli Zaretskii, 2023/09/11
- bug#64440: 30.0.50; [PATCH] Highlight on non toolkit menu bar items, Manuel Giraud, 2023/09/11
- bug#64440: 30.0.50; [PATCH] Highlight on non toolkit menu bar items, Eli Zaretskii, 2023/09/12
- bug#64440: 30.0.50; [PATCH] Highlight on non toolkit menu bar items, Po Lu, 2023/09/12
- bug#64440: 30.0.50; [PATCH] Highlight on non toolkit menu bar items, Eli Zaretskii, 2023/09/12
- bug#64440: 30.0.50; [PATCH] Highlight on non toolkit menu bar items, Po Lu, 2023/09/12
- bug#64440: 30.0.50; [PATCH] Highlight on non toolkit menu bar items, Eli Zaretskii, 2023/09/12
- bug#64440: 30.0.50; [PATCH] Highlight on non toolkit menu bar items, Po Lu, 2023/09/12
- bug#64440: 30.0.50; [PATCH] Highlight on non toolkit menu bar items, Eli Zaretskii, 2023/09/12
- bug#64440: 30.0.50; [PATCH] Highlight on non toolkit menu bar items, Po Lu, 2023/09/12