Looks like querying OS light/dark mode is on the w...
# compose-desktop
k
Looks like querying OS light/dark mode is on the way to Compose Desktop via Skiko - https://github.com/JetBrains/skiko/pull/118
🎉 3
d
Surprised it's being done on the skiko level.
k
I guess it's technically not Skia bindings, but given that it involves platform specific native API calls, it wouldn't conceptually belong in Compose Desktop.
☝️ 1
👍 2
c
Oh this is awesome and super timely for me. Thanks for posting! Also, I know I can just search google for these file extensions... but .cc and .mm? What is that all about?
o
Skiko is universal low level UI library for needs of Compose
k
Might want to expand the description of Skiko
@Colton Idle -
.mm
is for Objective C files (on macOS).
.cc
is the "regular" C++ file extension, also used interchangeably with
.cpp
c
Thanks. TIL!
e
usually .m is for Objectives-C, .mm is for Objectives-C++ ( objc mixed with c++)
🕵️‍♂️ 1
t
My kingdom for a GTK to Compose theme translator
k
There's certainly a precedent of a sorts in the Swing world. https://github.com/JFormDesigner/FlatLaf provides support for loading IntelliJ themes (in the original json format) in Swing apps. However, there's a lot of work involved there trying to bridge the gap, if you will, between two theming systems (even though IntelliJ itself is a Swing app, they chose a theming approach that is not 100% compatible with Swing look-and-feel UI delegates)
So a GTK -> Compose would need two big parts. The first part is a parser that can handle everything in a file like https://github.com/i-mint/bluesky/blob/master/BlueSky-Mountain-Dark/gtk-3.0/gtk.css. The second part will probably be much bigger - if you want to actually support every single thing in a GTK theme, you're going to end up writing a whole new collection of components that support all of these attributes. I don't think you'd be able to map all of them to Material components and attributes.
t
Oh totally. I'm not saying it's feasible. I think a better approach would be to adapt Compose to generate Gtk views.
k
Absolutely feasible. As long as you're willing to implement a collection of UI components that match the API surface of Gtk
Not sure what you mean by "adapt Compose to generate Gtk views"
t
I mean implement an Applier and Node to output Gtk views
basically make a compose-gtk
d
Like compose-web and dom.
k
I'm not sure how that would work, but certainly would cost less than a kingdom for somebody who's interested in it