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:
@@ -18,7 +18,6 @@
|
||||
*/
|
||||
#include <crop.h>
|
||||
#include <options.h>
|
||||
#include <guiutils.h>
|
||||
using namespace rtengine;
|
||||
using namespace rtengine::procparams;
|
||||
|
||||
@@ -50,12 +49,12 @@ Crop::Crop (): Gtk::VBox(), FoldableToolPanel(this) {
|
||||
Gtk::HBox* hb1 = Gtk::manage (new Gtk::HBox ());
|
||||
|
||||
hb1->pack_start (*Gtk::manage (new Gtk::Label (Glib::ustring(" ") + M("TP_CROP_X") +": ")));
|
||||
x = Gtk::manage (new Gtk::SpinButton ());
|
||||
x = Gtk::manage (new MySpinButton ());
|
||||
x->set_size_request (60, -1);
|
||||
hb1->pack_start (*x);
|
||||
|
||||
hb1->pack_start (*Gtk::manage (new Gtk::Label (Glib::ustring(" ") + M("TP_CROP_Y") + ": ")));
|
||||
y = Gtk::manage (new Gtk::SpinButton ());
|
||||
y = Gtk::manage (new MySpinButton ());
|
||||
y->set_size_request (60, -1);
|
||||
hb1->pack_start (*y);
|
||||
|
||||
@@ -64,12 +63,12 @@ Crop::Crop (): Gtk::VBox(), FoldableToolPanel(this) {
|
||||
Gtk::HBox* hb2 = Gtk::manage (new Gtk::HBox ());
|
||||
|
||||
hb2->pack_start (*Gtk::manage (new Gtk::Label (M("TP_CROP_W") + ": ")));
|
||||
w = Gtk::manage (new Gtk::SpinButton ());
|
||||
w = Gtk::manage (new MySpinButton ());
|
||||
w->set_size_request (60, -1);
|
||||
hb2->pack_start (*w);
|
||||
|
||||
hb2->pack_start (*Gtk::manage (new Gtk::Label (M("TP_CROP_H") + ": ")));
|
||||
h = Gtk::manage (new Gtk::SpinButton ());
|
||||
h = Gtk::manage (new MySpinButton ());
|
||||
h->set_size_request (60, -1);
|
||||
hb2->pack_start (*h);
|
||||
|
||||
@@ -87,10 +86,10 @@ Crop::Crop (): Gtk::VBox(), FoldableToolPanel(this) {
|
||||
|
||||
hb3->pack_start (*fixr, Gtk::PACK_SHRINK, 4);
|
||||
|
||||
ratio = Gtk::manage (new Gtk::ComboBoxText ());
|
||||
hb3->pack_start (*ratio, Gtk::PACK_SHRINK, 4);
|
||||
ratio = Gtk::manage (new MyComboBoxText ());
|
||||
hb3->pack_start (*ratio, Gtk::PACK_EXPAND_WIDGET, 4);
|
||||
|
||||
orientation = Gtk::manage (new Gtk::ComboBoxText ());
|
||||
orientation = Gtk::manage (new MyComboBoxText ());
|
||||
hb3->pack_start (*orientation);
|
||||
|
||||
pack_start (*hb3, Gtk::PACK_SHRINK, 4);
|
||||
@@ -98,7 +97,7 @@ Crop::Crop (): Gtk::VBox(), FoldableToolPanel(this) {
|
||||
Gtk::HBox* hb31 = Gtk::manage (new Gtk::HBox ());
|
||||
|
||||
hb31->pack_start (*Gtk::manage (new Gtk::Label (M("TP_CROP_GUIDETYPE"))), Gtk::PACK_SHRINK, 4);
|
||||
guide = Gtk::manage (new Gtk::ComboBoxText ());
|
||||
guide = Gtk::manage (new MyComboBoxText ());
|
||||
hb31->pack_start (*guide);
|
||||
|
||||
pack_start (*hb31, Gtk::PACK_SHRINK, 4);
|
||||
@@ -109,7 +108,7 @@ Crop::Crop (): Gtk::VBox(), FoldableToolPanel(this) {
|
||||
|
||||
Gtk::HBox* hb4 = Gtk::manage (new Gtk::HBox ());
|
||||
hb4->pack_start (*Gtk::manage (new Gtk::Label (M("TP_CROP_PPI"))));
|
||||
ppi = Gtk::manage (new Gtk::SpinButton ());
|
||||
ppi = Gtk::manage (new MySpinButton ());
|
||||
ppi->set_size_request (60, -1);
|
||||
hb4->pack_start (*ppi);
|
||||
|
||||
|
Reference in New Issue
Block a user