gtk_paradise 0.5.431 → 0.5.433

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of gtk_paradise might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0aac871a6b08c7a5d440126a06f2c7113c7f50d280552fc92a87781a51dd16c7
4
- data.tar.gz: f9cd54bea7d0ed8c6e4f1634ca526592a927cc9508b2db4f202036dbc5c2501c
3
+ metadata.gz: b9a826a1d29597ac58c1284a2ab3ee20885424605f827a4caf737a1de27499de
4
+ data.tar.gz: 869e016abb57830032b9096929d9258d570da85c524790376ce5e5e660e814ec
5
5
  SHA512:
6
- metadata.gz: 01fffc334a0fda2f76d25abfbc194ca91e2c3ef9b10d32cd92b0b83b339b63604a81090cd96c0e51740b042acb32a79429ad60f5ba0b530ac2233d150b0d0a20
7
- data.tar.gz: 23a425d8a04226cc7b8cc7e2ea77209390e8513ff742cd388e7e8fb676d008f2a039ccb9ab14617a0588888590eb75381ebf411bdb26b872b9f8e79ab6d15aca
6
+ metadata.gz: 4106ddbf7ca26c886f88baf82e2444f5d51aec6ac64750f8eca242f9d39729151165f5939282460e0d06de37a55ca3514e08e32ae7efad12cf8172a74ac22107
7
+ data.tar.gz: a31f2620968ff2674b76b95b6aec16715eab05b84811603bb542bb115e9fdd495f4ace32fc26b4ed05f4fcf57ce0583907b67fc7a3d7539518dc47d9869c9681
@@ -2368,8 +2368,14 @@ module BaseModule
2368
2368
  # image = Gtk::Image.new(pixbuf: icon)
2369
2369
  #
2370
2370
  # ========================================================================= #
2371
- def gtk_pixbuf(i)
2372
- ::Gtk::Image.new(pixbuf: i)
2371
+ def gtk_pixbuf(
2372
+ i, optional_width = nil, optional_height = nil
2373
+ )
2374
+ if optional_width
2375
+ ::Gtk::Image.new(pixbuf: i, width: optional_width, height: optional_height)
2376
+ else
2377
+ ::Gtk::Image.new(pixbuf: i)
2378
+ end
2373
2379
  end; alias gdk_pixbuf gtk_pixbuf # === gdk_pixbuf
2374
2380
 
2375
2381
  end
@@ -0,0 +1,37 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ require 'gtk3'
6
+
7
+ window = Gtk::Window.new
8
+
9
+ # =========================================================================== #
10
+ # Specify the path to your image here; this is for my home system, so
11
+ # change accordingly to your system please.
12
+ # =========================================================================== #
13
+ target_file = '/home/x/DATA/images/PC/EDITORS/BLUEFISH/BLUEFISH.png'
14
+
15
+ # =========================================================================== #
16
+ # The new API for Gtk::Image in ruby-gtk3 is:
17
+ #
18
+ # Gtk::Image#initialize(
19
+ # :stock => nil, :icon_name => nil, :icon_set => nil,
20
+ # :icon => nil, :file => nil, :pixbuf => nil,
21
+ # :animation => nil, :surface => nil, :size => nil
22
+ # )
23
+ #
24
+ # =========================================================================== #
25
+ image = Gtk::Image.new(file: target_file, size: :button)
26
+ # image = image.resize(25, 25)
27
+
28
+ # =========================================================================== #
29
+ # Or use:
30
+ # image.set_from_file(target_file)
31
+ # =========================================================================== #
32
+
33
+ window.add(image)
34
+ window.show_all
35
+ window.move(0, 0)
36
+
37
+ Gtk.main
@@ -9,7 +9,7 @@ module Gtk
9
9
  # ========================================================================= #
10
10
  # === VERSION_OF_THE_GTK_PARADISE_PROJECT
11
11
  # ========================================================================= #
12
- VERSION_OF_THE_GTK_PARADISE_PROJECT = '0.5.431'
12
+ VERSION_OF_THE_GTK_PARADISE_PROJECT = '0.5.433'
13
13
 
14
14
  # ========================================================================= #
15
15
  # === LAST_UPDATE
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gtk_paradise
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.431
4
+ version: 0.5.433
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert A. Heiler
@@ -238,6 +238,7 @@ files:
238
238
  - lib/gtk_paradise/examples/gtk3/hello_world_in_gtk3_and_bold_font.rb
239
239
  - lib/gtk_paradise/examples/gtk3/hover_button_example_via_css.rb
240
240
  - lib/gtk_paradise/examples/gtk3/icon_theme_example.rb
241
+ - lib/gtk_paradise/examples/gtk3/image_example.rb
241
242
  - lib/gtk_paradise/examples/gtk3/installation_assistant.rb
242
243
  - lib/gtk_paradise/examples/gtk3/menubar_example.rb
243
244
  - lib/gtk_paradise/examples/gtk3/notebook_css_example.rb