Darcula icon indicating copy to clipboard operation
Darcula copied to clipboard

Any chance of migration?

Open ice1000 opened this issue 6 years ago • 16 comments

As we can see in IntelliJ IDEA 2018.1 there're lots of UI changes, while this repo is not up-to-date. I spent a day trying to extract com.intellij.ide.ui.laf from the source code of IntelliJ IDEA but it's highly coupled to the whole code base.

I wonder if there's any possibility of migrating the (at least some) changes from the newest version (like the flat button UI) to this repo.

ice1000 avatar Apr 08 '18 10:04 ice1000

@ice1000 I can't agree more

rememberber avatar Apr 08 '18 13:04 rememberber

Would be fabulous - also because I could use darcula for an application that will have a variant that will be integrated in IntelliJ, so then it would be pretty much exactly the same laf.

Sciss avatar Apr 15 '18 12:04 Sciss

BTW my swing application is https://github.com/ice1000/dev-kt

ice1000 avatar Apr 15 '18 12:04 ice1000

I also tried to decouple Darcula from Intellij, but gave up after seeing how highly coupled it is to the codebase.

I wrote a script that extracts only the classes loaded by your application when using darcula. It works great although the extracted size is still large (5 mb)

https://gist.github.com/guaporocco/0a92b868027e43c79e608debd431cedb

guaporocco avatar Feb 26 '19 00:02 guaporocco

Super!

ice1000 avatar Feb 26 '19 00:02 ice1000

Here's an example photo as well:

https://photos.app.goo.gl/SeuqYAjnxureBqQJ8

guaporocco avatar Feb 26 '19 00:02 guaporocco

I also tried to decouple Darcula from Intellij, but gave up after seeing how highly coupled it is to the codebase.

I wrote a script that extracts only the classes loaded by your application when using darcula. It works great although the extracted size is still large (5 mb)

https://gist.github.com/guaporocco/0a92b868027e43c79e608debd431cedb

amazing!awesome!!can you share the extracts?

rememberber avatar Feb 26 '19 01:02 rememberber

You'll have to run it yourself (there are instructions in the gist). To create the full extract we'd need an example swing app that uses every feature, I haven't made one yet (and don't know if one already exists)

guaporocco avatar Feb 26 '19 01:02 guaporocco

You'll have to run it yourself (there are instructions in the gist). To create the full extract we'd need an example swing app that uses every feature, I haven't made one yet (and don't know if one already exists)

got it ,thanks! and can intelliJ just be the example swing app that uses every feature?

rememberber avatar Feb 26 '19 01:02 rememberber

It would then load the entirety of IntelliJ IDEA classes from what I understand. The goal here is to get the smallest set of classes out of the entire IntelliJ IDEA distribution that are needed for Darcula.

kirill-grouchnikov avatar Feb 26 '19 01:02 kirill-grouchnikov

@kirill-grouchnikov Exactly, probably not a good idea.

I do hope jetbrains considers decoupling their LAFs. Especially since Jetbrains Runtime is moving to Java 11, they'll be able to remove much of the hi-dpi and custom painting that they implemented. Doing the decoupling would also mean IDEA could have more than 2 themes. They could even have a theme section on their marketplace for user-customized themes. It can be a win-win!

guaporocco avatar Feb 26 '19 02:02 guaporocco

@kirill-grouchnikov Exactly, probably not a good idea.

I do hope jetbrains considers decoupling their LAFs. Especially since Jetbrains Runtime is moving to Java 11, they'll be able to remove much of the hi-dpi and custom painting that they implemented. Doing the decoupling would also mean IDEA could have more than 2 themes. They could even have a theme section on their marketplace for user-customized themes. It can be a win-win!

you may copy this advice reply to the Intellij repo's issues,let the official know!

rememberber avatar Feb 26 '19 02:02 rememberber

Updated the script to run on Java 8.. forgot InputStream::transferTo was added in Java 9!

And will do, @rememberber

guaporocco avatar Feb 26 '19 02:02 guaporocco

Updated the script to run on Java 8.. forgot InputStream::transferTo was added in Java 9!

And will do, @rememberber

thanks a lot!gist was blocked in China,not easy to access your gist, and any other way to keep in touch with you?wechat? : ) wanna make a friends with u, my email:[email protected]

rememberber avatar Feb 26 '19 06:02 rememberber

I suppose only Chinese use WeChat :)

ice1000 avatar Feb 26 '19 07:02 ice1000

A few days ago I was also trying to decouple the whole stuff, but have thus given up and and picked up my old fork instead, trying to tackle the Linux-specific problem again, and didn't manage to come up with anything better than calling UIUtil.getLabelFont() in advance in the LAF constructor... So I went on to port (and modify) one tiny piece of code from the current IntelliJ code base (https://github.com/JetBrains/intellij-community/commit/6b3981091cf7edecd0c12b4f182cb9c0f28ec4a0) to use system fonts under Windows and OS X/macOS > 10.10. The resulting binary is now usable under Linux, albeit not an elegant solution.

If any of you wish to try this build, it's here (https://github.com/CL-Jeremy/Darcula/commit/716af7e1606802e324b0729106200af435d92896). I just don't believe it should be merged.

CL-Jeremy avatar May 05 '19 22:05 CL-Jeremy