Eclipse 在Ubuntu 下總是感覺上面的工具欄感覺特別的大,控件之間的空隙非常的大,和在Windows 下的感覺非常的不一樣(畢竟是剛剛從windows叛逃出來),其實也不光光是Eclipse 是這樣,其他也軟件也同樣有這個問題。嘗試過通過更換主題來解決這樣的問題,老是看著一個主題,審美總是會疲勞的。在網上找來一圈,
解決方案:
修改或者新建(系統默認是沒有的)
/home/Your_username/.gtkrc-2.0??(ubuntu中 . 開頭的文件默認是隱藏文件,快捷鍵Ctrl+H可顯示隱藏文件)
復制如下的內容:
style "gtkcompact" {
font_name="Sans 9"
GtkButton::default_border={0,0,0,0}
GtkButton::default_outside_border={0,0,0,0}
GtkButtonBox::child_min_width=0
GtkButtonBox::child_min_heigth=0
GtkButtonBox::child_internal_pad_x=0
GtkButtonBox::child_internal_pad_y=0
GtkMenu::vertical-padding=1
GtkMenuBar::internal_padding=0
GtkMenuItem::horizontal_padding=4
GtkToolbar::internal-padding=0
GtkToolbar::space-size=0
GtkOptionMenu::indicator_size=0
GtkOptionMenu::indicator_spacing=0
GtkPaned::handle_size=4
GtkRange::trough_border=0
GtkRange::stepper_spacing=0
GtkScale::value_spacing=0
GtkScrolledWindow::scrollbar_spacing=0
GtkExpander::expander_size=10
GtkExpander::expander_spacing=0
GtkTreeView::vertical-separator=0
GtkTreeView::horizontal-separator=0
GtkTreeView::expander-size=8
GtkTreeView::fixed-height-mode=TRUE
GtkWidget::focus_padding=0
}
class "GtkWidget" style "gtkcompact"
style "gtkcompactextra" {
xthickness=1
ythickness=1
}
class "GtkButton" style "gtkcompactextra"
class "GtkToolbar" style "gtkcompactextra"
class "GtkPaned" style "gtkcompactextra"
注銷系統再次登錄,打開Eclipse 的界面果然是緊湊來,感覺不錯,打開其他的程序界面也同樣是緊湊來不少。
界面美觀了不少,但是Eclipse的自動提示的背景色是黑色的,看起來也非常的難受:
修改方案:
打開終端移動到當前主題目錄下:
cd /usr/share/themes/當前的主題名/
打開gtk-2.0/gtkrc文件:
sudo gedit gtk-2.0/gtkrc
尋找到“ntooltip_fg_color”和“ntooltip_bg_color”兩個屬性的值,如果沒有改屬性,可以自行添加,其值仿照windows的默認值,分別設定位:
tooltip_fg_color:#000000
tooltip_bg_color:#f2edbc
然後保存退出,打開系統外觀配置,切換一下主題,當切換回來的時候,修改的效果就生效了。
最后插入圖片一張:
__________________________________________________
linux deepin 下,首先找出gtk的相關配置文件:
june@deepin:~>
sudo find / -name "*gtkrc*"
june@deepin:~>
sudo vi /usr/share/themes/Deepin/gtk-2.0/gtkrc
首先如上所述的修改,
然后對于有很多工具條,占用了大量的位置的問題,
我們可以先關閉所有的視圖 close all?perspectives,
然后再 open perspective 即可去掉多余的工具條。