Solving issue 735 : "Zooming with mouse wheel should zoom where the mouse is".

The scroll wheel is now used for scrolling the editor's tab content. If you want
to change the spin button's/slider's value or combobox entry, press the SHIFT key
while using the scroll wheel.

This patch also:
- reduce the spin buttons size (50px wide, instead of 70px)
- reduce the minimum size of the combobox (tool panels can now be narrower before
  showing the horizontal scrollbar)

Note to developers:
-------------------
When creating GUI for editor tools, please use the MyComboBox, MyComboBoxText,
MySpinButton and MyFileChooserButton derived class only in order to handle
the scroll wheel properly (-> #include <guiutils.h>).

Known bug: The MyFileChooserButton thas is a FILE_CHOOSER_ACTION_SELECT_FOLDER
does not respond correctly to the new behaviour.
This commit is contained in:
natureh
2011-09-02 15:16:30 +02:00
parent aaaccfa451
commit 42ba3169e0
42 changed files with 309 additions and 141 deletions

View File

@@ -35,7 +35,7 @@ WhiteBalance::WhiteBalance () : Gtk::VBox(), FoldableToolPanel(this), wbp(NULL),
hbox->show ();
Gtk::Label* lab = Gtk::manage (new Gtk::Label (M("TP_WBALANCE_METHOD")));
lab->show ();
method = Gtk::manage (new Gtk::ComboBoxText ());
method = Gtk::manage (new MyComboBoxText ());
method->show ();
method->append_text (M("TP_WBALANCE_CAMERA"));
method->append_text (M("TP_WBALANCE_AUTO"));
@@ -60,7 +60,7 @@ WhiteBalance::WhiteBalance () : Gtk::VBox(), FoldableToolPanel(this), wbp(NULL),
Gtk::Label* slab = Gtk::manage (new Gtk::Label (M("TP_WBALANCE_SIZE")));
slab->show ();
spotsize = Gtk::manage (new Gtk::ComboBoxText ());
spotsize = Gtk::manage (new MyComboBoxText ());
spotsize->show ();
spotsize->append_text ("2");
spotsize->append_text ("4");
@@ -69,7 +69,7 @@ WhiteBalance::WhiteBalance () : Gtk::VBox(), FoldableToolPanel(this), wbp(NULL),
spotsize->append_text ("32");
spotsize->set_active (2);
spotbox->pack_end (*spotsize, Gtk::PACK_SHRINK, 4);
spotbox->pack_end (*spotsize, Gtk::PACK_EXPAND_WIDGET, 4);
spotbox->pack_end (*slab, Gtk::PACK_SHRINK, 4);
pack_start (*spotbox, Gtk::PACK_SHRINK, 4);