×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

PHD2: Some windows unreadable due to font color

  • Posts: 145
  • Thank you received: 15
Hi,
PHD2 under Astroberry works like a charm, and most of the GUI is perfectly readable. But some messages are hardly readable (e.g. calibration warnings appear as white text on an orange background), and some windows are almost completely unreadable like this drift align tool window:

I tried different color themes of Raspbian, but it seems themes change only window title bar colors (and corresponding text colors). Is there a way to customize PHD2's colors? Or customize Raspbian's colors?
CS, Bernd
3 years 11 months ago #52048
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 554
  • Thank you received: 138
This is why i abandoned Astroberry.
3 years 11 months ago #52059

Please Log in or Create an account to join the conversation.

  • Posts: 983
  • Thank you received: 375
General answer is yes. You can customize each and every component of look and feel. Just use Menu / Preferences / Apperance Settings or Openbox Configuration Manager or Qt Settings (for KDE apps such as KStars itself).
What you are referring to is PHD2, which... does not follow all system-wide configurations. For this very case the background color is hardcoded in PHD2. See: github.com/OpenPHDGuiding/phd2/blob/61ad.../drift_tool.cpp#L141
I do not maintain PHD2. I have reported an issue for you. See github.com/OpenPHDGuiding/phd2/issues/855
The following user(s) said Thank You: Bernd Limburg, jiberjaber, Marco
3 years 11 months ago #52062

Please Log in or Create an account to join the conversation.

  • Posts: 32
  • Thank you received: 13
PHD2 uses GTK 2. One possible workaround is to use a different theme only for PHD2 and let everything else use the dark theme. You can do that by setting the GTK2_RC_FILES variable when launching PHD2.

If you want to test this from a terminal window, you can launch phd2 using a different theme like this.
GTK2_RC_FILES=/usr/share/themes/Redmond/gtk-2.0/gtkrc phd2
If you want to make it somewhat permanent, you can override the desktop file for phd2 by first copying it to ~/.local/share/applications/.
cp /usr/share/applications/phd2.desktop ~/.local/share/applications/
Then change the Exec line to include the GTK2_RC_FILES variable for whatever theme works best.
Exec=env GTK2_RC_FILES=/usr/share/themes/Redmond/gtk-2.0/gtkrc phd2
Now when you launch PHD2 from the menu, it should have readable text... and blindingly bright dialog windows. B)
The following user(s) said Thank You: Eric, Bernd Limburg, Marco
3 years 9 months ago #55332

Please Log in or Create an account to join the conversation.

  • Posts: 388
  • Thank you received: 17
I changed to a "dark" theme and that solved the problem for PHd2, but caused more issues with Ekos in reading its pages. So now I am back to not being able to read the Phd2 "issues" window; but by now I know what they say anyway! I need to try what is suggest above. I do spend more time on these type of issues than I would like and should be spending on imaging. But without this software and its capability to assist in polar alignment, plate-solving, image sequencing, etc I am sure I would have given up a long time ago.

Ron
3 years 9 months ago #55337

Please Log in or Create an account to join the conversation.

  • Posts: 210
  • Thank you received: 104
I just submit a fix for the original issue with the 3 polar alignment tools.

It is possible to set a dark theme for phd2 without any change in Ekos because phd2 use the Gtk theme and Ekos the Qt theme. Be careful to not use a theme setting software that change both.

Also be careful that since Ubuntu 20.04 wxWidgets is no more packaged for Gtk2 but only for Gtk3. The phd2 ppa version for 20.04 is build for Gtk3 so this is the Gtk3 theme you now need to change.
The following user(s) said Thank You: Eric, Jerry Black, Kristopher
3 years 9 months ago #55343

Please Log in or Create an account to join the conversation.

  • Posts: 145
  • Thank you received: 15
@jugglerkris: Thanks, this workaround to change the theme only for PHD2 works great and all windows are perfectly readable (what I tested so far)! And KStars' and Ekos' windows are not affected. So, problem solved!
3 years 9 months ago #55347

Please Log in or Create an account to join the conversation.

  • Posts: 32
  • Thank you received: 13
Thanks for the code change, Patrick! That will eliminate the need for a workaround when it gets rolled out. The message text also shows up white on a yellowish background. Maybe hard-coding the text to black on those dialogs would make sense too. <shrug>

There is a GTK3 way to override a theme for a specific application also. It uses the GTK_THEME variable instead of the GTK2_RC_FILES variable. PHD2 needed the GTK2_RC_FILES variable when I tested on my Astroberry.

I've been using CCDciel instead of Ekos/KStars. Thanks for that wonderful tool as well!
3 years 9 months ago #55356

Please Log in or Create an account to join the conversation.

  • Posts: 210
  • Thank you received: 104
Thank you.
The yellow background for the top message is probably because of an incomplete dark theme because the color is not fixed in code.
For me using the Gnome standard theme Adwaita-dark the message background is dark gray. This theme for Gtk2 is normally available in the package gnome-themes-extra-data.
3 years 9 months ago #55388

Please Log in or Create an account to join the conversation.

  • Posts: 388
  • Thank you received: 17
I cannot quite tell from the above discussion whether this is doable now or when the next release of Phd2 comes out? I am currently running on an Rpi4 with Raspbian Buster; the Phd2 version I have is 2.6.7 and the top message shows up with the white text on the yellow background. I do not have GTK3 themes loaded, only what is standard with this OS (adwata, adwata-dark, etc). I do not see a way to change the theme for only Phd2.
I could use a little more specific help on how to proceed to make the change you suggest, if that is at all possible now.

thanks,
Ron
3 years 9 months ago #55488

Please Log in or Create an account to join the conversation.

  • Posts: 32
  • Thank you received: 13
@CapnRon, the fix that Patrick mentioned would require both a release of PHD2 and a release on Astroberry before the polar alignment screens in PHD2 would be readable when using the default theme in Astroberry. His fix does not address the top messages in PHD2 that are showing up with white text on a yellow background. That might be a theme issue in Astroberry, although I wasn't able to get Adwaita-dark to work when I tested it.

My instructions are suitable as a temporary workaround for both issues. They describe a way to override the theme that is used when you launch PHD2 and leave it alone for everything else. The idea was to just use a light theme for PHD2 and a dark theme for everything else.
Last edit: 3 years 9 months ago by Kristopher.
3 years 9 months ago #55491

Please Log in or Create an account to join the conversation.

  • Posts: 388
  • Thank you received: 17
ok, but I am still not sure how to set up separate themes for the two applications. I run "lxappearance" in a terminal window , it allows me to change "Widget" themes, but that does not appear to be application specific. Do I need to download something to do with GTK3 or a Phd config file somewhere that sets its theme?

thanks,
Ron
3 years 9 months ago #55494

Please Log in or Create an account to join the conversation.

Moderators: Radek Kaczorek
Time to create page: 1.532 seconds