次のレイアウトの Python/Gtk+3.0 アプリケーションがあります。
Gtk.Window
Gtk.Box
CustomClass : Gtk.ScrolledWindow
Gtk.ViewPort # created automatically
Gtk.Grid
Gtk.Box # many of this
Gtk.ScrollBar # created automatically
Gtk.ScrollBar # created automatically
今、私はそれをテーマにしようとしていますが、うまくいきません。Customclass の背景を変更したいのですが、CSS で変更したいのです。
私はしようとしています:
#CustomClass,
#CustomClass > GtkBox,
#CustomClass > GtkViewPort,
#CustomClass > GtkGrid,
GtkScrolledWindow GtkGrid {
background-color: #000;
}
テーマに関する適切なリファレンスはどこにありますか? システムにインストールされているテーマを見ると、次のようなものが表示されます
.custom-class { /* ... */}
GtkSomething.custom { /* ... */}
この種の「クラス」セレクターをコードからの要素と空き地からの要素に適用するにはどうすればよいですか。私は両方を使用しています。