`

eclipse在ubuntu下面的界面调整

阅读更多

eclipse是java程序员的神器,不可想象没有了它的代码补全、工程管理、代码跳转、调试,我们怎么活。

不幸的是,eclipse在ubuntu下面,界面就像泡了一整天的黄豆一样胖了一倍。导致编辑区域非常小,写不了几行代码就得翻页。这导致我一度放弃使用eclipse。

幸运的是,在gtk桌面下,程序的字体和界面样式是可以调的。

首先在eclipse目录下建立一个文件ec,并赋予它可执行权限:chmod +x ./ec

 

ec的内容如下:

#!/bin/sh
GTK2_RC_FILES=ec-gtkrc ./eclipse

 里面ec-gtkrc是一个样式文件,同样我们需要在eclipse目录下面创建这个文件。

 

ec-gtkrc的内容如下:

style "eclipse_ui" { 
	xthickness=1  
	ythickness=1
	GtkButton::default_border={1,1,1,1}  
	GtkButton::default_outside_border={1,1,1,1}  
	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=1  
	GtkMenuItem::horizontal_padding=2  
	GtkToolbar::internal-padding=1  
	GtkToolbar::space-size=1  
	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=10  
	GtkTreeView::fixed-height-mode=TRUE  
	GtkWidget::focus_padding=0  
	font_name="Monospace 8"  
}  

class "GtkWidget" style "eclipse_ui"  
class "GtkButton" style "eclipse_ui"  
class "GtkToolbar" style "eclipse_ui"  
class "GtkPaned" style "eclipse_ui"

 

里面有个font_name="Monospace 8"就是调整界面大小的。

 

运行ec文件即可看到界面的改变。

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics