Giter VIP home page Giter VIP logo

Comments (18)

weisJ avatar weisJ commented on June 10, 2024

Thank you for reporting this issue! Does this only happen with your custom editor theme or with all themes?

from auto-dark-mode.

kyochikuto avatar kyochikuto commented on June 10, 2024

Not sure about other editor themes, will test and report but I noticed that it only happens while Android Studio was running! Like if I suspend my machine before the sunset with Android Studio running in the background, and wake it up at night (by this time Ubuntu instantly switches to dark mode on login) I face this issue then!

This behavior is not observed when executing Android Studio AFTER the OS has switched to dark mode.

from auto-dark-mode.

weisJ avatar weisJ commented on June 10, 2024

I’ll try to replicate the issue but anything related to waking up after sleep mode is notoriously difficult for me to debug as I am using a VM for Gnome development.

I am guessing everything works as expected if you change your settings and hit apply?

from auto-dark-mode.

kyochikuto avatar kyochikuto commented on June 10, 2024

I confirmed and reapplied the settings a few times, actually it's my only option when the wrong theme is applied!

I take back my previous statement, it also happens in new launches not only during sleep. And when I check the plugin settings, the wrong themes are also selected, and I have to select the customized themes again and click Apply.

I'll attach the idea.log, hope it helps. If you need anything else I'd be more than glad to help.
idea.log

from auto-dark-mode.

kyochikuto avatar kyochikuto commented on June 10, 2024

I'm not sure what's the cause of this issue but I have a suggestion maybe if it will help: How about we introduce some delay (like 1 sec) after applying the IDE theme and then apply the Editor theme over?
Because it seems like whatever IDE theme is chosen takes precedence over Editor themes!

from auto-dark-mode.

weisJ avatar weisJ commented on June 10, 2024

Honestly this feels like a rather hackish solution. If there are problems due to timing adding artificial delays will only make the issue more difficult to reproduce. Would you mind sharing the editor scheme you are using?

from auto-dark-mode.

kyochikuto avatar kyochikuto commented on June 10, 2024

Not at all, here you go:
Color-Schemes.zip
The IntelliJ Light Customized is used for day time, and the One Dark Customized for the night time.

The reason I suggested the above workaround is that I notice a delay like a second or two when changing my IDE themes and it seems like a heavy operation on my machine, I thought maybe this takes a long time and by the time the plugin has changed the the editor theme, our IDE theme just finished applying and hence overriding the editor theme (since IntelliJ always applies the embedded color scheme too for any IDE theme)!

If this is really the case, are there any time-aware APIs for changing themes? Like a callback to make sure the IDE theme is completely applied now, and we can safely proceed to apply the editor color scheme over?

Thank you for your attention!

from auto-dark-mode.

weisJ avatar weisJ commented on June 10, 2024

I made some changes in #43 which should in theory fix the issue you are experiencing. Are you comfortable with building the plugin locally to try it out? If not I can provide a build for you.

from auto-dark-mode.

kyochikuto avatar kyochikuto commented on June 10, 2024

I made some changes in #43 which should in theory fix the issue you are experiencing. Are you comfortable with building the plugin locally to try it out? If not I can provide a build for you.

That's great thank you, I'd appreciate a build if it's okay.

from auto-dark-mode.

kyochikuto avatar kyochikuto commented on June 10, 2024

Okay, I tried building the PR you mentioned and I get the following error after ./gradlew :auto-dark-mode:buildPlugin :

FAILURE: Build failed with an exception.

* What went wrong:
Project 'auto-dark-mode' is ambiguous in root project 'auto-dark-mode'. Candidates are: 'auto-dark-mode-base', 'auto-dark-mode-linux', 'auto-dark-mode-linux-gnome', 'auto-dark-mode-macos', 'auto-dark-mode-plugin', 'auto-dark-mode-windows'.

What am I doing wrong?

from auto-dark-mode.

weisJ avatar weisJ commented on June 10, 2024

Sorry for not getting back to you sooner. You don't need to specify the name of the root-project with gradle gradlew build should work fine. Anyhow I have attached a build for you:
auto-dark-mode-plugin-1.6.2-2021.2-patch-1.zip (Just drag&drop into the plugins tab in the settings).

from auto-dark-mode.

kyochikuto avatar kyochikuto commented on June 10, 2024

It's okay, thank you for the build but when I try installing it, I face this error:

Plugin 'Auto Dark Mode' (version '1.6.2-2021.2-patch-1') is not compatible with the current version of the IDE, because it requires build 212 or newer but the current build is AI-203.7717.56

I'm on the latest stable version of Android Studio Arctic Fox.

from auto-dark-mode.

weisJ avatar weisJ commented on June 10, 2024

This version should be compatible with the IDEA version used by Android Studio:
auto-dark-mode-plugin-1.5.4-2020.3-patch-1.zip

from auto-dark-mode.

kyochikuto avatar kyochikuto commented on June 10, 2024

Thanks for the new build, installed it and manually changed my OS theme from light to dark and vice versa many times to test the plugin, it seems like only the Light Editor theme is correctly applied and for dark mode the default Dracula IDE theme is applied both as the IDE theme and the Editor theme, while I have selected the above mentioned One Dark Customized!

I even changed the settings once and re-selected my themes and re-applied but to no avail.

from auto-dark-mode.

kyochikuto avatar kyochikuto commented on June 10, 2024

Any progress on this?

I have recorded a screen cast depicting the issue I described earlier (the dark editor theme being broken), I hope it helps.

Thank you again for you time!

Peek.2021-11-17.17-16.mp4

from auto-dark-mode.

weisJ avatar weisJ commented on June 10, 2024

I’m sorry that I couldn’t invest much time into this issue. Other things currently take a lot of my time and I didn’t got to spend as much time on my projects as I would like. This is still on my todo list so please be patient. Hopefully I’ll get around to work on this at the weekend :)

from auto-dark-mode.

kyochikuto avatar kyochikuto commented on June 10, 2024

No worries! ;)
Take your time, wish you good luck with whatever has been keeping you busy. :)

from auto-dark-mode.

kyochikuto avatar kyochikuto commented on June 10, 2024

After testing the latest version 1.6.2 on Fedora 36, I can confirm this is fixed but there's another issue with the new libadwaita migration on GNOME 42 which I'll create a new issue for that promptly!

Thank you for all the hard work put into this amazing plugin!

from auto-dark-mode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.