Firefox tidak terpengaruh oleh tema gtk

19

Bagaimana saya bisa membuat firefox menggunakan tema Adwaita seperti semua aplikasi lain lakukan?

Baik: baik

Buruk: buruk

Lebih disukai juga membuat halaman web lebih gelap juga.

Mislav Blažević
sumber
Anda juga ingin "Lebih disukai juga membuat halaman web lebih gelap juga". Saya tidak yakin bahwa ini adalah pekerjaan tema GTK. Untuk itu, lebih baik untuk menginstal ekstensi Gaya dan gaya pengguna yang sesuai dari userstyles.org (atau memodifikasi userContent.css).
Saya memiliki masalah yang sama dengan Firefox dan aplikasi GTK2 lainnya, dan menyelesaikannya menggunakan tema ini (perhatikan versi untuk mencocokkan shell diperlukan)
Wilf

Jawaban:

15

Anda dapat menggunakan Gnome Tweak Tool untuk menggunakan tema gelap untuk semua aplikasi:

alat tweak - mengaktifkan tema gelap untuk semua aplikasi

TAPI

Firefox menggunakan GTK2. Alat Gnome Tweak hanya mengedit pengaturan GTK3, maka kita perlu mengedit /usr/share/themes/Adwaita/gtk-2.0/gtkrcfile.

  1. Awalnya kami membuat cadangan file gtkrc kami

    sudo cp /usr/share/themes/Adwaita/gtk-2.0/gtkrc /usr/share/themes/Adwaita/gtk-2.0/gtkrc.bak
    
  2. Selanjutnya salin yang berikut dan ganti file gtkrc yang ada:

    #Color scheme originally contributed by Franco Gotusso as Clearlooks-DarkOrange 
    # Based on Clearlooks-DarkCoffee by Chibi and edited by bvc as Clearlooks-DarkCoffee2
    
    style "clearlooks-default"
    {
      GtkMenuItem::selected_shadow_type = none
      GtkWidget::interior_focus = 1
      GtkButton::default_border = { 3, 3, 3, 3 }
      GtkButton::default_outside_border = { 3, 3, 3, 3 }
      GtkRange::trough_border = 2
    
      GtkWidget::focus_padding = 1
    
      GtkPaned::handle_size = 6
    
      GtkRange::slider_width = 15
      GtkRange::stepper_size = 15
      GtkScrollbar::min_slider_length = 30
      GtkCheckButton::indicator_size = 12
      GtkMenuBar::internal-padding = 0
    
      GtkTreeView::expander_size = 14
      GtkExpander::expander_size = 16
    
      GtkTreeView::odd_row_color = "#404040"
    
      GtkWidget::cursor_color           = "#72706E"
      GtkWidget::secondary_cursor_color = "#72706E"
    
      xthickness = 1
      ythickness = 1
    
      fg[NORMAL]        = "#d2cfcc" #Main window text
      fg[PRELIGHT]      = "#E9E9E9" #Highlighted widget text
      fg[ACTIVE]        = "#ADA59D" #Inactive widget text
      fg[SELECTED]      = "#E9E9E9"
      fg[INSENSITIVE]   = "#A18989"
    
      bg[NORMAL]        = "#393f3f" #Backround
      bg[PRELIGHT]      = "#3465A4" #Highlight Widget
      bg[ACTIVE]        = "#2E3232" #Selected Widget
      bg[SELECTED]      = "#3465A4" #The box words are usually in
      bg[INSENSITIVE]   = "#282B2B" #Not active buttons
      base[NORMAL]      = "#4F524F" #Text area widgets
      base[PRELIGHT]    = "#313131" #Check and radio button background
      base[ACTIVE]      = "#313636" #Unfocused Select
      base[SELECTED]    = "#2F4C6D" #Selected Text area item, and that bar over the tabs.
      base[INSENSITIVE] = "#f5f2ee" #
    
      text[NORMAL]      = "#EEEEEC" #Text area widget text.
      text[PRELIGHT]    = "#E9E9E9" #
      text[ACTIVE]      = "#ADA59D" #
      text[SELECTED]    = "#E9E9E9" #Selected Text area widget text.
      text[INSENSITIVE] = "#757575" #
    
    engine "clearlooks"
       {
        #    sunkenmenubar      = 1       # 0 = disable, 1 = enable
        #    menuitemstyle      = 1       # 0 = flat, 1 = 3d-ish (button)
        #    listviewitemstyle  = 1       # 0 = flat, 1 = 3d-ish (gradient)
        #    progressbarstyle   = 0       # 0 = candy bar, 1 = flat
      }
    }
    
    style "clearlooks-wide" = "clearlooks-default"
    {
      xthickness = 2
      ythickness = 2
      bg[NORMAL]   = "#414141"
      bg[PRELIGHT] = "#494949"
    }
    
    style "clearlooks-button" = "clearlooks-wide"
    {
      bg[NORMAL]   = "#414141"
      bg[PRELIGHT] = "#494949"
    }
    
    style "clearlooks-notebook" = "clearlooks-wide"
    {
      bg[NORMAL] = "#404040"
      bg[ACTIVE] = "#303030"
    }
    
    style "clearlooks-tasklist" = "clearlooks-default"
    {
      xthickness = 5
      ythickness = 3
    }
    
    style "clearlooks-menu" = "clearlooks-default"
    {
      xthickness = 2
      ythickness = 1
      bg[NORMAL] = "#404040"
    }
    
    style "clearlooks-menu-item" = "clearlooks-default"
    {
      xthickness = 2
      ythickness = 3
      fg[PRELIGHT]   = "#E9E9E9"
      text[PRELIGHT] = "#E9E9E9"
      base[PRELIGHT] = "#3465A4"
      base[SELECTED] = "#3465A4"
    }
    
    style "clearlooks-menu-itembar" = "clearlooks-default"
    {
      xthickness = 3
      ythickness = 3
    }
    
    style "clearlooks-tree" = "clearlooks-default"
    {
      xthickness = 2
      ythickness = 2
    }
    
    style "clearlooks-frame-title" = "clearlooks-default"
    {
      fg[NORMAL] = "#e2dfdc"
    }
    
    style "clearlooks-panel" = "clearlooks-default"
    {
      xthickness = 3
      ythickness = 3
    }
    
    style "clearlooks-tooltips" = "clearlooks-default"
    {
      xthickness = 4
      ythickness = 4
      bg[NORMAL] = "#3465A4"
    }
    
    style "clearlooks-progressbar"  = "clearlooks-default"
    {
      xthickness = 1
      ythickness = 1
       fg[PRELIGHT]         = "#e2dfdc"
       bg[NORMAL]           = "#2d1d11"
    }
    
    style "clearlooks-combo" = "clearlooks-default"
    {
      xthickness = 1
      ythickness = 2
      fg[NORMAL]            = "#141414"
      fg[PRELIGHT]          = "#ed7013"
      fg[ACTIVE]            = "#e2dfdc"
      bg[NORMAL]            = "#414141"
      bg[PRELIGHT]          = "#494949"
    }
    
    style "clearlooks-scrollbar" = "clearlooks-default"
    {
      fg[NORMAL]            = "#141414"
      fg[PRELIGHT]          = "#e2dfdc"
      fg[ACTIVE]            = "#e2dfdc"
      bg[NORMAL]            = "#414141"
      bg[PRELIGHT]          = "#494949"
    }
    
    style "clearlooks-spin" = "clearlooks-wide"
    {
      fg[NORMAL]            = "#141414"
      fg[PRELIGHT]          = "#e2dfdc"
      fg[ACTIVE]            = "#e2dfdc"
      bg[PRELIGHT]          = "#414141"
      bg[ACTIVE]            = "#494949"
    }
    
    class "GtkWidget" style "clearlooks-default"
    class "GtkRange" style "clearlooks-wide"
    class "GtkFrame" style "clearlooks-wide"
    class "GtkSpinButton" style "clearlooks-spin"
    class "GtkStatusbar" style "clearlooks-wide"
    class "GtkMenu" style "clearlooks-menu"
    class "GtkMenuItem" style "clearlooks-menu-item"
    widget_class "*MenuItem.*" style "clearlooks-menu-item"
    class "GtkEntry" style "clearlooks-wide"
    widget_class "*.tooltips.*.GtkToggleButton" style "clearlooks-tasklist"
    widget_class "*.GtkTreeView.GtkButton" style "clearlooks-tree"
    widget_class "*.GtkCTree.GtkButton" style "clearlooks-tree"
    widget_class "*.GtkList.GtkButton" style "clearlooks-tree"
    widget_class "*.GtkCList.GtkButton" style "clearlooks-tree"
    widget_class "*.GtkFrame.GtkLabel" style "clearlooks-frame-title"
    widget_class "BasePWidget.GtkEventBox.GtkTable.GtkFrame" style "clearlooks-panel"
    widget "gtk-tooltips" style "clearlooks-tooltips"
    class "GtkNotebook" style "clearlooks-notebook"
    class "GtkProgressBar" style "clearlooks-progressbar"
    widget_class "*.GtkComboBox.GtkButton" style "clearlooks-combo"
    widget_class "*.GtkCombo.GtkButton" style "clearlooks-combo"
    class "GtkButton" style "clearlooks-button"
    class "GtkScrollbar" style "clearlooks-scrollbar"
Stormvirux
sumber
Sudah diaktifkan ... Anda dapat melihatnya di tangkapan layar. Pengaturan saya. Terlihat seperti itu juga.
Mislav Blažević
1
@Stormvirux, Anda menulis: "Anda juga harus Mengedit ~ / .config / gtk-2.0 / settings.ini". Apakah Anda yakin bahwa gtk-2.0 menggunakan settings.ini? Saya pikir hanya gtk-3.0 yang melakukannya.
1
@Stormvirux nevermind komentar terakhir! Saya menemukan jawabannya sendiri. Terima kasih untuk tema ini, I LOVE IT !!
Mislav Blažević
1
Oof, saya pergi ke depan dan melakukan ini. Itu membuat Firefox bekerja di Ubuntu 3.10, tetapi tajuknya masih putih dan temanya tampak buruk secara umum dan tidak konsisten dengan Adwaita. Sayangnya ini tidak akan diperbaiki untuk waktu yang lama.
mlissner
1
Maaf atas komentar necro di sini. Saya menemukan T / A ini untuk membantu dalam masalah ini di Ubuntu Gnome 14.04, namun saya tidak menggunakan kode yang disediakan oleh Stromvirux (saya mencobanya, tetapi itu hanya memberikan tampilan Firefox 4.0 lama untuk itu, daripada adwita gelap ). Saya malah menggunakan default gtkrcdan hanya mengganti baris gtk-color-schemedengan yang berikut: gtk-color-scheme = "base_color:#4F524F\nfg_color:#eeeeec\ntooltip_fg_color:#eeeeee\nselected_bg_color:#3465a4\nselected_fg_color:#eeeeec\ntext_color:#EEEEEC\nbg_color:#363B3B\ninsensitive_bg_color:#8c8984\ntooltip_bg_color:#000000"
mason81
1

Pada versi Firefox yang lebih baru (67) Dukungan tema gelap GTK3 masih sampah. (Bentuk widget sering render dengan warna yang salah.) Berikut adalah perbaikan band-aid:

Goto: about:config 
Add String entry: widget.content.gtk-theme-override
Set value to: Adwaita:light
Goto Customizations: choose Dark theme
Scott P.
sumber