AvaloniaRider
AvaloniaRider copied to clipboard
Position the frame in the center
Hello!
It seems to me that it will be more convenient if the frame is located in the center
@rstm-sf @ForNeVeR
I don't know a lot about Kotlin (or Java) and/or IntelliJ IDEA plugin development but I was having a look at your code today; came up with the following, happy to try help and contribute to the project if it's needed.
- Centered image in layout
- Background checkerboard
- Added Zoom(ing) ComboBox (above image is scaled to 50%)
@wdcossey, this looks awesome. Have you seriously already implemented it? This is unbelievable!
@ForNeVeR
Yip, it's all "implemented" (still testing), I was playing around with adding a drop-shadow too and checking that it works with various themes.
It's still a little rough around the edges so I will revert some changes and start simple and expand on that.
- Center the image (in the
JBScrollPane
) as https://github.com/ForNeVeR/AvaloniaRider/issues/83. - Improve rendering (https://github.com/ForNeVeR/AvaloniaRider/issues/40), i.e. look at a custom drawn component rather than
JBLabel
(seems hackish). - Display some basic information (i.e.
width
,height
, etc) - Add some basic controls (i.e.
zoom in/out
,grid
, etc). - Add a
checkerboard
/chessboard
background. - Toggle
drop shadow
.
I will fork your master branch so you can keep track of the changes I make before raising a PR.
Still working on the changes but managed to get some rendering performance in there too (relates to https://github.com/ForNeVeR/AvaloniaRider/issues/40)
JLabel.icon
(old way) - Between 38-42 FPS in the preview
Custom JComponent implementation
- Between 48-64 FPS in the preview (seems limited to ~60 FPS even on my 144Hz monitor)
@wdcossey does it look awesome when planning to do PR? :)
@rstm-sf @ForNeVeR
You can pull my branch from here, build and run to have a look at it, feedback is welcome (I am not a Kotlin/Java dev 😋).
PS: I have removed the ActionToolbar with the zoom and grid options in my commits until they are tested.
Hey @ForNeVeR @rstm-sf, sorry for the delay, been busy with other projects and work.
Performance Testing:
Action Controls (Grid, Zoom +, Zoom -, Reset Zoom)
Zoom Levels are 25%
, 50%
, 100%
, 200%
, 300%
, 400%
and 800%
Grid is only visible at zoom levels 200% and up
200%
300%
400%
800%
@wdcossey, this is awesome. Do you want me to start PR from your branch myself? I could do that.
@ForNeVeR
Sure, you're more than welcome to start a PR, leave some comments and and make the changes if needed.
Ok, this was done some time ago.