How to customize widget appearance for GTK version emacs

Source: Internet
Author: User

When we use the Xlib version of Emacs, we can define the appearance of Emacs's menu bar, toolbar, and scroll bar by XResource.

Now, on Linux most of US use GTK version of Emacs, is there a way to define the appearance of Emacs's menu bar, toolbar, and so on?

One approach is to define the appearance of a global Gtk Widget through ~/.GTKRC. The appearance of Emacs will naturally change as well.

Another approach is to customize the appearance of Emacs's Gtk widgets individually. Here's the answer, which describes the resource name of Emacs and how to customize it.

Below we change the font of the Emacs menu bar. Create a new GTKRC file under ~/.emacs.d/. The contents are as follows:

Style "Emacs-menu"{  = "monospace"  bg[NORMAL] = "Gray70"   BG [ACTIVE] = "gray75"  FG[NORMAL] = { 0.0, 0.2, 0.05"*menubar*" style "Emacs-menu""*emacs-menuitem*" style "Emacs-menu"

Now restart Emacs to see if the menu bar is changed?

How to customize widget appearance for GTK version emacs

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.