diff options
author | zhuyaliang <[email protected]> | 2023-10-10 11:41:27 +0800 |
---|---|---|
committer | raveit65 <[email protected]> | 2023-10-17 19:10:05 +0200 |
commit | f27d27edf0b97f292a8b6b93fe262fd9b5a4ff2a (patch) | |
tree | 03bc19e5c8a1b1c76d0cbb099de1ed87cd402f22 /typing-break/drw-break-window.c | |
parent | 4bd1a51c9a5d0d5e2f570a21d12b521e68cc4ffd (diff) | |
download | mate-control-center-f27d27edf0b97f292a8b6b93fe262fd9b5a4ff2a.tar.bz2 mate-control-center-f27d27edf0b97f292a8b6b93fe262fd9b5a4ff2a.tar.xz |
typing-break: Fix compilation warnings and replace deprecated functions
Diffstat (limited to 'typing-break/drw-break-window.c')
-rw-r--r-- | typing-break/drw-break-window.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/typing-break/drw-break-window.c b/typing-break/drw-break-window.c index 74c2c6b6..9e51ac64 100644 --- a/typing-break/drw-break-window.c +++ b/typing-break/drw-break-window.c @@ -551,7 +551,7 @@ get_layout_location (GtkLabel *label, ypad = margin_top + margin_bottom; gtk_widget_get_allocation (widget, &widget_allocation); - gtk_widget_get_requisition (widget, &widget_requisition); + gtk_widget_get_preferred_size (widget, &widget_requisition, NULL); widget_allocation.x /= scale; widget_allocation.y /= scale; widget_requisition.width /= scale; @@ -591,14 +591,10 @@ label_draw_event_cb (GtkLabel *label, pango_cairo_show_layout (cr, gtk_label_get_layout (label)); - gtk_paint_layout (gtk_widget_get_style (widget), - cr, - gtk_widget_get_state (widget), - FALSE, - widget, - "label", - x, y, - gtk_label_get_layout (label)); + gtk_render_layout (gtk_widget_get_style_context (widget), + cr, + (double)x, (double)y, + gtk_label_get_layout (label)); return TRUE; } |