Question

L'alignement vertical par défaut dans un emplacement flow consiste apparemment à aligner en haut les éléments. Voici un exemple:

Shoes.app (:title => "Vertical Alignment", :width => 300, :height => 150) do
  background "#DFA"
  flow :margin => 30 do
    title "BIG"
    tagline "MEDIUM"
    inscription "SMALL"
  end
end

Comment puis-je faire en sorte que le slot flow aligne ses éléments au centre du calcul d'une valeur : rise pour chaque élément? Je me serais attendu à un style d'alignement vertical pour les emplacements flow et à un style d'alignement horizontal pour les emplacements stack , mais je ne vois rien de tel. Qu'est-ce qui m'a manqué?

Était-ce utile?

La solution

À ma connaissance, il n'y a pas de style pour l'alignement vertical. Il existe un alignement horizontal utile dans les piles:

Shoes.app (:title => "Horizontal Alignment", :width => 300, :height => 150) do
  background "#DFA"
  stack :margin => 30 do
    title "BIG", :align => 'center'
    tagline "MEDIUM", :align => 'center'
    inscription "SMALL", :align => 'center'
  end
end

Gardez à l’esprit que Shoes est encore un travail en cours, donc pourquoi y arrivera-t-il probablement.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top