XO ImageQuiz/Layout.py

From OLPC
Jump to: navigation, search

In these classes, the complete layout setup is saved. So you need not to touch any code for layout changes :-)

class Colors:
	grey 	= '#efefef'
	green 	= '#75b844'
	lime 	= '#cef474'
	yellow 	= '#ffff33'
	blue 	= '#94b0b4'
	black 	= '#000000'
	white	= '#ffffff'

class Layout:
	background = Colors().black;
	
	class Question:
		x = 20
		y = 20
		width = 800
		height = 650
		border = '3px ' + Colors().green;
		background = Colors().black;
		class Text:
			x = 20
			y = 12
			size = 46
			color = Colors().green;
		class Image:
			x = 10
			y = 60
		
	class MenuTop:
		x = 840
		y = 20
		width = 340
		height = 50
		border = '2px ' + Colors().blue;
		class Text:
			x = 20
			y = 10
			size = 46
			color = Colors().green;
			text = 'Menu'
			
	class MenuMain:
		x = 840
		y = 80
		width = 340
		height = 590
		border = '2px '  + Colors().blue;
		background = Colors().black;
		class Button:
			x = 10
			y = 10
			width = 320
			height = 40
			border = '2px ' +  Colors().green;
			background = Colors().black;
			class Text:
				x = 20
				y = 12
				size = 30
				color =  Colors().green;
			class Button_Directory:
				border = '2px ' +  Colors().blue;
				background = Colors().black;
				class Text:
					size = 30
					color =  Colors().green;
				
	class Toolbar:
		x = 20
		y = 690
		width = 1160
		height = 100
		border = '2px '  + Colors().blue;

	class Polygon:
		color =  Colors().yellow;