Gimp-Forum.net
Hack Palette Editor name - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: Gimp 2.99 & Gimp 3.0 (https://www.gimp-forum.net/Forum-Gimp-2-99-Gimp-3-0)
+--- Thread: Hack Palette Editor name (/Thread-Hack-Palette-Editor-name)



Hack Palette Editor name - pixelmixer - 08-09-2023

Hi!,

Maybe the wrong place to ask, maybe not.
Does anybody know how to hack out the name that's displayed above a palette in the palette editor?
I'm trying to get a floating color swatch as small as possible, to tap and set the foreground color.
[attachment=10182]
gimppaletteeditor.c looks promising, and you can hide some widgets, I can't identify the name element though.


RE: Hack Palette Editor name - CmykStudent - 08-10-2023

(08-09-2023, 10:02 PM)pixelmixer Wrote: Hi!,

Maybe the wrong place to ask, maybe not.
Does anybody know how to hack out the name that's displayed above a palette in the palette editor?
I'm trying to get a floating color swatch as small as possible, to tap and set the foreground color.

gimppaletteeditor.c looks promising, and you can hide some widgets, I can't identify the name element though.

It's created in the GimpDataEditor class. You don't want to delete it there though. Search for gtk_widget_show (data_editor->view); and add this line below it:

Code:
  gtk_widget_set_visible (data_editor->name_entry, FALSE);

Hope it helps! You'll probably want to make a patch out of this so you can reapply it as needed.


RE: Hack Palette Editor name - Ofnuts - 08-10-2023

(08-09-2023, 10:02 PM)pixelmixer Wrote: Hi!,

Maybe the wrong place to ask, maybe not.
Does anybody know how to hack out the name that's displayed above a palette in the palette editor?
I'm trying to get a floating color swatch as small as possible, to tap and set the foreground color.

gimppaletteeditor.c looks promising, and you can hide some widgets, I can't identify the name element though.

Instead of hacking the C file, maybe you can just hack/create a translation file.

But if you have only two colors, why not assign them to the FG/BG colors, and then use the standard X shortcut to swap them?

[attachment=10183]



RE: Hack Palette Editor name - pixelmixer - 08-10-2023

Hi,

I found that with a swap color shortcut, I'd still not know what the foreground color is without looking away
from the working area, at a swatch, then back to the brush tip. It works really well for me to 'tap' the color I want next to where I'm working.  Ideally the working color would be indicated somehow on the brush cursor, just like a real brush.

(08-10-2023, 06:33 AM)CmykStudent Wrote:
(08-09-2023, 10:02 PM)pixelmixer Wrote: Hi!,

Maybe the wrong place to ask, maybe not.
Does anybody know how to hack out the name that's displayed above a palette in the palette editor?
I'm trying to get a floating color swatch as small as possible, to tap and set the foreground color.

gimppaletteeditor.c looks promising, and you can hide some widgets, I can't identify the name element though.

It's created in the GimpDataEditor class. You don't want to delete it there though. Search for gtk_widget_show (data_editor->view); and add this line below it:

Code:
  gtk_widget_set_visible (data_editor->name_entry, FALSE);

Hope it helps! You'll probably want to make a patch out of this so you can reapply it as needed.

It did! Thank you Smile