weisJ / auto-dark-mode

IDEA plugin to automatically apply system theme settings on macOS and Windows.
https://plugins.jetbrains.com/plugin/14076-auto-dark-mode
MIT License
53 stars 14 forks source link

Settings Config: Gnome Additions #15

Closed IncPlusPlus closed 4 years ago

IncPlusPlus commented 4 years ago

A new build requirement has been added. Other than that, this is pretty straightforward.

weisJ commented 4 years ago

Looks good. Just some minor issue.

IncPlusPlus commented 4 years ago

Besides the formatting weirdness, I think this is in good shape. I wasn't able to address https://github.com/weisJ/auto-dark-mode/pull/9#issuecomment-665938147 in this PR. I'm not sure what the best way to do that would be. I thought maybe that enabled flag would be used to make the dropdown greyed-out but I don't know how to accomplish that.

weisJ commented 4 years ago

After doing some research it seems like the eclipse c++ formatted isn’t up to date with the syntax if newer versions of the language. It commonly mistakes the angle brackets of template arguments with comparison operators. For now there is nothing to be done about this.

I filed an issue for clang format support in autostyle.

weisJ commented 4 years ago

I wasn't able to address #9 (comment) in this PR.

I'm currently working on an implementation for this. Wasn't as easy as I thought it would be (changes to the settings are only propagated to the fields after they have been applied, so some trickery is needed).

weisJ commented 4 years ago

I have updated #9 to use providers for settings containers. And added the option to toggle settings elements.

weisJ commented 4 years ago

I just made some changes that enable the position of the guessLightAndDarkThemes to be at the beginning.

IncPlusPlus commented 4 years ago

I adapted my code for the recent changes but Kotlin isn't my strong suit. The behavior is currently inverted (checking the guess box will allow for the drop-downs to be used). I'd have to take some time to really comb through the rendering mechanisms you just made to figure out how to change that. Can you give me a hand?

weisJ commented 4 years ago

The best solution would be to make predicate a var in PropertyController and SimplePropertyController as well as adding the following extension method

fun <T> PropertyController<T>.inverted() = predicate.let { predicate = { t -> !it(t) } }

You can then simply call inverted() inside the persistentBooleanProperty.

weisJ commented 4 years ago

Looking all good now 👍