Post Reply 

Color menuitems in script or plugin

Sep 15, 2014, 05:10
Post: #1
Color menuitems in script or plugin
Would like to be able to color red specific menuitems of some of my most used for easy find.

Is there a way to add
color: red !important;
into a script or plugin for only that specific script/plugin menuitem.
Thankyou.
Find all posts by this user
Quote this message in a reply
Sep 15, 2014, 06:23
Post: #2
RE: Color menuitems in script or plugin
Oh... so disappointed.
Well the keyboard shortcut thing doesn't work for me, too difficult to remember them and the easy "short" shortcuts I have already assigned for most important tasks that are not scripts/plugins.

Hoping in a future version some method for the specific menuitem coloring will be possible.

Thankyou ofnuts
Find all posts by this user
Quote this message in a reply
Sep 15, 2014, 08:09 (This post was last modified: Sep 15, 2014 08:49 by rich2005.)
Post: #3
RE: Color menuitems in script or plugin
No colour, but you could maybe create a bespoke menu item for your most favourite scripts, .scm or .py which are text. Compiled plugins not so easy. Maybe a second one for next favourite.

Use a decent text editor, find existing menu entry, duplicate it, then edit it, then comment (#) out the original. Important to keep the indents (spacing) the same as the original.

Here are 2 scm's and 2 .py's in a new drop down.

[Image: fRGIP7p.jpg]

Code:
examples

#(script-fu-menu-register "script-fu-auto-rotate" "<Image>/Layer" )
(script-fu-menu-register "script-fu-auto-rotate" "<Image>/Favourites/Auto-Rotate" )

or

#  menu="<Image>/Filters/Enhance",
  menu="<Image>/Favourites/Enhance",

If you try this, avoid duplicated scripts and edit, then try one at a time. Mistakes are very easy to make.

** https://www.gimp-forum.net/ now answering questions**
Find all posts by this user
Quote this message in a reply
Sep 29, 2014, 09:17 (This post was last modified: Sep 29, 2014 11:56 by paynekj.)
Post: #4
RE: Color menuitems in script or plugin
It is possible to highlight menuitems but you can't do it in a individual script, you have to make/alter the theme you are using:    

Here I have created a new theme, where the gtkrc file is only the following code, so that most of the styling is kept as the default, only very specific things are changed:
Code:
style "my_important"
{
  font_name = "sans bold 9"
  fg[NORMAL]        = "red"
}

style "my_ignore"
{
  fg[NORMAL]        = "yellow"
}

widget "GtkWindow.*.script-fu-drop-shadow.GtkAccelLabel" style:highest "my_important"
widget "GtkWindow.*.plug-in-nova.GtkAccelLabel" style:highest "my_important"

widget "GtkWindow.*.plug-in-gflare.GtkAccelLabel" style:highest "my_ignore"

I've been writing a guide to creating themes over on GimpChat: http://gimpchat.com/viewtopic.php?f=23&t=10531

Kevin
Find all posts by this user
Quote this message in a reply
Sep 29, 2014, 09:51
Post: #5
RE: Color menuitems in script or plugin
(Sep 29, 2014 09:30)ofnuts Wrote:  I've read the GC topic and don't see how you assign specific styles to specific menu entries?

That's because I haven't explained it yet Smile

Having just done it here, I'll add the explanation later today with more details about how you can use wildcards to style collections of items (script-fu, plugins, my own scripts etc) although I've no doubt you can look at my post above and work it out for yourself.

Kevin
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  How to modify this script-fu? Zakary81 1 31 Yesterday 12:48
Last Post: paynekj
  Loading PythonFu Plugin: ImportError for .../python/gimp.so (GIMP 2.8.22/OSX/Py2.7.9) joroek 1 126 Jul 11, 2017 07:26
Last Post: ythgilb
  [Easy] Sobel plugin parameters t4u 2 213 Oct 7, 2014 19:09
Last Post: ofnuts
  Need help in running a gui script-fu via command line eyalzek 2 227 Oct 4, 2014 14:05
Last Post: eyalzek
  script-fu ok in gimp, not in commad line dominique 1 265 Sep 28, 2014 03:18
Last Post: dominique

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS