4 ms·
AFAIK Swing did not have the advanced theming capabilities that are now possible with modern CSS. Making the HTML widgets look and behave exactly like native C
by jarek-foksa 10y ago
AFAIK Swing did not have the advanced theming capabilities that are now possible with modern CSS.
Making the HTML widgets look and behave exactly like native Cocoa components is probably not going to happen, but definitely I can do better than Swing or GTK.
- stupidcar 10y agoSwing is an extremely powerful toolkit with very rich capabilities. And since it's backed by Java2D, you can control the painting of a widget at the pixel level, if you want to - which is something CSS won't have until the CSS Painting API arrives[1]. For proof, look at what JetBrains achieves in IntelliJ, which uses Swing. Technical capabilities are not the obstacle. The problem is that you're trying to reverse engineer and build a faithful emulation of a complex set of software components in a completely different language and runtime. And unlike emulating a legacy system, OS toolkits are a moving target. They get tweaked constantly, and often overhauled completely with each new release. [1] https://www.w3.org/TR/css-paint-api-1/ https://www.w3.org/TR/css-paint-api-1/
- evilduck 10y agoIntelliJ still feels like a Java app imitating a macOS app to me. They do better job than most, but if you open up the settings of it and compare it to XCode's setting, it jumps out at you.
- jarek-foksa 10y agoI would argue that the changes made to macOS HIG in the past ~15 years were rather cosmetic and incremental. It is a moving target, but it is moving very slowly. Anyway, cloning macOS UI is not my primary goal. I just want to build a widget toolkit that could be themed however I want.
- pjmlp 10y agoSwing is hardware accelerated, everything can be controlled down to pixel level and is fully multi-threaded. Anyone that has spend a few hours of their life reading either the "Rich Filthy Clients" Sun blog posts or the book that came out of it, should be able to write quite good Java Swing applications. With CSS even getting something basic like hardware acceleration, is a matter of playing with Z transforms and hopping that the user is running the right browser, with the right version on the right operating system and it will pick up those CSS hints and accelerate them. Even then, the amount of CSS tricks is limited, because each browser and GPU makes it different and it cannot be queried for.