Using --fontname= doesn't appear to work. No change in font size.
Three different thing tried
--fontname="Monospace 16"
--fontname="Monospace Regular 16"
--fontname="Courier 10 Pitch 18" # This was based on the output of yad --font.
Ubuntu 14.04
yad 0.28.1
what version of gtk+ you use with yad?
and please, illustrate this problem with some screenshots
I probably need to clarify my problem. I am using the --list option and I expected the --fontname to change the size of the data that is being displayed in the list. I did find out that for each list item, I can use the "span" command but it is not only a kluge because the span has to be used for each entry and when an entry is selected, to recover the value, I have to peel off the "span" command from the output I want.
am using gtk2
This snippet demonstrates the difference between using --fontname and the span
The first yad outputs size 16 font. The second outputs small font
for --list there are three special types of columns - @fore@, @back@ and @font@ which describes decoration of text in list
for example
yad --list --column=text --column=@fore@ --column=@font@ " big red font" "#FF0000" "Monospace 20" "normal blue font" "blue" ""
So how would that work with this snippet of code? Would I have to put a "red" "monospace 20" before each item?
let Count=1
while [ $Count -lt ${#line[@]} ]; do
echo -n "'" ; echo -n ''${DisplayLine[$Count]}'' ;echo "'" Count=$((Count+1)) done | yad --list --timeout=60 --width 500 --height 400 \ --text 'Pick a topic then\n select "OK"to begin' \ --column "Topic" --center --button="gtk-ok:0" \ -align=center \ --no-click \ --limit=10 --timeout-indicator="bottom"
This didn't work as yad thinks each line is the whole line
let Count=1
while [ $Count -lt ${#line[@]} ]; do
echo -n '"'"red"'"'
echo -n '"'"Monospace 20"'"'
echo '"'${DisplayLine[$Count]}'"'
Count=$((Count+1))
done | yad --list --timeout=60 --width 500 --height 400 \ --text 'Pick a topic then\n select "OK"to begin' \ --column @fore@ --column=@font@ --column=text --center --button="gtk-ok:0" \ -align=center \ --no-click \ --limit=10 --timeout-indicator="bottom"
All I get is an error that it doesn't recognize the whole line
'"red" "Monospace 20" "[my text here]"' as a color
Last edit: John Pezzano 2015-05-04
one string from stdin is one cell in --list
Victor,
I intentionally skip the "0" (first) item. It was not a mistake.
I'd swear this was the way I started writing the code with the @font@/@fore@ and it did not work. It does now. My error. Thanks. Must have had other mistakes.
I love yad but I wish there were many more examples.
You can close this problem.
@v1c0nt That WHILE loop does not work. Must use a FOR loop, such as: