【问题标题】:Make Gnome top bar font weight bold with CSS?使用 CSS 使 Gnome 顶部栏字体粗体变粗?
【发布时间】:2020-03-03 23:05:59
【问题描述】:

如何让 Gnome 的顶部栏字体粗细变粗?

我找到了 gnome-shell.css on GitLab 的源代码,它将 #panel 描述为目标 UI。

我已经在面板上尝试了这两个 CSS 属性:

#panel {
    font-weight: bold;
    /*font-weight: 700;*/
}

但似乎什么都没有改变。如果我设置background-color: red,那么背景变化会反映,所以我知道我的 CSS 文件至少可以正常工作。

这是我要更改的顶栏 UI 的屏幕截图:

【问题讨论】:

  • 您可能只需要更具体地使用您的 CSS 选择器。也许像#panel StLabel {} 这样的东西会起作用。

标签: linux ubuntu gtk gnome gnome-shell


【解决方案1】:

@andy.holmes 描述的方法似乎可以解决问题。将#panel StLabel 用于font-weight,将stage 用于font-family

此 CSS 正在运行:

#panel StLabel {
  font-weight: 500;
  font-size: 13px;
}

stage {
  font-family: "Inter", sans-serif;
}

【讨论】:

    【解决方案2】:

    我在~/.themes/MyTheme/gnome-shell/gnome-shell.css 下有一个自定义主题。 它适用于我在 Debian 10 下。你也可以尝试修改 /usr/share/themes/YOUR-THEME/gnome-shell/gnome-shell.cssstage 需要用于 CSS 选择器。

    stage {
          font-family: Carlito, Ubuntu, Cantarell, Sans-Serif;
          font-weight: bold;
          font-size: 10pt;
          color: #fafafa;
          }
    

    【讨论】:

      猜你喜欢
      • 2012-02-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-08-21
      • 2015-11-14
      • 2011-07-18
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多