class ThemingStyleClassesDemo
Theming/Style Classes¶ ↑
GTK+ uses CSS for theming. Style classes can be associated with widgets to inform the theme about intended rendering.
This demo shows some common examples where theming features of GTK+ are used for certain effects: primary toolbars, inline toolbars and linked buttons.
Public Class Methods
new(main_window)
click to toggle source
# File gtk3/sample/gtk-demo/theming_style_classes.rb, line 34 def initialize(main_window) @window = Gtk::Window.new(:toplevel) @window.screen = main_window.screen @window.title = "Style Classes" @window.resizable = false builder = Gtk::Builder.new(:resource => "/theming_style_classes/theming.ui") grid = builder["grid"] grid.show_all @window.add(grid) end
Public Instance Methods
run()
click to toggle source
# File gtk3/sample/gtk-demo/theming_style_classes.rb, line 46 def run if !@window.visible? @window.show_all else @window.destroy end @window end