[gtkmm-documentation] Use fallback for symbolic icons
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm-documentation] Use fallback for symbolic icons
- Date: Mon, 7 Apr 2014 15:22:30 +0000 (UTC)
commit 12959d5c02ef1d1e7bd552078b87c3db7d7787fc
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date: Mon Apr 7 17:18:52 2014 +0200
Use fallback for symbolic icons
* examples/book/actionbar/examplewindow.cc: Don't use magic number for
icon size. Allow fallback icons when using symbolic icon names.
* examples/book/headerbar/examplewindow.cc:
* examples/book/popover/examplewindow.cc:
* examples/book/searchbar/examplewindow.cc: Allow fallback icons when using
symbolic icon names. Some icon themes lack symbolic icons. Bug #723124.
examples/book/actionbar/examplewindow.cc | 8 ++++----
examples/book/headerbar/examplewindow.cc | 2 +-
examples/book/popover/examplewindow.cc | 6 +++---
examples/book/searchbar/examplewindow.cc | 4 ++--
4 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/examples/book/actionbar/examplewindow.cc b/examples/book/actionbar/examplewindow.cc
index 00ead0b..15ff7b1 100644
--- a/examples/book/actionbar/examplewindow.cc
+++ b/examples/book/actionbar/examplewindow.cc
@@ -31,12 +31,12 @@ ExampleWindow::ExampleWindow()
settings->property_gtk_application_prefer_dark_theme().set_value(true);
// Face
- m_face_image.set_from_icon_name("face-cool", Gtk::IconSize(6));
+ m_face_image.set_from_icon_name("face-cool", Gtk::ICON_SIZE_DIALOG);
// Center widget layout
- m_prev_button.set_image_from_icon_name("go-previous-symbolic");
- m_next_button.set_image_from_icon_name("go-next-symbolic");
- m_photo_button.set_image_from_icon_name("media-record-symbolic");
+ m_prev_button.set_image_from_icon_name("go-previous-symbolic", Gtk::ICON_SIZE_BUTTON, true);
+ m_next_button.set_image_from_icon_name("go-next-symbolic", Gtk::ICON_SIZE_BUTTON, true);
+ m_photo_button.set_image_from_icon_name("media-record-symbolic", Gtk::ICON_SIZE_BUTTON, true);
m_photo_box.pack_start(m_prev_button, Gtk::PACK_SHRINK, 0);
m_photo_box.pack_start(m_photo_button, Gtk::PACK_SHRINK, 0);
m_photo_box.pack_start(m_next_button, Gtk::PACK_SHRINK, 0);
diff --git a/examples/book/headerbar/examplewindow.cc b/examples/book/headerbar/examplewindow.cc
index d7c3590..21c4715 100644
--- a/examples/book/headerbar/examplewindow.cc
+++ b/examples/book/headerbar/examplewindow.cc
@@ -26,7 +26,7 @@ ExampleWindow::ExampleWindow()
set_border_width(12);
// Button
- m_button.set_image_from_icon_name("go-home-symbolic");
+ m_button.set_image_from_icon_name("go-home-symbolic", Gtk::ICON_SIZE_BUTTON, true);
m_button.signal_clicked().connect(sigc::mem_fun(*this, &ExampleWindow::on_button_clicked));
// Entries
diff --git a/examples/book/popover/examplewindow.cc b/examples/book/popover/examplewindow.cc
index 0032561..ca0ca75 100644
--- a/examples/book/popover/examplewindow.cc
+++ b/examples/book/popover/examplewindow.cc
@@ -83,9 +83,9 @@ void ExampleWindow::configure_form_popover()
void ExampleWindow::configure_form_buttons()
{
- m_toggle_form_buttons[0].set_image_from_icon_name("format-justify-left-symbolic");
- m_toggle_form_buttons[1].set_image_from_icon_name("format-justify-center-symbolic");
- m_toggle_form_buttons[2].set_image_from_icon_name("format-justify-right-symbolic");
+ m_toggle_form_buttons[0].set_image_from_icon_name("format-justify-left-symbolic", Gtk::ICON_SIZE_BUTTON,
true);
+ m_toggle_form_buttons[1].set_image_from_icon_name("format-justify-center-symbolic", Gtk::ICON_SIZE_BUTTON,
true);
+ m_toggle_form_buttons[2].set_image_from_icon_name("format-justify-right-symbolic", Gtk::ICON_SIZE_BUTTON,
true);
m_toggle_form_buttons[0].set_mode(false);
m_toggle_form_buttons[1].set_mode(false);
diff --git a/examples/book/searchbar/examplewindow.cc b/examples/book/searchbar/examplewindow.cc
index 636e4b1..278b81d 100644
--- a/examples/book/searchbar/examplewindow.cc
+++ b/examples/book/searchbar/examplewindow.cc
@@ -68,8 +68,8 @@ ExampleWindow::ExampleWindow()
m_up_down_box.get_style_context()->add_class("linked");
// Buttons
- m_go_up_button.set_image_from_icon_name("go-up-symbolic");
- m_go_down_button.set_image_from_icon_name("go-down-symbolic");
+ m_go_up_button.set_image_from_icon_name("go-up-symbolic", Gtk::ICON_SIZE_BUTTON, true);
+ m_go_down_button.set_image_from_icon_name("go-down-symbolic", Gtk::ICON_SIZE_BUTTON, true);
m_vbox.pack_start(m_search_bar, Gtk::PACK_SHRINK, 6);
m_vbox.pack_start(m_label, Gtk::PACK_SHRINK, 6);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]