Skip to content
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

Feature Request: Rectangle Shape #172

Open
mrshu opened this issue Oct 18, 2021 · 4 comments
Open

Feature Request: Rectangle Shape #172

mrshu opened this issue Oct 18, 2021 · 4 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@mrshu
Copy link

mrshu commented Oct 18, 2021

Is your feature request related to a problem? Please describe.
I would like to be able to have a Rectangle shape of the spotlight

Describe the solution you'd like
Just as there is (Rounded) Square listed as one of the options for Shapes, I believe it would be great to have a rectangle as an option (this is especially valuable when highlighting code)

Describe alternatives you've considered
Well, the Square shape kind of works but you have to make it real large for it to have real impact. when the thing you are trying to highlight is actually larger in either height or width. Hence, I do believe a Rectangle would be a bit better.

@mrshu
Copy link
Author

mrshu commented Oct 18, 2021

@jahnf I've found https://github.com/jahnf/Projecteur/blob/dfb52bb0b86189ac5cc9383011e0028d2271ccb4/qml/spotshapes/Square.qml and I do think this should be rather doable, if you'd be up for it. I'd probably try to give it a shot myself 🙂

@jahnf jahnf changed the title Feature Request: Title Feature Request: Rectangle Shape Oct 18, 2021
@jahnf
Copy link
Owner

jahnf commented Oct 18, 2021

..., if you'd be up for it. I'd probably try to give it a shot myself 🙂

Sure, pull requests are welcome 🙂

In any case, I see how a rectangle can be useful for highlighting text or code blocks.

@mrshu
Copy link
Author

mrshu commented Oct 18, 2021

Thanks @jahnf, that's great to hear!

If you'd be implementing rectangle shape now, where would you start? Would updating the Square shape be a sensible way forward?

@jahnf
Copy link
Owner

jahnf commented Oct 19, 2021

@mrshu Yes I guess extending the current "Square" shape with 2 additional properties would work

  • for example: ratio-x, ratio-y - these would be editable like the parameters for the star shape for exeample.

With that the user could then set the "screen"-ratio or rather rectangle ratio of the shape, e.g. 16:9 or 30:3 or 3:4... or 1:1 (which would be a square)

The tricky part will be the (anchor) bindings that have to change depending on if the rectangle ratio is landscape or portait.
(I would use solve this with states in the shape's qml file, while the state conditions are dynamically calculated, see also https://doc.qt.io/qt-5/qml-qtquick-anchorchanges.html)

Also renaming the "Square" shape to a "Rectangle" will break old settings, that is also something to think about.

@jahnf jahnf added this to the v1.0 milestone Mar 13, 2023
@jahnf jahnf added the enhancement New feature or request label Oct 13, 2023
@jahnf jahnf self-assigned this Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants