[gtk+/wip/baedert/box] widget: Remove cursor-aspect-ratio style property
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/baedert/box] widget: Remove cursor-aspect-ratio style property
- Date: Wed, 5 Oct 2016 17:41:35 +0000 (UTC)
commit c5a7ed3689cf3eee7398e4b81edf0d3b77435d6d
Author: Timm Bäder <mail baedert org>
Date: Wed Oct 5 17:07:08 2016 +0200
widget: Remove cursor-aspect-ratio style property
gtk/gtktextview.c | 10 +++-------
gtk/gtkwidget.c | 7 -------
2 files changed, 3 insertions(+), 14 deletions(-)
---
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index 01b60e5..dc93c28 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -145,6 +145,7 @@
#define SCREEN_HEIGHT(widget) text_window_get_height (GTK_TEXT_VIEW (widget)->priv->text_window)
#define SPACE_FOR_CURSOR 1
+#define CURSOR_ASPECT_RATIO (0.04)
#define GTK_TEXT_VIEW_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GTK_TYPE_TEXT_VIEW,
GtkTextViewPrivate))
@@ -10127,7 +10128,6 @@ text_window_invalidate_cursors (GtkTextWindow *win)
GdkRectangle strong;
GdkRectangle weak;
gboolean draw_arrow;
- gfloat cursor_aspect_ratio;
gint stem_width;
gint arrow_width;
@@ -10152,11 +10152,7 @@ text_window_invalidate_cursors (GtkTextWindow *win)
draw_arrow = (strong.x != weak.x || strong.y != weak.y);
- gtk_widget_style_get (win->widget,
- "cursor-aspect-ratio", &cursor_aspect_ratio,
- NULL);
-
- stem_width = strong.height * cursor_aspect_ratio + 1;
+ stem_width = strong.height * CURSOR_ASPECT_RATIO + 1;
arrow_width = stem_width + 1;
strong.width = stem_width;
@@ -10178,7 +10174,7 @@ text_window_invalidate_cursors (GtkTextWindow *win)
if (draw_arrow) /* == have weak */
{
- stem_width = weak.height * cursor_aspect_ratio + 1;
+ stem_width = weak.height * CURSOR_ASPECT_RATIO + 1;
arrow_width = stem_width + 1;
weak.width = stem_width;
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 2744da4..59fffda 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -3326,13 +3326,6 @@ G_GNUC_END_IGNORE_DEPRECATIONS
GTK_WIDGET_HELP_WHATS_THIS);
gtk_widget_class_install_style_property (klass,
- g_param_spec_float ("cursor-aspect-ratio",
- P_("Cursor line aspect ratio"),
- P_("Aspect ratio with which to draw insertion
cursor"),
- 0.0, 1.0, 0.04,
- GTK_PARAM_READABLE));
-
- gtk_widget_class_install_style_property (klass,
g_param_spec_boolean ("window-dragging",
P_("Window dragging"),
P_("Whether windows can be dragged and
maximized by clicking on empty areas"),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]