ubuntu gnome_如何在Ubuntu Linux中为Gnome面板自定义字体和颜色

ubuntu gnome

ubuntu gnome_如何在Ubuntu Linux中为Gnome面板自定义字体和颜色

Earlier this week we showed you how to make the Gnome Panels totally transparent, but you really need some customized fonts and colors to make the effect work better. Here’s how to do it.

本周初,我们向您展示了如何使Gnome面板完全透明 ,但是您确实需要一些自定义的字体和颜色以使效果更好。 这是操作方法。

This article is the first part of a multi-part series on how to customize the Ubuntu desktop, written by How-To Geek reader and ubergeek, Omar Hafiz.

本文是由How-To Geek读者和ubergeek Omar Hafiz撰写的有关如何自定义Ubuntu桌面的系列文章的第一部分。

轻松更改Gnome颜色 (Changing the Gnome Colors the Easy Way)

You’ll first need to install Gnome Color Chooser which is available in the default repositories (the package name is gnome-color-chooser). Then go to System > Preferences > Gnome Color Chooser to launch the program.

首先,您需要安装默认存储库中可用的Gnome Color Chooser(程序包名称为gnome-color-chooser)。 然后转到系统>首选项> Gnome颜色选择器以启动该程序。

When you see all these tabs you immediately know that Gnome Color Chooser does not only change the font color of the panel, but also the color of the fonts all over Ubuntu, desktop icons, and many other things as well.

当您看到所有这些选项卡时,您会立即知道Gnome Color Chooser不仅会更改面板的字体颜色,而且还会更改Ubuntu,桌面图标以及许多其他内容的字体颜色。

ubuntu gnome_如何在Ubuntu Linux中为Gnome面板自定义字体和颜色

Now switch to the panel tab, here you can control every thing about your panels. You can change font, font color, background and background color of the panels and start menus. Tick the “Normal” option and choose the color you want for the panel font. If you want you can change the hover color of the buttons on the panel by too.

现在切换到面板选项卡,在这里您可以控制面板的所有操作。 您可以更改面板和开始菜单的字​​体,字体颜色,背景和背景颜色。 勾选“普通”选项,然后选择所需的面板字体颜色。 如果需要,您也可以更改面板上按钮的悬停颜色。

A little below the color option is the font options, this includes the font, font size, and the X and Y positioning of the font. The first two options are pretty straight forward, they change the typeface and the size.

颜色选项下面是字体选项,其中包括字体,字体大小以及字体的X和Y位置。 前两个选项非常简单,它们更改了字体和大小。

ubuntu gnome_如何在Ubuntu Linux中为Gnome面板自定义字体和颜色

The X-Padding and Y-Padding may confuse you but they are interesting, they may give a nice look for your panels by increasing the space between items on your panel like this:

X-Padding和Y-Padding可能会使您感到困惑,但是它们很有趣,它们可以通过增加面板上项目之间的间距来为面板提供漂亮的外观,如下所示:

X-Padding:

X填充:

ubuntu gnome_如何在Ubuntu Linux中为Gnome面板自定义字体和颜色

Y-Padding:

Y填充:

ubuntu gnome_如何在Ubuntu Linux中为Gnome面板自定义字体和颜色

The bottom half of the window controls the look of your start menus which is the Applications, Places, and Systems menus. You can customize them just the way you did with the panel.

窗口的下半部分控制“开始”菜单的外观,即“应用程序”,“位置”和“系统”菜单。 您可以像使用面板一样自定义它们。

ubuntu gnome_如何在Ubuntu Linux中为Gnome面板自定义字体和颜色
ubuntu gnome_如何在Ubuntu Linux中为Gnome面板自定义字体和颜色

Alright, this was the easy way to change the font of your panels.

好了,这是更改面板字体的简便方法。

通过命令行方式更改Gnome主题颜色 (Changing the Gnome Theme Colors the Command-Line Way)

The other hard (not so hard really) way will be changing the configuration files that tell your panel how it should look like. In your Home Folder, press Ctrl+H to show the hidden files, now find the file “.gtkrc-2.0”, open it and insert this line in it. If there are any other lines in the file leave them intact.

另一种困难的方法(实际上不是那么困难)是更改配置文件,这些文件告诉您的面板外观如何。 在主文件夹中,按Ctrl + H以显示隐藏的文件,现在找到文件“ .gtkrc-2.0”,将其打开并在其中插入此行。 如果文件中还有其他任何行,请保留它们不变。

include “/home/<username>/.gnome2/panel-fontrc”

包括“ / home / <用户名> /。gnome2 / panel-fontrc”

Don’t forget to replace the <user_name> with you user account name. When done close and save the file. Now navigate the folder “.gnome2” from your Home Folder and create a new file and name it “panel-fontrc”. Open the file you just created with a text editor and paste the following in it:

不要忘记用您的用户帐户名替换<user_name>。 完成后关闭并保存文件。 现在,从主文件夹中导航文件夹“ .gnome2”并创建一个新文件,并将其命名为“ panel-fontrc”。 使用文本编辑器打开您刚创建的文件,然后将以下内容粘贴到其中:

style “my_color”{fg[NORMAL] = “#FF0000”}widget “*PanelWidget*” style “my_color”widget “*PanelApplet*” style “my_color”

样式“ my_color” {fg [NORMAL] =“#FF0000”}小部件“ * PanelWidget *”样式“ my_color”小部件“ * PanelApplet *”样式“ my_color”

ubuntu gnome_如何在Ubuntu Linux中为Gnome面板自定义字体和颜色

This text will make the font red. If you want other colors you’ll need to replace the Hex value/HTML Notation (in this case #FF0000) with the value of the color you want. To get the hex value you can use GIMP, Gcolor2 witch is available in the default repositories or you can right-click on your panel > Properties > Background tab then click to choose the color you want and copy the Hex value. Don’t change any other thing in the text. When done, save and close. Now press Alt+F2 and enter “killall gnome-panel” to force it to restart or you can log out and login again.

此文本将使字体变为红色。 如果需要其他颜色,则需要用所需颜色的值替换十六进制值/ HTML表示法(在本例中为#FF0000)。 要获取十六进制值,您可以使用GIMP,默认存储库中提供Gcolor2 witch,或者您可以右键单击面板>属性>背景选项卡,然后单击以选择所需的颜色并复制十六进制值。 不要更改文本中的其他任何内容。 完成后,保存并关闭。 现在按Alt + F2并输入“ killall gnome-panel”以强制其重新启动,或者您可以注销并再次登录。

Most of you will prefer the first way of changing the font and color for it’s ease of applying and because it gives you much more options but, some may not have the ability/will to download and install a new program on their machine or have reasons of their own for not to using it, that’s why we provided the two way.

你们中的大多数人都倾向于使用第一种更改字体和颜色的方法,因为它易于应用,并且因为它为您提供了更多选择,但是,有些人可能无法/将无法在其计算机上下载并安装新程序,或者有原因。自己不使用它,这就是我们提供两种方式的原因。

翻译自: https://www.howtogeek.com/howto/43885/how-to-customize-fonts-and-colors-for-gnome-panels-in-ubuntu-linux/

ubuntu gnome

相关文章:

  • 2021-11-15
  • 2021-10-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-30
  • 2021-05-26
  • 2021-12-19
猜你喜欢
  • 2022-12-23
  • 2021-06-25
  • 2021-11-23
  • 2021-12-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案