diff options
| author | Martin Rudalics | 2011-06-06 08:57:59 +0200 |
|---|---|---|
| committer | Martin Rudalics | 2011-06-06 08:57:59 +0200 |
| commit | 1d00388aae9e39ceb8e520b5f227c21fdd219a20 (patch) | |
| tree | 0fae32c463f63162d608b9038dd63fe73b9dfb59 /src/gtkutil.c | |
| parent | 348f5121cd84ade8ce29d557e7f1215694027b05 (diff) | |
| parent | 4d09bcf621ec32e17fdb8dd2ea08344486f7aeef (diff) | |
| download | emacs-old-branches/window-pub.tar.gz emacs-old-branches/window-pub.zip | |
Merge from trunkold-branches/window-pub
Diffstat (limited to 'src/gtkutil.c')
| -rw-r--r-- | src/gtkutil.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/gtkutil.c b/src/gtkutil.c index 6e54006d913..dedb39a7a40 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c | |||
| @@ -3326,6 +3326,25 @@ xg_get_widget_from_map (int idx) | |||
| 3326 | return 0; | 3326 | return 0; |
| 3327 | } | 3327 | } |
| 3328 | 3328 | ||
| 3329 | int | ||
| 3330 | xg_get_default_scrollbar_width (FRAME_PTR f) | ||
| 3331 | { | ||
| 3332 | #ifdef HAVE_GTK3 | ||
| 3333 | GtkAdjustment *vadj; | ||
| 3334 | #else | ||
| 3335 | GtkObject *vadj; | ||
| 3336 | #endif | ||
| 3337 | GtkWidget *wscroll; | ||
| 3338 | int w = 0, b = 0; | ||
| 3339 | vadj = gtk_adjustment_new (XG_SB_MIN, XG_SB_MIN, XG_SB_MAX, 0.1, 0.1, 0.1); | ||
| 3340 | wscroll = gtk_vscrollbar_new (GTK_ADJUSTMENT (vadj)); | ||
| 3341 | gtk_widget_style_get (wscroll, "slider-width", &w, "trough-border", &b, NULL); | ||
| 3342 | gtk_widget_destroy (wscroll); | ||
| 3343 | w += 2*b; | ||
| 3344 | if (w < 16) w = 16; | ||
| 3345 | return w; | ||
| 3346 | } | ||
| 3347 | |||
| 3329 | /* Return the scrollbar id for X Window WID on display DPY. | 3348 | /* Return the scrollbar id for X Window WID on display DPY. |
| 3330 | Return -1 if WID not in id_to_widget. */ | 3349 | Return -1 if WID not in id_to_widget. */ |
| 3331 | 3350 | ||