-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Created basic layer movement functionality (up, down) #2108
Conversation
I have not finished my review or testing, but I did find a bug. If you try to move the layers of the circle counter, it changes the actual number inside the bubble. |
Yeah, i was able to replicate it. |
Yeah I don't think moving the layer should change the number. |
The numbered circles automatically calculate their "Number" after performing any editing operation. We had a number of issues with them previously, especially with removing the numbered circles. |
The purpose of the numbers though is not to indicate to the user "I am on layer x", its to be used when creating step by step directions. If I want to move a number above a rectangle, I dont really want the numbers to change. |
Numbered circles would be tricky to implemen with the state. |
@mmahmoudian thoughts on this? |
According to our (Namecheap) use cases "Number circles" should be sequential without missing. It's like an instruction what to do next. This is on of the killer features for us. And I have spent some time on fixing it in the past. I agree with @borgmanJeremy that numbers should remain the same after layers movement, his point is true: "its to be used when creating step by step directions". That is exactly how our team use it. I've asked them. As for me the behavior should remain the same, just don't renumber when updating the layer order. We need to update algorithm and do not recalculate the "number" on draw event, do it just on remove any numbered circle. |
I haven't tested this yet, so my understanding is only based on the discussion in this thread. That said,
I can think of it as feature and as bug. It has happened to me that I wanted to switch numbers and I had to drag them or undo and recreate them. I perhaps lean towards this as feature.
Agreed that it should not display the layer number, but would be cool to show the circle counter layer order.
Then why not moving that rectangle layer?
From time to time I need to skip a number because that step is in another screenshot. To to the trick, I have put the circles of those numbers I don't want out side of the screenshot area. So to sum up, I agree that it should be sequential without missing number.
I think @veracioux or @borgmanJeremy added a feature a while back to reset the counter to start from 0. I personally don't see a need for a feature to modify the number as in an odd case if someone wants it as a one-time thing they can manually create it with circle tool and text tool. But if you all think that there is a need, then I can suggest that perhaps we can make it so:
I believe it is relatively important to be able to start from 1 as someone might have a set of counters in red and another counter as blue. This would perhaps adds some complexity to the layer order thing if the user moves some of the blue counters in between the red ones. Ps. I hope I have correctly conveyed what I had in mind. If something is vague in my sentences I can explain. |
I think it's ready to be tested. Also, updated the arrows SVGs. I think these work better. Did a little gifs that showcase this feature. https://imgur.com/a/WPWMawW |
I just noticed you have dark mode enabled, but the icons are still black. Shouldn't they be white in dark mode? edit: also I noticed your white versions of the icons are colored |
It would be good to implement that. In this row, in code, there was only trash can, but it's always black. I'll try to look into it today.
Okay, gonna fix this! Also it seems that the arrow down ↓ is slightly shorter than the arrow up ↑, so put that to the list. |
Thanks, I'll get this tested soon. I've been busy QA testing for the version 11 release. I'd like to wait to merge this until after version 11 since I've sunk so much time into testing. |
Hello! Just wanted to ping here and tell I'm ready to make changes in case of bugs. |
Thanks, sorry we have been really bogged down on the version 11 release but that is starting to slow down. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the work on this. It's almost ready to merge. When I did testing on it I found an issue with the display of the sidebar on MacOs
The addition of the Move buttons cause the layout to spill over. The buttons need to be configured to fit in the existing size so it doest push the layout over.
@@ -1623,6 +1675,10 @@ void CaptureWidget::redo() | |||
drawToolsData(); | |||
update(); | |||
updateLayersPanel(); | |||
|
|||
// FIXME restore m_context.circleCount since this state isn't saved in undo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you clarify what needs to be done to remove this FIXME?
Okay, got it with the layout. By the way, I don't know if this is related, but on windows the sidebar has scroll down in my screen, and this is release version v11.0.0 (ad1bf28) Compiled with Qt 5.15.2 on winnt: 10.0.19043 |
When you said "got it" did you mean you pushed a fix? It's not fixed for me. I'm not too hung up on you fixing this if its hard to chase down. I'm working on reimpleneting all the widgets in Qt Designer so I can resolve it when I redo the side bar. |
Sorry for the confusion, I meant I understood your message about the problem. I am looking into the it and into ways to fix it right now. I will let you know until tomorrow on how that turned out. |
Hello! I got some results.
Please test on your machine and tell if buttons shrink now. |
Thanks, that resolves the issue on my machine as well. |
…2108) * Created basic layer movement functionality (up, down) * Replaced `and` and `or` with `&&` and `||`, added constructor initialization * Added move icons. Added that moving layers pushes state to undo stack. * Cleaned svgs. * Circle counter doesn't change nubmer when reordered anymore * Changed move arrow SVGs * Make down arrow in size with up arrow, fix white colors from #feffff to #fff * SVGs in unitilypanel for buttons now choose color depending on color theme * Refactor tool removing code, removed fixme, fixed bug with minimal circleCount * Set minimal width for buttons Co-authored-by: Feskow Vega <affirvega@krutt.org> (cherry picked from commit 1cc5a26)
Todo: use arrows instead of text; check if undo/redo works