From 13a67ac44b1120308c2fc607715ddf0cf3d516e9 Mon Sep 17 00:00:00 2001 From: Denis Declara Date: Mon, 2 Apr 2012 12:08:22 +0200 Subject: Anchor widget now reads the last alignment from the settings. Anchor selection widget is also smaller now. (bzr r11073.1.10) --- src/ui/widget/anchor-selector.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/ui/widget/anchor-selector.cpp') diff --git a/src/ui/widget/anchor-selector.cpp b/src/ui/widget/anchor-selector.cpp index aa173e0a0..49387fc34 100644 --- a/src/ui/widget/anchor-selector.cpp +++ b/src/ui/widget/anchor-selector.cpp @@ -13,7 +13,7 @@ #include "ui/widget/anchor-selector.h" void AnchorSelector::setupButton(const Glib::ustring& icon, Gtk::ToggleButton& button) { - Gtk::Widget* buttonIcon = Gtk::manage(sp_icon_get_icon(icon, Inkscape::ICON_SIZE_LARGE_TOOLBAR)); + Gtk::Widget* buttonIcon = Gtk::manage(sp_icon_get_icon(icon, Inkscape::ICON_SIZE_SMALL_TOOLBAR)); buttonIcon->show(); button.set_relief(Gtk::RELIEF_NONE); @@ -67,3 +67,12 @@ void AnchorSelector::btn_activated(int index) _selectionChanged.emit(); } } + +void AnchorSelector::setAlignment(int horizontal, int vertical) +{ + int index = 3 * vertical + horizontal; + if(index >= 0 && index < 9) + { + _buttons[index].set_active(!_buttons[index].get_active()); + } +} -- cgit v1.2.3