emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-24 r116823: Fix regression introduced by patch for B


From: YAMAMOTO Mitsuharu
Subject: [Emacs-diffs] emacs-24 r116823: Fix regression introduced by patch for Bug#10500.
Date: Fri, 21 Mar 2014 10:14:15 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 116823
revision-id: address@hidden
parent: address@hidden
committer: YAMAMOTO Mitsuharu <address@hidden>
branch nick: emacs-24
timestamp: Fri 2014-03-21 19:14:10 +0900
message:
  Fix regression introduced by patch for Bug#10500.
  * xterm.c (x_draw_image_relief): Respect Vtool_bar_button_margin.
  * w32term.c (x_draw_image_relief): Likewise.
modified:
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/w32term.c                  w32term.c-20091113204419-o5vbwnq5f7feedwu-950
  src/xterm.c                    xterm.c-20091113204419-o5vbwnq5f7feedwu-244
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2014-03-21 09:23:22 +0000
+++ b/src/ChangeLog     2014-03-21 10:14:10 +0000
@@ -1,3 +1,9 @@
+2014-03-21  YAMAMOTO Mitsuharu  <address@hidden>
+
+       Fix regression introduced by patch for Bug#10500.
+       * xterm.c (x_draw_image_relief): Respect Vtool_bar_button_margin.
+       * w32term.c (x_draw_image_relief): Likewise.
+
 2014-03-21  Martin Rudalics  <address@hidden>
 
        * w32fns.c (w32_wnd_proc): For WM_WINDOWPOSCHANGING don't

=== modified file 'src/w32term.c'
--- a/src/w32term.c     2014-03-21 09:23:22 +0000
+++ b/src/w32term.c     2014-03-21 10:14:10 +0000
@@ -1892,6 +1892,7 @@
 x_draw_image_relief (struct glyph_string *s)
 {
   int x1, y1, thick, raised_p, top_p, bot_p, left_p, right_p;
+  int extra_x, extra_y;
   RECT r;
   int x = s->x;
   int y = s->ybase - image_ascent (s->img, s->face, &s->slice);
@@ -1925,16 +1926,31 @@
 
   x1 = x + s->slice.width - 1;
   y1 = y + s->slice.height - 1;
+
+  extra_x = extra_y = 0;
+  if (s->face->id == TOOL_BAR_FACE_ID)
+    {
+      if (CONSP (Vtool_bar_button_margin)
+         && INTEGERP (XCAR (Vtool_bar_button_margin))
+         && INTEGERP (XCDR (Vtool_bar_button_margin)))
+       {
+         extra_x = XINT (XCAR (Vtool_bar_button_margin));
+         extra_y = XINT (XCDR (Vtool_bar_button_margin));
+       }
+      else if (INTEGERP (Vtool_bar_button_margin))
+       extra_x = extra_y = XINT (Vtool_bar_button_margin);
+    }
+
   top_p = bot_p = left_p = right_p = 0;
 
   if (s->slice.x == 0)
-    x -= thick, left_p = 1;
+    x -= thick + extra_x, left_p = 1;
   if (s->slice.y == 0)
-    y -= thick, top_p = 1;
+    y -= thick + extra_y, top_p = 1;
   if (s->slice.x + s->slice.width == s->img->width)
-    x1 += thick, right_p = 1;
+    x1 += thick + extra_x, right_p = 1;
   if (s->slice.y + s->slice.height == s->img->height)
-    y1 += thick, bot_p = 1;
+    y1 += thick + extra_y, bot_p = 1;
 
   x_setup_relief_colors (s);
   get_glyph_string_clip_rect (s, &r);

=== modified file 'src/xterm.c'
--- a/src/xterm.c       2014-03-20 14:09:37 +0000
+++ b/src/xterm.c       2014-03-21 10:14:10 +0000
@@ -2162,6 +2162,7 @@
 x_draw_image_relief (struct glyph_string *s)
 {
   int x1, y1, thick, raised_p, top_p, bot_p, left_p, right_p;
+  int extra_x, extra_y;
   XRectangle r;
   int x = s->x;
   int y = s->ybase - image_ascent (s->img, s->face, &s->slice);
@@ -2194,16 +2195,31 @@
 
   x1 = x + s->slice.width - 1;
   y1 = y + s->slice.height - 1;
+
+  extra_x = extra_y = 0;
+  if (s->face->id == TOOL_BAR_FACE_ID)
+    {
+      if (CONSP (Vtool_bar_button_margin)
+         && INTEGERP (XCAR (Vtool_bar_button_margin))
+         && INTEGERP (XCDR (Vtool_bar_button_margin)))
+       {
+         extra_x = XINT (XCAR (Vtool_bar_button_margin));
+         extra_y = XINT (XCDR (Vtool_bar_button_margin));
+       }
+      else if (INTEGERP (Vtool_bar_button_margin))
+       extra_x = extra_y = XINT (Vtool_bar_button_margin);
+    }
+
   top_p = bot_p = left_p = right_p = 0;
 
   if (s->slice.x == 0)
-    x -= thick, left_p = 1;
+    x -= thick + extra_x, left_p = 1;
   if (s->slice.y == 0)
-    y -= thick, top_p = 1;
+    y -= thick + extra_y, top_p = 1;
   if (s->slice.x + s->slice.width == s->img->width)
-    x1 += thick, right_p = 1;
+    x1 += thick + extra_x, right_p = 1;
   if (s->slice.y + s->slice.height == s->img->height)
-    y1 += thick, bot_p = 1;
+    y1 += thick + extra_y, bot_p = 1;
 
   x_setup_relief_colors (s);
   get_glyph_string_clip_rect (s, &r);


reply via email to

[Prev in Thread] Current Thread [Next in Thread]