Mar 2, 2013

Cấu hình giao diện cho Eclipse trên Linux

Trong Linux, giao diện của Eclipse có phần bất tiện vì khoảng trắng giữa các icon khá lớn, khiến cho không gian trở nên nhỏ đi. Điều đó gây ra sự bất tiện lớn khi làm việc


Giải pháp cho vấn đề đó như sau:
  • Trong thư mục ~/ mở file .gtkrc-2.0 và chép đoạn mã sau:
    style "gtkcompact" {
     font_name="Sans 8"
     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=0
     ythickness=0
    }
    class "GtkButton" style "gtkcompactextra"
    class "GtkToolbar" style "gtkcompactextra"
    class "GtkPaned" style "gtkcompactextra"
    
  • Lưu file này lại và mở lại Eclipse. Lưu ý: Các chương trình khác dùng giao diện gtk cũng bị ảnh hưởng
Kết quả thu được:

Về vấn đề autocomplete không hoạt động.Giải quyết: Nhấn Alt + W + P. Chọn C/C++ - Editor - Content Assist -- Advanced và tick chọn hết. Về vấn đề tooltip bị nền màu đen hoặc khung Proposals không nhìn được: chọn giao diện hệ thống khác ( gtk theme), hoặc phải cấu hình lại giao diện đó

No comments:

Post a Comment