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:
@@ -39,7 +39,7 @@ Adjuster::Adjuster (Glib::ustring vlabel, double vmin, double vmax, double vstep
|
||||
addMode = false;
|
||||
|
||||
// TODO: let the user chose the default value of Adjuster::delay, for slow machines
|
||||
delay = options.adjusterDelay; // delay is no more static, so we can set the delay individually (usefull for the RAW editor tab)
|
||||
delay = options.adjusterDelay; // delay is no more static, so we can set the delay individually (useful for the RAW editor tab)
|
||||
|
||||
set_border_width (2);
|
||||
|
||||
@@ -65,14 +65,13 @@ Adjuster::Adjuster (Glib::ustring vlabel, double vmin, double vmax, double vstep
|
||||
|
||||
hbox->pack_end (*reset, Gtk::PACK_SHRINK, 0);
|
||||
|
||||
spin = Gtk::manage (new Gtk::SpinButton ());
|
||||
spin->set_size_request (70, -1);
|
||||
spin = Gtk::manage (new MySpinButton ());
|
||||
|
||||
hbox->pack_end (*spin, Gtk::PACK_SHRINK, 0);
|
||||
|
||||
reset->set_size_request (-1, spin->get_height());
|
||||
|
||||
slider = Gtk::manage (new Gtk::HScale ());
|
||||
slider = Gtk::manage (new MyHScale ());
|
||||
slider->set_draw_value (false);
|
||||
|
||||
pack_start (*hbox, false, false);
|
||||
@@ -338,4 +337,3 @@ float Adjuster::trimValue (float& val) {
|
||||
else if (val < (float)vMin) val = (float)vMin; // shapeValue(vMin) ?
|
||||
return val;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user