[gtk+] textview: Stop fiddling with CSS padding
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] textview: Stop fiddling with CSS padding
- Date: Tue, 31 Oct 2017 09:10:20 +0000 (UTC)
commit 3c0657f0fd861af5b98e09d8a05c6a96f46a04e7
Author: Timm Bäder <mail baedert org>
Date: Tue Oct 31 08:07:47 2017 +0100
textview: Stop fiddling with CSS padding
This is done automatically now and doing it again here means we apply
the padding twice.
gtk/gtktextview.c | 19 +++++++------------
1 files changed, 7 insertions(+), 12 deletions(-)
---
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index 913a435..53725d3 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -4768,18 +4768,13 @@ text_window_set_padding (GtkTextView *text_view,
padding.top != priv->top_padding ||
padding.bottom != priv->bottom_padding)
{
- priv->xoffset += priv->left_padding - padding.left;
- priv->yoffset += priv->top_padding - padding.top;
-
- priv->left_padding = padding.left;
- priv->right_padding = padding.right;
- priv->top_padding = padding.top;
- priv->bottom_padding = padding.bottom;
-
- priv->top_border = padding.top + priv->top_margin;
- priv->bottom_border = padding.bottom + priv->bottom_margin;
- priv->left_border = padding.left + priv->left_margin;
- priv->right_border = padding.right + priv->right_margin;
+ priv->xoffset += priv->left_padding;
+ priv->yoffset += priv->top_padding;
+
+ priv->top_border = priv->top_margin;
+ priv->bottom_border = priv->bottom_margin;
+ priv->left_border = priv->left_margin;
+ priv->right_border = priv->right_margin;
if (priv->layout && priv->layout->default_style)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]