Gimp-Forum.net
Plugin not using dark theme - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: General questions (https://www.gimp-forum.net/Forum-General-questions)
+--- Thread: Plugin not using dark theme (/Thread-Plugin-not-using-dark-theme)



Plugin not using dark theme - xeonicus - 09-10-2020

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.


RE: Plugin not using dark theme - rich2005 - 09-10-2020

Quick test, (Win10) Looks like the plugin uses the Windows theme rather than the Gimp theme: example https://i.imgur.com/keD0gG5.jpg


RE: Plugin not using dark theme - xeonicus - 09-10-2020

(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.


RE: Plugin not using dark theme - tmanni - 09-10-2020

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-fanim/blob/master/fanim.py#L478

https://github.com/douglasvinis/gimp-fanim/blob/master/fanim.py#L446


RE: Plugin not using dark theme - xeonicus - 09-10-2020

(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-fanim/blob/master/fanim.py#L478

https://github.com/douglasvinis/gimp-fanim/blob/master/fanim.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')



RE: Plugin not using dark theme - Kevin - 09-11-2020

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]