css – 减少gnome终端中的标签栏高度

我最近用gnome-terminal安装了Lubuntu 16.04.我喜欢gnome-terminal在显示器上占用更少的空间.但是最新版本的右上角有两个恼人的按钮,这对我来说毫无意义.因为,喜欢终端的用户更有可能使用键盘快捷键来执行标签操作,而不是点击鼠标.使用这两个额外的按钮,标签栏变得更宽,并在显示器上占用更多空间. Click here for Screenshot
.请帮我从gnome-terminal窗口中删除这两个额外的按钮.

提前致谢

Madhusudhan

解决方法

当我运行与gnome-terminal 3.22.1(Arch下)一起运行的gnome shell 3.22.2(与izy相同)时,Lari Hotari发布的解决方案对我不起作用.事实证明,CSS类名在 bug report #765590中已经改变.现在名称是终端窗口而不是TerminalWindow.自3.20.2-ish以来,这已经与gnome一起发货.

对于我来说,〜/ .config / gtk-3.0 / gtk.css的以下片段将gnome-terminal的垂直大小减少了10px.请注意,我尝试通过设置display:none来隐藏这两个按钮,但这没有任何效果.也许gtk-3.0不允许隐藏ui元素(不知道).

/* Decrease the tabs bar height in gnome-terminal
 * See:
 * https://stackoverflow.com/questions/36869701/decrease-the-tabs-bar-height-in-gnome-terminal
 */

terminal-window notebook > header.top button {
  padding: 0 0 0 0;
  background-image: none;
  border: 0;
}
terminal-window notebook > header.top > tabs > tab {
  margin: 0 0 0 0;
  padding: 0 0 0 0;
}
terminal-window notebook > header.top > tabs > tab label {
  padding: 0 0 0 0;
  margin: 0 0 0 0;
}

确保在更改css文件后注销/登出gnome-session.

之前:

后:

更新:实际上从右上角的标签菜单栏中删除了两个按钮(按照OP的要求)要求你重新编译gnome-terminal(在ubuntu下使用apt源并不困难).只需删除src / terminal-window.c中第2792行的terminal_window_fill_notebook_action_Box调用https://github.com/GNOME/gnome-terminal/blob/8975986d51639040ceb6ba1c0dc78f6a3fa9da45/src/terminal-window.c#L2792

相关文章

Css3如何实现鼠标移上变长特效?(图文+视频)
css3怎么实现鼠标悬停图片时缓慢变大效果?(图文+视频)
jquery如何实现点击网页回到顶部效果?(图文+视频)
css3边框阴影效果怎么做?(图文+视频)
css怎么实现圆角边框和圆形效果?(图文+视频教程)
Css3如何实现旋转移动动画特效