From: cedlemo <nu...@co...> - 2017-08-29 00:06:05
|
cedlemo 2017-08-29 02:22:16 +0900 (Tue, 29 Aug 2017) New Revision: a8f69cbb352c979058df1a9db3c1bf923870886b https://github.com/ruby-gnome2/ruby-gnome2/commit/a8f69cbb352c979058df1a9db3c1bf923870886b Merged b3f3ba3: Merge pull request #1098 from cedlemo/gtk3_sample_gtk_demo_css_blendmodes_rb Message: Fix styles issues (Rubocop) Modified files: gtk3/sample/gtk-demo/css_blendmodes.rb Modified: gtk3/sample/gtk-demo/css_blendmodes.rb (+3 -4) =================================================================== --- gtk3/sample/gtk-demo/css_blendmodes.rb 2017-08-29 02:19:01 +0900 (4cd5ec612) +++ gtk3/sample/gtk-demo/css_blendmodes.rb 2017-08-29 02:22:16 +0900 (26411c878) @@ -16,7 +16,7 @@ class CssBlendmodesDemo @window.transient_for = main_window # Setup the CSS provider for window - @provider = Gtk::CssProvider.new + @provider = Gtk::CssProvider.new Gtk::StyleContext.add_provider_for_screen(Gdk::Screen.default, @provider, Gtk::StyleProvider::PRIORITY_APPLICATION) @@ -61,7 +61,7 @@ class CssBlendmodesDemo listbox = Gtk::ListBox.new @builder["scrolledwindow"].add(listbox) - listbox.signal_connect "row-activated" do |widget, w_row, w_provider| + listbox.signal_connect "row-activated" do |_widget, w_row, _provider| blend_mode = @blend_modes[w_row.index].id update_css_for_blend_mode(blend_mode) end @@ -72,7 +72,6 @@ class CssBlendmodesDemo label.xalign = 0 row.add(label) listbox.add(row) - normal_row = row if blend_mode.id == "normal" end @@ -84,7 +83,7 @@ class CssBlendmodesDemo def update_css_for_blend_mode(blend_mode) raw_css = Gio::Resources.lookup_data("/css_blendmodes/css_blendmodes.css", 0) - css = sprintf(raw_css, blend_mode, blend_mode, blend_mode) + css = format(raw_css, blend_mode, blend_mode, blend_mode) @provider.load_from_data(css) end end |