[ruby-gnome2-doc-cvs] [Ruby-GNOME2 Project Website] update - tut-gtk2-mnstbs-tb

Back to archive index

ruby-****@sourc***** ruby-****@sourc*****
2012年 11月 19日 (月) 07:05:07 JST


-------------------------
REMOTE_ADDR = 184.145.95.170
REMOTE_HOST = 
        URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-mnstbs-tb
-------------------------
@@ -266,6 +266,34 @@
 
  window.add(hbox)
 
+=== Tool Bar Style
+
+The toolbar style can be set with Gtk::Toolbar#toolbar_style=(style), where the 'style' is one of the following:
+
+ # Gtk::Toolbar#toolbar_style=(style)
+ # toolbar.toolbar_style = Gtk::Toolbar::Style::ICONS		# ok (works)
+ # toolbar.toolbar_style = Gtk::Toolbar::Style::TEXT		# ok (works)
+ # toolbar.toolbar_style = Gtk::Toolbar::Style::BOTH		# ok (default)
+ # toolbar.toolbar_style = Gtk::Toolbar::Style::BOTH_HORIZ	# nok., like ICONS 
+
+As you can see, the default is Gtk::Toolbar::Style::BOTH. Note that setting the toolbar style overrides the user's preferences for the default toolbar style. You will find the documentation at Gtk::Toolbar#GtkToolbarStyle
+
+
+=== Icon Size On Your Tool Bars:
+
+To control the size of the icons on the toolbar use Gtk::Toolbar#icon_size=(icon_size), where the 'icon_size' is one of the following:
+
+ # toolbar.icon_size = Gtk::IconSize::MENU		# the smallest same as button ... (grade:1)
+ # toolbar.icon_size = Gtk::IconSize::BUTTON		# the smallest same as menu ..... (grade:1)
+ # toolbar.icon_size = Gtk::IconSize::SMALL_TOOLBAR	# small ......................... (grade:1.2)
+ # toolbar.icon_size = Gtk::IconSize::INVALID		# Run-time warning .............. (grade:3)
+ # toolbar.icon_size = Gtk::IconSize::LARGE_TOOLBAR	# large ......................... (grade:3)
+ # toolbar.icon_size = Gtk::IconSize::DND		# one before the largest ........ (grade:4)
+ # toolbar.icon_size = Gtk::IconSize::DIALOG		# the largest ................... (grade:5)
+
+Note that I have graded the icon sizes above. In reality the differences are not very obvious, but they may be important for some applications. Indeed, the icons you created from your own image files are not affected by setting the Gtk::Toolbar#icon_size= value. For that you'd have to create a new image file and/or pixbuf with different sizes. You will find the documentation at: Gtk::IconSize#GtkIconSize
+
+
 
 {{br}}
 




ruby-gnome2-cvs メーリングリストの案内
Back to archive index