Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
133c0116
Commit
133c0116
authored
Dec 25, 2004
by
Jan Djärv
Browse files
* gtkutil.c (update_frame_tool_bar): Make the value of
tool-bar-button-margin control margins of images in tool bar.
parent
d8f165a8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
0 deletions
+32
-0
src/ChangeLog
src/ChangeLog
+3
-0
src/gtkutil.c
src/gtkutil.c
+29
-0
No files found.
src/ChangeLog
View file @
133c0116
2004-12-25 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
2004-12-25 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
* gtkutil.c (update_frame_tool_bar): Make the value of
tool-bar-button-margin control margins of images in tool bar.
* alloc.c (check_depth): New variable.
* alloc.c (check_depth): New variable.
(overrun_check_malloc, overrun_check_realloc): Only add
(overrun_check_malloc, overrun_check_realloc): Only add
overhead and write check pattern if check_depth is 1 (to handle
overhead and write check pattern if check_depth is 1 (to handle
...
...
src/gtkutil.c
View file @
133c0116
...
@@ -3356,12 +3356,37 @@ update_frame_tool_bar (f)
...
@@ -3356,12 +3356,37 @@ update_frame_tool_bar (f)
GList *icon_list;
GList *icon_list;
GList *iter;
GList *iter;
struct x_output *x = f->output_data.x;
struct x_output *x = f->output_data.x;
int hmargin, vmargin;
if (! FRAME_GTK_WIDGET (f))
if (! FRAME_GTK_WIDGET (f))
return;
return;
BLOCK_INPUT;
BLOCK_INPUT;
if (INTEGERP (Vtool_bar_button_margin)
&& XINT (Vtool_bar_button_margin) > 0)
{
hmargin = XFASTINT (Vtool_bar_button_margin);
vmargin = XFASTINT (Vtool_bar_button_margin);
}
else if (CONSP (Vtool_bar_button_margin))
{
if (INTEGERP (XCAR (Vtool_bar_button_margin))
&& XINT (XCAR (Vtool_bar_button_margin)) > 0)
hmargin = XFASTINT (XCAR (Vtool_bar_button_margin));
if (INTEGERP (XCDR (Vtool_bar_button_margin))
&& XINT (XCDR (Vtool_bar_button_margin)) > 0)
vmargin = XFASTINT (XCDR (Vtool_bar_button_margin));
}
/* The natural size (i.e. when GTK uses 0 as margin) looks best,
so take DEFAULT_TOOL_BAR_BUTTON_MARGIN to mean "default for GTK",
i.e. zero. This means that margins less than
DEFAULT_TOOL_BAR_BUTTON_MARGIN has no effect. */
hmargin = max (0, hmargin - DEFAULT_TOOL_BAR_BUTTON_MARGIN);
vmargin = max (0, vmargin - DEFAULT_TOOL_BAR_BUTTON_MARGIN);
if (! x->toolbar_widget)
if (! x->toolbar_widget)
xg_create_tool_bar (f);
xg_create_tool_bar (f);
...
@@ -3425,6 +3450,8 @@ update_frame_tool_bar (f)
...
@@ -3425,6 +3450,8 @@ update_frame_tool_bar (f)
{
{
GtkWidget *w = xg_get_image_for_pixmap (f, img, x->widget, NULL);
GtkWidget *w = xg_get_image_for_pixmap (f, img, x->widget, NULL);
gtk_misc_set_padding (GTK_MISC (w), hmargin, vmargin);
gtk_toolbar_append_item (GTK_TOOLBAR (x->toolbar_widget),
gtk_toolbar_append_item (GTK_TOOLBAR (x->toolbar_widget),
0, 0, 0,
0, 0, 0,
w,
w,
...
@@ -3480,6 +3507,8 @@ update_frame_tool_bar (f)
...
@@ -3480,6 +3507,8 @@ update_frame_tool_bar (f)
XG_TOOL_BAR_IMAGE_DATA);
XG_TOOL_BAR_IMAGE_DATA);
g_list_free (chlist);
g_list_free (chlist);
gtk_misc_set_padding (GTK_MISC (wimage), hmargin, vmargin);
if (old_img != img->pixmap)
if (old_img != img->pixmap)
(void) xg_get_image_for_pixmap (f, img, x->widget, wimage);
(void) xg_get_image_for_pixmap (f, img, x->widget, wimage);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment