Fix the incorrect display behavior of the pipette cursor + add tooltip to Edit buttons

This commit is contained in:
Hombrenatureh.510
2014-03-15 17:00:44 +01:00
parent 1da9dda959
commit 0d57900a3b
9 changed files with 63 additions and 20 deletions

View File

@@ -33,6 +33,7 @@ ImageArea::ImageArea (ImageAreaPanel* p) : parent(p) {
pmlistener = NULL;
pmhlistener = NULL;
focusGrabber = NULL;
flawnOverWindow = NULL;
mainCropWindow = NULL;
previewHandler = NULL;
lastClosedX = -1;
@@ -44,6 +45,8 @@ ImageArea::ImageArea (ImageAreaPanel* p) : parent(p) {
indClippedPanel = Gtk::manage (new IndicateClippedPanel (this));
previewModePanel = Gtk::manage (new PreviewModePanel (this));
add_events(Gdk::LEAVE_NOTIFY_MASK);
signal_style_changed().connect( sigc::mem_fun(*this, &ImageArea::styleChanged) );
signal_size_allocate().connect( sigc::mem_fun(*this, &ImageArea::on_resized) );
@@ -209,8 +212,19 @@ bool ImageArea::on_motion_notify_event (GdkEventMotion* event) {
focusGrabber->pointerMoved (event->state, event->x, event->y);
else {
CropWindow* cw = getCropWindow (event->x, event->y);
if (cw)
if (cw) {
if (cw != flawnOverWindow) {
if (flawnOverWindow)
flawnOverWindow->flawnOver(false);
cw->flawnOver(true);
flawnOverWindow = cw;
}
cw->pointerMoved (event->state, event->x, event->y);
}
else if (flawnOverWindow) {
flawnOverWindow->flawnOver(false);
flawnOverWindow = NULL;
}
}
return true;
}
@@ -259,13 +273,19 @@ bool ImageArea::on_button_release_event (GdkEventButton* event) {
}
bool ImageArea::on_leave_notify_event (GdkEventCrossing* event) {
if (focusGrabber)
if (flawnOverWindow) {
flawnOverWindow->flawnOver(false);
flawnOverWindow = NULL;
}
if (focusGrabber) {
focusGrabber->flawnOver(false);
focusGrabber->leaveNotify (event);
}
else {
printf("ImageArea::1\n");
CropWindow* cw = getCropWindow (event->x, event->y);
if (cw) {
printf("ImageArea::appel\n");
cw->flawnOver(false);
cw->leaveNotify (event);
}
}