mirror of https://github.com/GNOME/gimp.git
app: write "Unstable Development Version" across the empty image window
This commit is contained in:
parent
2303ce910d
commit
91bb872d26
|
@ -46,6 +46,8 @@
|
|||
#include "gimpimagewindow.h"
|
||||
#include "gimpnavigationeditor.h"
|
||||
|
||||
#include "gimp-intl.h"
|
||||
|
||||
|
||||
/* local function prototypes */
|
||||
|
||||
|
@ -502,7 +504,42 @@ static void
|
|||
gimp_display_shell_canvas_draw_drop_zone (GimpDisplayShell *shell,
|
||||
cairo_t *cr)
|
||||
{
|
||||
cairo_save (cr);
|
||||
|
||||
gimp_display_shell_draw_background (shell, cr);
|
||||
|
||||
gimp_cairo_draw_drop_wilber (shell->canvas, cr, shell->blink);
|
||||
|
||||
cairo_restore (cr);
|
||||
|
||||
#ifdef GIMP_UNSTABLE
|
||||
{
|
||||
PangoLayout *layout;
|
||||
GtkAllocation allocation;
|
||||
gint width;
|
||||
gint height;
|
||||
gdouble scale;
|
||||
|
||||
layout = gtk_widget_create_pango_layout (shell->canvas,
|
||||
_("Unstable Development\n"
|
||||
"Version"));
|
||||
pango_layout_set_alignment (layout, PANGO_ALIGN_CENTER);
|
||||
|
||||
pango_layout_get_pixel_size (layout, &width, &height);
|
||||
gtk_widget_get_allocation (shell->canvas, &allocation);
|
||||
|
||||
scale = MIN (((gdouble) allocation.width / 2.0) / (gdouble) width,
|
||||
((gdouble) allocation.height / 2.0) / (gdouble) height);
|
||||
|
||||
cairo_move_to (cr,
|
||||
(allocation.width - (width * scale)) / 2,
|
||||
(allocation.height - (height * scale)) / 2);
|
||||
|
||||
cairo_scale (cr, scale, scale);
|
||||
|
||||
pango_cairo_show_layout (cr, layout);
|
||||
|
||||
g_object_unref (layout);
|
||||
}
|
||||
#endif /* GIMP_UNSTABLE */
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue