While testing the experimental Last Modified add-on Gramplet by @cdhorn, I noted that the background for the tiles was stark white when the Gramplet was docked in the sidebar. But when undocked/detached, it was a grey.
Are they SUPPOSED to be different? Where is the documentation on color selection in add-ons?
Another ‘color in add-ons’ related question:
And in two recent beta tests, (a tool & the DNA Gramplet) 2 different developers used only the RGB portion of color settings for element backdrops to delineate between sections of the add-on. It worked well in Light Mode but made the Add-on unreadable in Dark Mode.
The solution was to leverage the alpha channel portion too. A semi-transparent RGBa adapted to the modes while the fully opaque does not.
It was a quick & easy fix. But is color testing in the suggested test cases in the developer docs?
The dashboard & its docking behaves differently than the sidebar/Bottombars. Interesting that colors come through when docked there.
(Although it is logical to launch Gramplets that are not category-specific via the Dashboard, my Dashboard layout is full. I’d rather not disturb that layout either. So I typically undock from the sidebar.)
Okay. I am seeing the same behavior when the addon is added to a view’s sidebar. But the same also happens when other addons are added to a sidebar vs the Dashboard. Try the Date Calculator.
In most themes, the sidebar background color is white which any addons attached to it takes as its own. Try the built-in Raleigh theme which uses a colored sidebar background.
I am in no way a CSS expert. Much of what I have learned has been to alter a setting and then seeing what changed. Sometimes what I wanted to change actually occurred.
Gramps will code to have a check box created. The theme applied, for Gramps Adwaita is the default, dictates what that check box will look like. Is the mark an actual check or an X or is the box filled in solid. And what color to make that mark. Add to that what happens to the check mark when you hover the cursor over it or when it becomes a part of a window that is no longer the focus window. All that is dictated by the theme CSS files.
You apply a different theme to Gramps the basic layout of information stays the same but how it is displayed changes.
And while all CSS files have the same finite set of potential settings, how they have been organized are different from theme to theme.
I was looking at the wiki and only found Linux oriented docs. But it looks like the Tool to use is GTK+ Inspector. Which appears to be enabled via DConf Editor. Unfortunately, the instructions for the DConf Editor are old and written for Linux.
Maybe one of our users whose equally conversant in Linux and Windoze can translate that dialect of Geek Speak?
Then the final step is probably locating the CSS themes used by the actual Gramps main GUI. (Since there seem to be several CSS locations.)
The background colour probably depends on the container. For a detached gramplet the container will be a Gtk.Dialog when docked it will be a Gtk.Notebook. I think that the gramplet pane in the Dashboard is a Gtk.ScrolledWindow.
Does that mean our Gtk.Notebook needs a Dark Mode background for Adwaita theme?
In Windows, the Titlebar background text color also does not respond to Dark Mode. So it ruins a person’s night vision. There’s a Windows settings trick title bar dark mode. (search for “Apply color to Start, taskbar, and Action Center”) Unfortunately, it only affects the Active Window in Gramps. The inactive Gramps Widows are very white background and light grey text…