Just another WordPress site
Posts tagged linux
Encode url from bash
(original posted: 2012)
IF you need to encode parts of a POST url:
SUM=$(md5sum $APPNAME.tar.gz.gpg 1> /dev/null)
SUMENC=$(echo $SUM’ /*$$[]’ | perl -MURI::Escape -lne ‘print uri_escape($_)’)”
kv language designing with anchorlayout
0(original posted: 2012)
When designing a Kivy menu with the kv language I run into troubles with the anchorlayout object.
It seems that you need to put every object inside a achorlayout which itself is part of a anchorlayout.
Sounds a bit vague so an example should do:
AnchorLayout: id: topmenu anchor_x: 'center' anchor_y: 'top' BoxLayout: orientation: 'horizontal' AnchorLayout: anchor_x: 'left' anchor_y: 'top' padding: 8 Button: id: infobutton size: (48, 48) size_hint: None, None background_normal: 'info_button.png' background_down: 'info_button.png' on_press: root.on_button_clicked("info") AnchorLayout: anchor_x: 'center' anchor_y: 'top' padding: 8 BoxLayout: padding: 0 spacing: 4 size: (300, 48) size_hint: None, None orientation: 'horizontal' AnchorLayout: anchor_x: 'center' anchor_y: 'top' Button: size: (48, 48) size_hint: None, None background_normal: 'star1.png' on_press: root.on_button_clicked("star1") AnchorLayout: anchor_x: 'center' anchor_y: 'top' Button: size: (48, 48) size_hint: None, None background_normal: 'star1.png' on_press: root.on_button_clicked("star2") AnchorLayout: anchor_x: 'right' anchor_y: 'top' padding: 8 Button: id: quitbutton size: (48, 48) size_hint: None, None background_normal: 'quit_button.png' background_down: 'quit_button_ro.png' on_press: root.on_quit_button_clicked()