Some small GUI tweaks I've made that I think may interest others (compact interface)

These tweaks include a GTK3 theme tweaked to make MyPaint/everything more compact (I use it only with MyPaint, though, my other GTK3 theme is for some reason somewhat disfunctional in MyPaint, but it’s an obscured/discontinued theme, someone’s attempt at porting GTK2’s “Mist”), but also two small tweaks in two of MyPaint’s own files, one further makes the GUI more compact (the tool options panel, specifically), and the other makes the zoom/rotation status at the “footer” larger, more readable (I don’t know how the size was originally derived, but I believe the font had 4 or 5 pixels only)

On “mypaint.glade” I’ve changed the size of the zoom/rotation status (/usr/lib/mypaint/gui/ – on the appimage). On the <object class="GtkLabel" id="app_canvas_scale_label"> section, you’d add:

<attribute name="font-desc" value="Sans 15"/>

along with the other attribute (the default zoom, I assume).

This file is a humongous one-liner, which in my experience is slower and harder to edit this way. I’ve then “formated” it automatically by creating a backup copy and then overwritting the original:

xmllint --format mypaint.glade.bak > mypaint.glade

Incidentally it makes it easier to read and then to add this new item, but perhaps just toggling XML highlighting on a more sophisticated editor makes it easy enough. I didn’t notice any decrease in performance in having it formatted so I never bothered to search how to “undo” the formatting.

The tool options is made more compact by editing this line on mode.py (same directory):

def __init__(A):super(PaintingModeOptionsWidgetBase,A).__init__();A.set_row_spacing(**0**);A.set_column_spacing(6);from gui.application import get_app as C;A.app=C();A.adjustable_settings=set();B=A.init_common_widgets(0);B=A.init_specialized_widgets(B);B=A.init_reset_widgets(B)

Changing the “set_row_spacing” value between parentheses (the default hardcoded is 6, I believe) to zero or to whatever seems better to you.

The GTK theme in turn is merely some tweaks on Numix, I believe, made from ooomox and maybe some manual editing. Here’s the gtk.css itself

I don’t use it elsewhere, just for mypaint, which is run (on linux) with the following command line:

GTK_THEME="oomox-mod-oo" XDG_CONFIG_HOME=/home/d/.config/gtk-3.0/myp ~/.appimages/mypaint/AppRun

Being a decompressed appimage that I just leave like that. I’m not sure how it applies to MyPaint installed in a proper manner, if the files are still plain text and editable.

I’m not 100% sure of why I have also a separate XDG_CONFIG_HOME for mypaint, maybe I created it for earlier attempts at achieving the same results with tweaks on gtk’s CSS and other gtk stuff, so maybe just “GTK_THEME” would suffice once one has a compact enough theme installed in a standard location.

Here’s how it looks on a 1280x1024 screen (the title bar is also toggled off, to save more screen space, that’s done on openbox’ rc.xml, it would be different in other desktop environments):

Nevermind the art itself, it’s a work in progress.

1 Like

Nice stuff! The files in the appimages are minimized when the image is built, to reduce both the total size of the image and the time it takes to unpack the files when used normally. It does make the code pretty much unreadable however, so in general, for tweaking things I would recommend building from source instead.

1 Like

BTW, thanks to you for the shrinking of the tool options panel. Previously I was attempting to change it through CSS, you said it was not possible, and pointed to where it’s actually coded. Back then I thought it was just the source code and not still in an editable mode that doesn’t require compiling to work, somehow only now I noticed that’s not the case.

Great work, the beginning is good. Keep it up! :+1: