mirror of
https://gitlab.freedesktop.org/plymouth/plymouth.git
synced 2026-05-08 07:48:03 +02:00
Merge branch 'label-fixes' into 'main'
Label fixes See merge request plymouth/plymouth!247
This commit is contained in:
commit
5a720533b8
2 changed files with 3 additions and 3 deletions
|
|
@ -100,7 +100,7 @@ ply_label_load_plugin (ply_label_t *label)
|
|||
|
||||
/* ...and the FreeType based one after that, it is not a complete substitute (yet). */
|
||||
if (label->module_handle == NULL)
|
||||
label->module_handle = ply_open_module (PLYMOUTH_PLUGIN_PATH "label-freetype.so");
|
||||
label->module_handle = ply_open_module (PLYMOUTH_PLUGIN_PATH "label-freetype.so");
|
||||
|
||||
if (label->module_handle == NULL)
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@ init_pango_text_layout (cairo_t *cairo_context,
|
|||
if (width >= 0)
|
||||
pango_layout_set_width (pango_layout, width * PANGO_SCALE);
|
||||
|
||||
pango_layout_set_text (pango_layout, text, -1);
|
||||
pango_layout_set_text (pango_layout, text ?: "", -1);
|
||||
pango_cairo_update_layout (cairo_context, pango_layout);
|
||||
|
||||
return pango_layout;
|
||||
|
|
@ -321,7 +321,7 @@ set_text_for_control (ply_label_plugin_control_t *label,
|
|||
{
|
||||
ply_rectangle_t dirty_area;
|
||||
|
||||
if (label->text != text) {
|
||||
if (strcmp (label->text ?: "", text ?: "") != 0) {
|
||||
dirty_area = label->area;
|
||||
free (label->text);
|
||||
label->text = strdup (text);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue