Gimp-Forum.net

Full Version: Plugin not using dark theme
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm using Gimp 2.10.20 on Windows 7.  I set Gimp to use the dark theme.  Everything works great.


I installed a plugin called fanim timeline.

Now, the plug-in actually functions correctly.  However... the timeline window uses the default theme, not the dark theme.

The screenshot on GitHub clearly shows the plugin using the dark theme.  I don't know if it's a plugin problem, or my problem.  My other plugins recognize the dark theme and use it.
Quick test, (Win10) Looks like the plugin uses the Windows theme rather than the Gimp theme: example https://i.imgur.com/keD0gG5.jpg
(09-10-2020, 07:39 AM)rich2005 Wrote: [ -> ]Quick test, (Win10) Looks like the plugin uses the Windows theme rather than the Gimp theme: example https://i.imgur.com/keD0gG5.jpg

Yep.  That seems to be the case.  Thanks Rich.  Maybe I can figure out how to tweak that in the PY file.
IMO, the plugin fails to find your themerc file, falling back to the default window gtk theme.

Part of the code involved :
https://github.com/douglasvinis/gimp-fan...im.py#L478

https://github.com/douglasvinis/gimp-fan...im.py#L446
(09-10-2020, 06:25 PM)tmanni Wrote: [ -> ]IMO, the plugin fails to find your themerc file, falling back to the default window gtk theme.

Part of the code involved :
https://github.com/douglasvinis/gimp-fan...im.py#L478

https://github.com/douglasvinis/gimp-fan...im.py#L446

Possibly.

In C:\Users\<myuserid>\AppData\Roaming\GIMP\2.10\ I see a themerc file.  When I open and look at it, it contains:

Code:
style "gimp-spin-scale-style"
{
 GimpSpinScale::compact = 1
}

class "GimpSpinScale" style "gimp-spin-scale-style"

include "C:\\Program Files\\GIMP 2\\share\\gimp\\2.0\\themes\\Dark\\gtkrc"
include "C:\\Program Files\\GIMP 2\\etc\\gimp\\2.0\\gtkrc"
include "C:\\Users\\<myuserid>\\AppData\\Roaming\\GIMP\\2.10\\gtkrc"

Is themerc file in the wrong spot?  Is the code looking in the wrong location perhaps?  Where is does it look on line:
Code:
gimp.personal_rc_file('themerc')
I think the plugin author is trying to trap for a problem that doesn't exist:

If I do this:
Code:
       gtk.rc_parse(gtkrc_path)
     
#        if  os.name != 'nt':# try apply the theme by parse a gtkrc file if is not a windows system.
#            gtk.rc_parse(gtkrc_path)
#        else: # if error occur them parse the file in another way.
#            gtk.rc_add_default_file(gtkrc_path)
#            gtk.rc_reparse_all()

I get a themed plug-in:
[attachment=4895]