Summary: | Editor Canvas : Expand selection rectangle by dragging sides in image editor [patch] | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | Stephen Cantini <stephen.cantini> |
Component: | Usability-Drag&Drop | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | CC: | caulier.gilles, languitar |
Priority: | NOR | ||
Version: | 1.0.0 | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 4.0.0 | |
Sentry Crash Report: | |||
Attachments: |
the patch allows to expand selection by dragging sides
patch #2 |
Description
Stephen Cantini
2008-09-04 09:41:58 UTC
Already implemented. Work perfectly with 0.10.0 Gilles Caulier I am afraid I cannot agree.. 0.10-beta7svn Still can change selected area by dragging corners. > I am afraid I cannot agree.. 0.10-beta7svn
> Still can change selected area by dragging corners.
Typo?
I can only say it works perfectly here...
For me works only in corners :( ok only from the corner, not from H/V sides. Gilles *** Bug 203843 has been marked as a duplicate of this bug. *** Created attachment 37639 [details]
the patch allows to expand selection by dragging sides
I suggest a patch for this. The patch allows to expand selection by dragging horizontal and vertical sides with a 10-pixel snap zone (same as corners). Tested against trunk and it works.
Thanks Ignat for the patch. It's very appreciate. I will test your patch soon. Just a question: Zoom in to canvas at different level, make a selection. Zoom in or out without to deselect. Selection still here ? if yes, change it again. Selection is not broken on screen ? Gilles Caulier Well, I zoomed into the canvas, selected a region, zoomed out, the selection was fine. Resized it and zoomed in/out a few times - everything was fine. Ignat, Excelent patch. Thanks again... To be homogeneous, can you take a look to Ratio Crop Tool which has also a selection widget which do not have yet this feature. http://websvn.kde.org/trunk/extragear/graphics/digikam/imageplugins/coreplugin/ratiocrop/imageselectionwidget.cpp?revision=1030990&view=markup Thanks in advance Gilles Caulier SVN commit 1037030 by cgilles: apply patch # 37639 from Ignat Semenov CCBUGS: 170364 M +106 -33 canvas.cpp M +17 -17 canvas.h WebSVN link: http://websvn.kde.org/?view=rev&revision=1037030 After looking at the Ratio Crop Tool, I've found quite some inconsistencies between the two widgets. The main question is: Selection Widget has an active area of 10 pixels, 5px inside, 5px outside, while Ratio Crop Widget has an active area of 10 pixels inside the rectangle. Which behavior is preferred for both widgets? Editor canvas sound better for me... But it just my viewpoint... Gilles Created attachment 37682 [details]
patch #2
Here is one more patch (against SVN trunk).
-changed selection area from 10 to 8 pixels for consistency with Ratio Crop Tool
-nicer corner drag rectangles
-it is now possible to drag the selection around with mouse; dragging is restricted by the picture
-it solves the problem of wrong sides expanding (my way)) the code is basically simpler
Please test
Should the bug be closed?
Why not use a const var for the selection area (8px)? This way it can be easily changed and even set with some value from a settings option, if we should ever provide one. I'll test the patch... SVN commit 1037972 by aclemens: Apply patch from Ignat Semenov CCBUG:170364 M +83 -47 canvas.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1037972 Ignat, For consistency, Ratio crop tool selection widget, which is not canvas.cpp as i explain in #10 must be patched in the same way to support resizement of selection using top/bottom/right/left side (currently only by corners is possible)... Thanks in advance Gilles Caulier I've started to work on this, but there are a few more differences between the two widgets. 1)In Ratio Crop, you click some area and it moves the selection to that point. No such thing in Simple Crop. Should I add it or remove it? (I haven't seen this in any other editor, it's kind of unusual - correct me if I'm wrong) 2)Ratio Crop grays out the image automatically and during resizing/dragging. Simple crop doesn't. What's preferred for both? My suggestions: 1) Click should NOT move the selection (like in editor) 2) Always grayed out (I spent quite some time optimizing this in RatioCrop, so I wouldn't want it to be removed again :-)) Also it is more visible, it always confuses me if you change the selection and the grayed out background disappears, but re-appears when you stop modifying the selection. This is too turbulent in my eyes. >1) Click should NOT move the selection (like in editor) Agree... >2) Always grayed out Agree too... Gilles Now, the code. These two widgets do (almost) the same. But the code for resizing and moving in the Ratio Crop Tool is (form my POV, maybe I simply don't get something)) quite a mess. Shouldn't the resizing/moving code be similar to that of Simple selectio widget (except for the ratio part)? And if yes, I'd like to bring the code of the two widgets in sync. (Apologies if I'm wrong, I'm quite new to Digikam code you see) It's difficult to factorize it. Editor Canvas is based on Q3ScrollView : It's not a pure QT4 class. Ratio Crop selection widget is not a Qt4::QScrollArea but Qt4::QWidget... We have planed with Andi to factorize image editor tool preview widget using QScroolArea, but it will a lots of job to do... Gilles Ah, so that's why it always maximizes/minimizes the image and never scrolls?) Well, anyway, I'll try to simplify the Ratio Crop selection widget resizing if you don't mind. Editor Canvas can scroll Ratio Crop tool Preview Cannot. Gilles Got it, Ratio Crop doesn't scroll by design. Fine. I've got a couple more questions (patches will follow, I promise :-)) 1)You'd like to port Canvas class from Q3ScrollView to Qt4 QScrollArea, right? 2)What about Shift+click (resize to a given point) and Ctrl+drag (resize symmerically) - do you want these in Simple Crop? Ping? Shift+click to resize seems a bit obscure feature to me, maybe remove it at all? No, it's not obscur. it's used in pro imagery software and implemented by a contributor few year ago. Please do not remove it. Gilles Ignat, Are you always there ? Do you have planed a patch for Ratio Crop tool selection to be homogeneous with editor canvas selection ? Gilles Caulier to Ignat, comment #25, 1/ yes, porting canvas class to qt4 is the plan. We have already a class named GraphicsDImgView that i already use with editor Raw Import tool preview. Creating a new Canvas class for editor based on this class can be fine. ^^^ Marcel ? 2/ Shift+click and Ctrl+drag are very important to be homogenous with gimp and photoshop which provide this selection behavior Gilles Caulier Ignat, Do you see my comment #29 ? Gilles Caulier Selection over editor canvas use now Qt4 model/view and respect wish from this bug entry. I close this file now. Gilles Caulier |