v1cont / yad

Yet Another Dialog
GNU General Public License v3.0
687 stars 57 forks source link

Labels of form field buttons always centered #122

Closed manuel-192 closed 3 years ago

manuel-192 commented 3 years ago

Yad version 8.0.

yad --form --width=400 --align=left --field="Firefox":fbtn "firefox"

Yad man page says form field label is by default left aligned, so the --align option above should not even be needed. But the code above will show center aligned label Firefox. And form option --align=TYPE with any TYPE value does not change anything.

yad

Misko-2083 commented 3 years ago

@v1cont It's doable with an GtkOverlay. I had some spare time to make a GtkApp example in C: https://gist.github.com/Misko-2083/6621bb5ddbcdf18f17be00979d81f704 Compliles with:

gcc -o button_label -fPIC button_label.c `pkg-config --cflags --libs gtk+-3.0`

In action on Debian Buster: peekMSJ1Z0 Without the dummy label in the button widgets->button = gtk_button_new_with_label(""); it looks impossible to set the right button height when the font size setting is changed in the settings.

manuel-192 commented 3 years ago

Interesting! Good job!

v1cont commented 3 years ago

fixed in a29cade with additional option --align-buttons