[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tabs
From: |
Juri Linkov |
Subject: |
Re: Tabs |
Date: |
Mon, 14 Oct 2019 22:00:03 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) |
>>> although I would prefer to (at least customizably) see the tab
>>> bar to appear below the tool bar but that's no great deal.
>>
>> I have no preference, but in web browsers the tab bar is above the tool bar,
>
> Certainly not in mine (though it took me some effort to fix that).
>
>> and this makes more sense because the tool bar depends more on the buffer so
>> it should located closer to the buffer, whereas the tab bar refers to
>> elements
>> higher in the window/frame hierarchy.
>
> IIUC, in all other builds we show the tab bar below the tool bar.
Now I implemented the option to show the tab bar below the tool bar:
diff --git a/lisp/cus-start.el b/lisp/cus-start.el
index 89a96a9f51..85273a2d2a 100644
--- a/lisp/cus-start.el
+++ b/lisp/cus-start.el
@@ -591,6 +591,12 @@ minibuffer-prompt-properties--setter
(const :tag "Text-image-horiz" :value text-image-horiz)
(const :tag "System default" :value nil)) "24.1")
(tool-bar-max-label-size frames integer "24.1")
+ (tab-bar-position tab-bar boolean "27.1"
+ :set (lambda (sym val)
+ (set-default sym val)
+ ;; Redraw the bars:
+ (tab-bar-mode -1)
+ (tab-bar-mode 1)))
(auto-hscroll-mode scrolling
(choice
(const :tag "Don't scroll automatically"
diff --git a/src/dispnew.c b/src/dispnew.c
index 4dd5ee2a1e..4cdc76f5bc 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -2166,8 +2166,10 @@ adjust_frame_glyphs_for_window_redisplay (struct frame
*f)
w->pixel_left = 0;
w->left_col = 0;
- w->pixel_top = FRAME_MENU_BAR_HEIGHT (f);
- w->top_line = FRAME_MENU_BAR_LINES (f);
+ w->pixel_top = FRAME_MENU_BAR_HEIGHT (f)
+ + (!NILP (Vtab_bar_position) ? FRAME_TOOL_BAR_HEIGHT (f) : 0);
+ w->top_line = FRAME_MENU_BAR_LINES (f)
+ + (!NILP (Vtab_bar_position) ? FRAME_TOOL_BAR_LINES (f) : 0);
w->total_cols = FRAME_TOTAL_COLS (f);
w->pixel_width = (FRAME_PIXEL_WIDTH (f)
- 2 * FRAME_INTERNAL_BORDER_WIDTH (f));
@@ -2196,8 +2198,10 @@ adjust_frame_glyphs_for_window_redisplay (struct frame
*f)
w->pixel_left = 0;
w->left_col = 0;
- w->pixel_top = FRAME_MENU_BAR_HEIGHT (f) + FRAME_TAB_BAR_HEIGHT (f);
- w->top_line = FRAME_MENU_BAR_LINES (f) + FRAME_TAB_BAR_LINES (f);
+ w->pixel_top = FRAME_MENU_BAR_HEIGHT (f)
+ + (NILP (Vtab_bar_position) ? FRAME_TAB_BAR_HEIGHT (f) : 0);
+ w->top_line = FRAME_MENU_BAR_LINES (f)
+ + (NILP (Vtab_bar_position) ? FRAME_TAB_BAR_LINES (f) : 0);
w->total_cols = FRAME_TOTAL_COLS (f);
w->pixel_width = (FRAME_PIXEL_WIDTH (f)
- 2 * FRAME_INTERNAL_BORDER_WIDTH (f));
@@ -6569,6 +6573,11 @@ syms_of_display (void)
beginning of the next redisplay). */
redisplay_dont_pause = true;
+ DEFVAR_LISP ("tab-bar-position", Vtab_bar_position,
+ doc: /* Specify on which side from the tool bar the tab bar
shall be.
+Possible values are `t' (below the tool bar), `nil' (above the tool bar).
+This option affects only builds where the tool bar is not external. */);
+
pdumper_do_now_and_after_load (syms_of_display_for_pdumper);
}
- Re: Tabs, (continued)
- Re: Tabs, T.V Raman, 2019/10/14
- Re: Tabs, Phil Sainty, 2019/10/14
- Re: Tabs, Juri Linkov, 2019/10/14
- Re: Tabs, T.V Raman, 2019/10/14
- Re: Tabs, Juri Linkov, 2019/10/15
- Re: Tabs, T.V Raman, 2019/10/15
- Re: Tabs, Eli Zaretskii, 2019/10/15
- Re: Tabs, martin rudalics, 2019/10/15
- Re: Tabs, Juri Linkov, 2019/10/15
- Re: Tabs, martin rudalics, 2019/10/16
- Re: Tabs,
Juri Linkov <=
- Re: Tabs, martin rudalics, 2019/10/15
- Re: Tabs, Eli Zaretskii, 2019/10/11
- Re: Tabs, Juri Linkov, 2019/10/12
- Re: Tabs, Eli Zaretskii, 2019/10/13
- Re: Tabs, Juri Linkov, 2019/10/13
- Re: Tabs, Eli Zaretskii, 2019/10/13
- Re: Tabs, Juri Linkov, 2019/10/13
- Re: Tabs, Eli Zaretskii, 2019/10/14
- Re: Tabs, Eli Zaretskii, 2019/10/09
- Re: Tabs, Eli Zaretskii, 2019/10/09