[gimp] app: allow for more fine-grained baseline and kerning adjustments
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: allow for more fine-grained baseline and kerning adjustments
- Date: Mon, 8 Mar 2010 20:58:41 +0000 (UTC)
commit 3e3613bef79cf8c46d9a5507d6637f46965ddc8a
Author: Michael Natterer <mitch gimp org>
Date: Mon Mar 8 21:57:29 2010 +0100
app: allow for more fine-grained baseline and kerning adjustments
In theory for now, by changing the parameters of
GimpTextProxy::change_baseline() and ::change_kerning()
from gint to gdouble.
app/tools/gimptexttool-editor.c | 12 ++++++------
app/widgets/gimptextproxy.c | 18 +++++++++---------
app/widgets/gimptextproxy.h | 6 +++---
3 files changed, 18 insertions(+), 18 deletions(-)
---
diff --git a/app/tools/gimptexttool-editor.c b/app/tools/gimptexttool-editor.c
index 6714d74..ad7ab2a 100644
--- a/app/tools/gimptexttool-editor.c
+++ b/app/tools/gimptexttool-editor.c
@@ -72,9 +72,9 @@ static void gimp_text_tool_toggle_overwrite (GimpTextTool *text_tool);
static void gimp_text_tool_select_all (GimpTextTool *text_tool,
gboolean select);
static void gimp_text_tool_change_baseline (GimpTextTool *text_tool,
- gint count);
+ gdouble amount);
static void gimp_text_tool_change_kerning (GimpTextTool *text_tool,
- gint count);
+ gdouble amount);
static void gimp_text_tool_options_notify (GimpTextOptions *options,
GParamSpec *pspec,
@@ -998,7 +998,7 @@ gimp_text_tool_select_all (GimpTextTool *text_tool,
static void
gimp_text_tool_change_baseline (GimpTextTool *text_tool,
- gint count)
+ gdouble amount)
{
GtkTextBuffer *buffer = GTK_TEXT_BUFFER (text_tool->buffer);
GtkTextIter start;
@@ -1013,12 +1013,12 @@ gimp_text_tool_change_baseline (GimpTextTool *text_tool,
gtk_text_iter_order (&start, &end);
gimp_text_buffer_change_baseline (text_tool->buffer, &start, &end,
- count * PANGO_SCALE);
+ amount * PANGO_SCALE);
}
static void
gimp_text_tool_change_kerning (GimpTextTool *text_tool,
- gint count)
+ gdouble amount)
{
GtkTextBuffer *buffer = GTK_TEXT_BUFFER (text_tool->buffer);
GtkTextIter start;
@@ -1034,7 +1034,7 @@ gimp_text_tool_change_kerning (GimpTextTool *text_tool,
gtk_text_iter_order (&start, &end);
gimp_text_buffer_change_kerning (text_tool->buffer, &start, &end,
- count * PANGO_SCALE);
+ amount * PANGO_SCALE);
}
static void
diff --git a/app/widgets/gimptextproxy.c b/app/widgets/gimptextproxy.c
index 1fab27e..f6b132b 100644
--- a/app/widgets/gimptextproxy.c
+++ b/app/widgets/gimptextproxy.c
@@ -2,7 +2,7 @@
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* GimpTextProxy
- * Copyright (C) 2009 Michael Natterer <mitch gimp org>
+ * Copyright (C) 2009-2010 Michael Natterer <mitch gimp org>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -78,9 +78,9 @@ gimp_text_proxy_class_init (GimpTextProxyClass *klass)
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
G_STRUCT_OFFSET (GimpTextProxyClass, change_baseline),
NULL, NULL,
- gimp_marshal_VOID__INT,
+ gimp_marshal_VOID__DOUBLE,
G_TYPE_NONE, 1,
- G_TYPE_INT);
+ G_TYPE_DOUBLE);
proxy_signals[CHANGE_KERNING] =
g_signal_new ("change-kerning",
@@ -88,25 +88,25 @@ gimp_text_proxy_class_init (GimpTextProxyClass *klass)
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
G_STRUCT_OFFSET (GimpTextProxyClass, change_kerning),
NULL, NULL,
- gimp_marshal_VOID__INT,
+ gimp_marshal_VOID__DOUBLE,
G_TYPE_NONE, 1,
- G_TYPE_INT);
+ G_TYPE_DOUBLE);
binding_set = gtk_binding_set_by_class (klass);
gtk_binding_entry_add_signal (binding_set, GDK_Up, GDK_MOD1_MASK,
"change-baseline", 1,
- G_TYPE_INT, 1);
+ G_TYPE_DOUBLE, 1.0);
gtk_binding_entry_add_signal (binding_set, GDK_Down, GDK_MOD1_MASK,
"change-baseline", 1,
- G_TYPE_INT, -1);
+ G_TYPE_DOUBLE, -1.0);
gtk_binding_entry_add_signal (binding_set, GDK_Left, GDK_MOD1_MASK,
"change-kerning", 1,
- G_TYPE_INT, -1);
+ G_TYPE_DOUBLE, -1.0);
gtk_binding_entry_add_signal (binding_set, GDK_Right, GDK_MOD1_MASK,
"change-kerning", 1,
- G_TYPE_INT, 1);
+ G_TYPE_DOUBLE, 1.0);
}
static void
diff --git a/app/widgets/gimptextproxy.h b/app/widgets/gimptextproxy.h
index ffa0564..937bc4a 100644
--- a/app/widgets/gimptextproxy.h
+++ b/app/widgets/gimptextproxy.h
@@ -2,7 +2,7 @@
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* GimpTextProxy
- * Copyright (C) 2009 Michael Natterer <mitch gimp org>
+ * Copyright (C) 2009-2010 Michael Natterer <mitch gimp org>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -42,9 +42,9 @@ struct _GimpTextProxyClass
GtkTextViewClass parent_class;
void (* change_baseline) (GimpTextProxy *proxy,
- gint count);
+ gdouble amount);
void (* change_kerning) (GimpTextProxy *proxy,
- gint count);
+ gdouble amount);
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]