├── data └── font │ ├── Roboto-Black.ttf │ ├── Roboto-Bold.ttf │ ├── Roboto-Italic.ttf │ ├── Roboto-Light.ttf │ ├── Roboto-Medium.ttf │ ├── Roboto-Thin.ttf │ ├── Roboto-Regular.ttf │ ├── Roboto-BlackItalic.ttf │ ├── Roboto-BoldItalic.ttf │ ├── Roboto-LightItalic.ttf │ ├── Roboto-ThinItalic.ttf │ ├── Roboto-MediumItalic.ttf │ ├── RobotoCondensed-Bold.ttf │ ├── fontawesome-webfont.ttf │ ├── RobotoCondensed-Italic.ttf │ ├── RobotoCondensed-Light.ttf │ ├── RobotoCondensed-Regular.ttf │ ├── RobotoCondensed-BoldItalic.ttf │ └── RobotoCondensed-LightItalic.ttf ├── README.md ├── .gitignore ├── utils.py ├── flat.kv ├── font_definitions.py ├── main.py ├── numpad.py ├── numpad.kv ├── ui_elements.kv ├── color_definitions.py ├── ui_elements.py └── fa_icon_definitions.py /data/font/Roboto-Black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chozabu/FlatKivy/master/data/font/Roboto-Black.ttf -------------------------------------------------------------------------------- /data/font/Roboto-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chozabu/FlatKivy/master/data/font/Roboto-Bold.ttf -------------------------------------------------------------------------------- /data/font/Roboto-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chozabu/FlatKivy/master/data/font/Roboto-Italic.ttf -------------------------------------------------------------------------------- /data/font/Roboto-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chozabu/FlatKivy/master/data/font/Roboto-Light.ttf -------------------------------------------------------------------------------- /data/font/Roboto-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chozabu/FlatKivy/master/data/font/Roboto-Medium.ttf -------------------------------------------------------------------------------- /data/font/Roboto-Thin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chozabu/FlatKivy/master/data/font/Roboto-Thin.ttf -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | FlatKivy 2 | ======== 3 | 4 | A collection of experimental flat/material design widgets for Kivy. 5 | -------------------------------------------------------------------------------- /data/font/Roboto-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chozabu/FlatKivy/master/data/font/Roboto-Regular.ttf -------------------------------------------------------------------------------- /data/font/Roboto-BlackItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chozabu/FlatKivy/master/data/font/Roboto-BlackItalic.ttf -------------------------------------------------------------------------------- /data/font/Roboto-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chozabu/FlatKivy/master/data/font/Roboto-BoldItalic.ttf -------------------------------------------------------------------------------- /data/font/Roboto-LightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chozabu/FlatKivy/master/data/font/Roboto-LightItalic.ttf -------------------------------------------------------------------------------- /data/font/Roboto-ThinItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chozabu/FlatKivy/master/data/font/Roboto-ThinItalic.ttf -------------------------------------------------------------------------------- /data/font/Roboto-MediumItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chozabu/FlatKivy/master/data/font/Roboto-MediumItalic.ttf -------------------------------------------------------------------------------- /data/font/RobotoCondensed-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chozabu/FlatKivy/master/data/font/RobotoCondensed-Bold.ttf -------------------------------------------------------------------------------- /data/font/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chozabu/FlatKivy/master/data/font/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /data/font/RobotoCondensed-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chozabu/FlatKivy/master/data/font/RobotoCondensed-Italic.ttf -------------------------------------------------------------------------------- /data/font/RobotoCondensed-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chozabu/FlatKivy/master/data/font/RobotoCondensed-Light.ttf -------------------------------------------------------------------------------- /data/font/RobotoCondensed-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chozabu/FlatKivy/master/data/font/RobotoCondensed-Regular.ttf -------------------------------------------------------------------------------- /data/font/RobotoCondensed-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chozabu/FlatKivy/master/data/font/RobotoCondensed-BoldItalic.ttf -------------------------------------------------------------------------------- /data/font/RobotoCondensed-LightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chozabu/FlatKivy/master/data/font/RobotoCondensed-LightItalic.ttf -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | 5 | # C extensions 6 | *.so 7 | 8 | # Distribution / packaging 9 | .Python 10 | env/ 11 | bin/ 12 | build/ 13 | develop-eggs/ 14 | dist/ 15 | eggs/ 16 | lib/ 17 | lib64/ 18 | parts/ 19 | sdist/ 20 | var/ 21 | *.egg-info/ 22 | .installed.cfg 23 | *.egg 24 | 25 | # Installer logs 26 | pip-log.txt 27 | pip-delete-this-directory.txt 28 | 29 | # Unit test / coverage reports 30 | htmlcov/ 31 | .tox/ 32 | .coverage 33 | .cache 34 | nosetests.xml 35 | coverage.xml 36 | 37 | # Translations 38 | *.mo 39 | 40 | # Mr Developer 41 | .mr.developer.cfg 42 | .project 43 | .pydevproject 44 | 45 | # Rope 46 | .ropeproject 47 | 48 | # Django stuff: 49 | *.log 50 | *.pot 51 | 52 | # Sphinx documentation 53 | docs/_build/ 54 | 55 | -------------------------------------------------------------------------------- /utils.py: -------------------------------------------------------------------------------- 1 | from __future__ import unicode_literals, print_function 2 | from os import path 3 | from kivy.utils import platform, get_color_from_hex 4 | from color_definitions import colors 5 | from fa_icon_definitions import fa_icons 6 | from font_definitions import font_styles, wrap_ids 7 | import kivy.metrics 8 | 9 | def get_metric_conversion(metric_tuple): 10 | return getattr(kivy.metrics, metric_tuple[1])(metric_tuple[0]) 11 | 12 | def construct_target_file_name(target_file_name, pyfile): 13 | '''Returns the correct file path relative to the __file__ 14 | passed as pyfile''' 15 | return path.join(path.dirname(path.abspath(pyfile)), target_file_name) 16 | 17 | def get_next_smallest_style(style): 18 | wrap_id = font_styles[style]['wrap_id'] 19 | next_id = str(int(wrap_id)+1) 20 | try: 21 | return wrap_ids[next_id] 22 | except: 23 | return style 24 | 25 | 26 | def get_style(style): 27 | if style is not None: 28 | try: 29 | return font_styles[style] 30 | except: 31 | print('font style: ' + style + ' not in fa_icons') 32 | return {} 33 | else: 34 | return {} 35 | 36 | 37 | def get_icon_char(icon): 38 | if icon != '': 39 | try: 40 | return fa_icons[icon] 41 | except: 42 | print('icon: ' + icon + ' not in fa_icons') 43 | return '' 44 | else: 45 | return '' 46 | 47 | def get_rgba_color(color_tuple): 48 | color, weight = color_tuple 49 | try: 50 | return get_color_from_hex(colors[color][weight]) 51 | except: 52 | print('Error: ' + color + weight + ' not found, set to default') 53 | return (1., 1., 1., 1.) 54 | 55 | 56 | -------------------------------------------------------------------------------- /flat.kv: -------------------------------------------------------------------------------- 1 | Widget: 2 | title: 'test' 3 | desc: 'test2' 4 | canvas.before: 5 | Color: 6 | rgb: (1., 1., 1.) 7 | Rectangle: 8 | size: self.size 9 | pos: self.pos 10 | FlatTextInput: 11 | pos: 20, 440 12 | size: 200, 100 13 | FlatIconButton: 14 | color_tuple: ('Purple', '600') 15 | font_color_tuple: ('Grey', '10000') 16 | icon_color_tuple: ('Grey', '10000') 17 | text: 'Icon Button' 18 | style: 'Display 2' 19 | icon: 'fa-home' 20 | pos: (20, 320) 21 | size: (200, 100) 22 | FlatIconButton: 23 | color_tuple: ('Red', '700') 24 | ripple_color_tuple: ('Red', '100') 25 | icon_color_tuple: ('Yellow', '100') 26 | font_color_tuple: ('Yellow', '100') 27 | text: 'Colored Icon' 28 | icon: 'fa-chevron-left' 29 | style: 'Button' 30 | pos: (500, 320) 31 | size: (200, 100) 32 | FlatButton: 33 | color_tuple: ('Cyan', '500') 34 | ripple_color_tuple: ('Yellow', '100') 35 | ripple_scale: 1.0 36 | style: 'Display 2' 37 | text: 'Only Built 4 Cuban Linx' 38 | pos: (240, 320) 39 | size: (200, 100) 40 | FlatCheckBox: 41 | ripple_color_tuple: ('Orange', '100') 42 | check_color_tuple: ('Orange', '500') 43 | size: (100, 100) 44 | pos: (140, 200) 45 | ripple_duration_in: .2 46 | check_scale: .9 47 | FlatCheckBox: 48 | ripple_color_tuple: ('LightBlue', '100') 49 | check_color_tuple: ('LightBlue', '500') 50 | outline_size: 10 51 | outline_color_tuple: ('LightBlue', '900') 52 | size: (50, 50) 53 | pos: (20, 200) 54 | ripple_duration_in: .2 55 | check_scale: .6 56 | FlatLabel: 57 | size: 300, 200 58 | pos: 100, 25 59 | style: 'Display 1' 60 | color_tuple: ('Grey', '1000') 61 | text: 'test test test test test test test test test test just got here test test test test test test test test test test' 62 | valign: 'middle' 63 | halign: 'center' 64 | text_size: self.size -------------------------------------------------------------------------------- /font_definitions.py: -------------------------------------------------------------------------------- 1 | font_styles = { 2 | 'Display 4': { 3 | 'font': 'Roboto-Light.ttf', 4 | 'sizings': {'mobile': (112, 'sp'), 'desktop': (112, 'sp')}, 5 | 'alpha': .54, 6 | 'wrap': False, 7 | }, 8 | 'Display 3': { 9 | 'font': 'Roboto-Regular.ttf', 10 | 'sizings': {'mobile': (56, 'sp'), 'desktop': (56, 'sp')}, 11 | 'alpha': .54, 12 | 'wrap': False, 13 | }, 14 | 'Display 2': { 15 | 'font': 'Roboto-Regular.ttf', 16 | 'sizings': {'mobile': (45, 'sp'), 'desktop': (45, 'sp')}, 17 | 'alpha': .54, 18 | 'wrap': True, 19 | 'wrap_id': '1', 20 | 'leading': (48, 'pt'), 21 | }, 22 | 'Display 1': { 23 | 'font': 'Roboto-Regular.ttf', 24 | 'sizings': {'mobile': (34, 'sp'), 'desktop': (34, 'sp')}, 25 | 'alpha': .54, 26 | 'wrap': True, 27 | 'wrap_id': '2', 28 | 'leading': (40, 'pt'), 29 | }, 30 | 'Headline': { 31 | 'font': 'Roboto-Regular.ttf', 32 | 'sizings': {'mobile': (24, 'sp'), 'desktop': (24, 'sp')}, 33 | 'alpha': .87, 34 | 'wrap': True, 35 | 'wrap_id': '3', 36 | 'leading': (32, 'pt'), 37 | }, 38 | 'Title': { 39 | 'font': 'Roboto-Medium.ttf', 40 | 'sizings': {'mobile': (20, 'sp'), 'desktop': (20, 'sp')}, 41 | 'alpha': .87, 42 | 'wrap': False, 43 | }, 44 | 'Subhead': { 45 | 'font': 'Roboto-Regular.ttf', 46 | 'sizings': {'mobile': (16, 'sp'), 'desktop': (15, 'sp')}, 47 | 'alpha': .87, 48 | 'wrap': True, 49 | 'wrap_id': '4', 50 | 'leading': (28, 'pt'), 51 | }, 52 | 'Body 2': { 53 | 'font': 'Roboto-Medium.ttf', 54 | 'sizings': {'mobile': (14, 'sp'), 'desktop': (13, 'sp')}, 55 | 'alpha': .87, 56 | 'wrap': True, 57 | 'wrap_id': '5', 58 | 'leading': (24, 'pt'), 59 | }, 60 | 'Body 1': { 61 | 'font': 'Roboto-Regular.ttf', 62 | 'sizings': {'mobile': (14, 'sp'), 'desktop': (13, 'sp')}, 63 | 'alpha': .87, 64 | 'wrap': True, 65 | 'wrap_id': '6', 66 | 'leading': (20, 'pt'), 67 | }, 68 | 'Caption': { 69 | 'font': 'Roboto-Regular.ttf', 70 | 'sizings': {'mobile': (12, 'sp'), 'desktop': (12, 'sp')}, 71 | 'alpha': .54, 72 | 'wrap': False, 73 | }, 74 | 'Menu': { 75 | 'font': 'Roboto-Medium.ttf', 76 | 'sizings': {'mobile': (14, 'sp'), 'desktop': (13, 'sp')}, 77 | 'alpha': .87, 78 | 'wrap': False, 79 | }, 80 | 'Button': { 81 | 'font': 'Roboto-Medium.ttf', 82 | 'sizings': {'mobile': (14, 'sp'), 'desktop': (14, 'sp')}, 83 | 'alpha': .87, 84 | 'wrap': False, 85 | }, 86 | } 87 | 88 | wrap_ids = {} 89 | 90 | 91 | for each in font_styles: 92 | entry = font_styles[each] 93 | if entry['wrap']: 94 | wrap_ids[entry['wrap_id']] = each 95 | 96 | 97 | -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | from __future__ import unicode_literals, print_function 2 | __version__ = '0.0.1' 3 | import kivy 4 | from kivy.app import App 5 | from kivy.properties import (ObjectProperty, ListProperty) 6 | from numpad import DecimalNumPad, NumPad 7 | from ui_elements import FlatPopup as Popup 8 | from ui_elements import ErrorContent, OptionContent, FlatIconButton, FlatLabel 9 | from utils import get_icon_char, get_rgba_color, get_style 10 | 11 | def style_default(style_name): 12 | return {} 13 | 14 | def color_default(color_tuple): 15 | return (1., 1., 1., 1.) 16 | 17 | def icon_default(icon_name): 18 | return '' 19 | 20 | 21 | class FlatApp(App): 22 | get_color = ObjectProperty(color_default) 23 | get_icon = ObjectProperty(icon_default) 24 | get_style = ObjectProperty(style_default) 25 | 26 | def build(self): 27 | self.get_color = get_rgba_color 28 | self.get_icon = get_icon_char 29 | self.get_style = get_style 30 | super(FlatApp, self).build() 31 | 32 | def raise_error(self, error_title, error_text): 33 | error_content = ErrorContent() 34 | error_popup = Popup( 35 | content=error_content, size_hint=(.6, .4)) 36 | error_content.error_text = error_text 37 | error_popup.title = error_title 38 | dismiss_button = error_content.dismiss_button 39 | dismiss_button.bind(on_release=error_popup.dismiss) 40 | error_popup.open() 41 | 42 | def raise_option_dialogue(self, option_title, option_text, options, 43 | callback): 44 | option_content = OptionContent(options, option_text=option_text, 45 | callback=callback) 46 | option_popup = Popup(content=option_content, size_hint=(.6,.4)) 47 | option_popup.title = option_title 48 | option_content.dismiss_func = option_popup.dismiss 49 | option_popup.open() 50 | 51 | def raise_numpad(self, numpad_title, callback, units=None, 52 | minimum=None, maximum=None, do_decimal=False): 53 | if do_decimal: 54 | numpad = DecimalNumPad(units=units, minimum_value=minimum, 55 | maximum_value=maximum) 56 | else: 57 | numpad = NumPad(units=units, minimum_value=minimum, 58 | maximum_value=maximum) 59 | numpad_popup = Popup( 60 | title=numpad_title, content=numpad, size_hint=(.8, .8)) 61 | def return_callback(value, is_return): 62 | if callback is not None: 63 | callback(value, is_return) 64 | if is_return: 65 | numpad_popup.dismiss() 66 | numpad.return_callback = return_callback 67 | numpad_popup.open() 68 | 69 | 70 | if __name__ == '__main__': 71 | FlatApp().run() -------------------------------------------------------------------------------- /numpad.py: -------------------------------------------------------------------------------- 1 | from __future__ import unicode_literals, print_function 2 | from kivy.uix.widget import Widget 3 | from kivy.properties import (StringProperty, 4 | NumericProperty, ObjectProperty) 5 | from kivy.lang import Builder 6 | 7 | from utils import construct_target_file_name 8 | 9 | Builder.load_file(construct_target_file_name('numpad.kv', __file__)) 10 | 11 | 12 | class NumPad(Widget): 13 | display_text = StringProperty("0") 14 | display_value = NumericProperty(0) 15 | init_value = NumericProperty(100) 16 | maximum_value = NumericProperty(None, allownone=True) 17 | minimum_value = NumericProperty(None, allownone=True) 18 | return_callback = ObjectProperty(None, allownone=True) 19 | units = StringProperty(None, allownone=True) 20 | 21 | def __init__(self, **kwargs): 22 | super(NumPad, self).__init__(**kwargs) 23 | 24 | def check_minimum_value(self): 25 | if self.minimum_value != None: 26 | if self.display_value < self.minimum_value: 27 | self.display_text = str(self.minimum_value) 28 | 29 | def button_callback(self, button_str): 30 | if button_str in [str(x) for x in range(10)]: 31 | if self.display_text == '0': 32 | self.display_text = button_str 33 | else: 34 | self.display_text = self.display_text + button_str 35 | maximum_value = self.maximum_value 36 | if maximum_value != None: 37 | if self.display_value > maximum_value: 38 | self.display_value = maximum_value 39 | elif button_str == 'del': 40 | self.display_text = self.display_text[:-1] 41 | elif button_str == 'ret': 42 | self.check_minimum_value() 43 | self.return_callback(self.display_value, True) 44 | 45 | def on_display_text(self, instance, value): 46 | if value == '': 47 | self.display_text = '0' 48 | return 49 | if int(value) > self.maximum_value and self.maximum_value != None: 50 | self.display_text = str(self.maximum_value) 51 | return 52 | self.display_value = int(value) 53 | self.return_callback(self.display_value, False) 54 | 55 | 56 | class DecimalNumPad(NumPad): 57 | 58 | def button_callback(self, button_str): 59 | if button_str in [str(x) for x in range(10)] or button_str == '.' and \ 60 | '.' not in self.display_text: 61 | if self.display_text == '0': 62 | self.display_text = button_str 63 | else: 64 | self.display_text = self.display_text + button_str 65 | maximum_value = self.maximum_value 66 | if maximum_value != None: 67 | if self.display_value > maximum_value: 68 | self.display_value = maximum_value 69 | elif button_str == 'del': 70 | self.display_text = self.display_text[:-1] 71 | elif button_str == 'ret': 72 | self.check_minimum_value() 73 | self.return_callback(self.display_value, True) 74 | 75 | def on_display_text(self, instance, value): 76 | if value == '': 77 | self.display_text = '0' 78 | return 79 | if value == '.': 80 | self.display_text = '0.' 81 | return 82 | if float(value) > self.maximum_value and self.maximum_value != None: 83 | self.display_text = str(self.maximum_value) 84 | return 85 | self.display_value = float(value) 86 | self.return_callback(self.display_value, False) 87 | -------------------------------------------------------------------------------- /numpad.kv: -------------------------------------------------------------------------------- 1 | : 2 | BoxLayout: 3 | size: root.size 4 | pos: root.pos 5 | orientation: 'vertical' 6 | padding: 10 7 | Label: 8 | size_hint_y: .2 9 | text: root.display_text + root.units if root.units != None else root.display_text 10 | color: (0., 0., 0., 1.) 11 | text_size: self.size 12 | halign: 'right' 13 | font_size: self.height * .75 14 | GridLayout: 15 | cols:3 16 | size_hint_y: .8 17 | padding: 5 18 | spacing: 5 19 | FlatButton: 20 | text: "7" 21 | size_hint: (.33,.25) 22 | on_release: root.button_callback("7") 23 | font_size: self.height * .4 24 | color: (43./255., 153./255., 1.0) 25 | FlatButton: 26 | text: "8" 27 | size_hint: (.33,.25) 28 | on_release: root.button_callback("8") 29 | font_size: self.height * .4 30 | color: (43./255., 153./255., 1.0) 31 | FlatButton: 32 | text: "9" 33 | size_hint: (.33,.25) 34 | on_release: root.button_callback("9") 35 | font_size: self.height * .4 36 | color: (43./255., 153./255., 1.0) 37 | FlatButton: 38 | text: "4" 39 | size_hint: (.33,.25) 40 | on_release: root.button_callback("4") 41 | font_size: self.height * .4 42 | color: (43./255., 153./255., 1.0) 43 | FlatButton: 44 | text: "5" 45 | size_hint: (.33,.25) 46 | on_release: root.button_callback("5") 47 | font_size: self.height * .4 48 | color: (43./255., 153./255., 1.0) 49 | FlatButton: 50 | text: "6" 51 | size_hint: (.33,.25) 52 | on_release: root.button_callback("6") 53 | font_size: self.height * .4 54 | color: (43./255., 153./255., 1.0) 55 | FlatButton: 56 | text: "1" 57 | size_hint: (.33,.25) 58 | on_release: root.button_callback("1") 59 | font_size: self.height * .4 60 | color: (43./255., 153./255., 1.0) 61 | FlatButton: 62 | text: "2" 63 | size_hint: (.33,.25) 64 | on_release: root.button_callback("2") 65 | font_size: self.height * .4 66 | color: (43./255., 153./255., 1.0) 67 | FlatButton: 68 | text: "3" 69 | size_hint: (.33,.25) 70 | on_release: root.button_callback("3") 71 | font_size: self.height * .4 72 | color: (43./255., 153./255., 1.0) 73 | FlatButton: 74 | text: "del" 75 | size_hint: (.33,.25) 76 | on_release: root.button_callback("del") 77 | font_size: self.height * .4 78 | color: (43./255., 153./255., 1.0) 79 | FlatButton: 80 | text: "0" 81 | size_hint: (.33,.25) 82 | on_release: root.button_callback("0") 83 | font_size: self.height * .4 84 | color: (43./255., 153./255., 1.0) 85 | FlatButton: 86 | text: "enter" 87 | size_hint: (.33,.25) 88 | on_release: root.button_callback("ret") 89 | font_size: self.height * .4 90 | color: (6./255., 114./255., 0.) 91 | 92 | 93 | <-DecimalNumPad>: 94 | BoxLayout: 95 | size: root.size 96 | pos: root.pos 97 | orientation: 'vertical' 98 | padding: 10 99 | Label: 100 | size_hint_y: .2 101 | text: root.display_text + root.units if root.units != None else root.display_text 102 | text_size: self.size 103 | halign: 'right' 104 | font_size: self.height * .75 105 | GridLayout: 106 | cols:3 107 | size_hint_y: .8 108 | padding: 5 109 | spacing: 5 110 | FlatButton: 111 | color: (43./255., 153./255., 1.0) 112 | text: "7" 113 | size_hint: (.33,.20) 114 | on_release: root.button_callback("7") 115 | font_size: self.height * .4 116 | FlatButton: 117 | color: (43./255., 153./255., 1.0) 118 | text: "8" 119 | size_hint: (.33,.20) 120 | on_release: root.button_callback("8") 121 | font_size: self.height * .4 122 | FlatButton: 123 | color: (43./255., 153./255., 1.0) 124 | text: "9" 125 | size_hint: (.33,.20) 126 | on_release: root.button_callback("9") 127 | font_size: self.height * .4 128 | FlatButton: 129 | color: (43./255., 153./255., 1.0) 130 | text: "4" 131 | size_hint: (.33,.20) 132 | on_release: root.button_callback("4") 133 | font_size: self.height * .4 134 | FlatButton: 135 | color: (43./255., 153./255., 1.0) 136 | text: "5" 137 | size_hint: (.33,.20) 138 | on_release: root.button_callback("5") 139 | font_size: self.height * .4 140 | FlatButton: 141 | color: (43./255., 153./255., 1.0) 142 | text: "6" 143 | size_hint: (.33,.20) 144 | on_release: root.button_callback("6") 145 | font_size: self.height * .4 146 | FlatButton: 147 | color: (43./255., 153./255., 1.0) 148 | text: "1" 149 | size_hint: (.33,.20) 150 | on_release: root.button_callback("1") 151 | font_size: self.height * .4 152 | FlatButton: 153 | color: (43./255., 153./255., 1.0) 154 | text: "2" 155 | size_hint: (.33,.20) 156 | on_release: root.button_callback("2") 157 | font_size: self.height * .4 158 | FlatButton: 159 | color: (43./255., 153./255., 1.0) 160 | text: "3" 161 | size_hint: (.33,.20) 162 | on_release: root.button_callback("3") 163 | font_size: self.height * .4 164 | FlatButton: 165 | color: (43./255., 153./255., 1.0) 166 | text: "del" 167 | size_hint: (.33,.20) 168 | on_release: root.button_callback("del") 169 | font_size: self.height * .4 170 | FlatButton: 171 | color: (43./255., 153./255., 1.0) 172 | text: "0" 173 | size_hint: (.33,.20) 174 | on_release: root.button_callback("0") 175 | font_size: self.height * .4 176 | FlatButton: 177 | color: (43./255., 153./255., 1.0) 178 | text: '.' 179 | size_hint: (.33, .20) 180 | on_release: root.button_callback(".") 181 | font_size: self.height * .4 182 | Widget: 183 | size_hint: (.33, .20) 184 | Widget: 185 | size_hint: (.33, .20) 186 | FlatButton: 187 | color: (43./255., 153./255., 1.0) 188 | text: "enter" 189 | size_hint: (.33,.20) 190 | on_release: root.button_callback("ret") 191 | font_size: self.height * .4 -------------------------------------------------------------------------------- /ui_elements.kv: -------------------------------------------------------------------------------- 1 | : 2 | text: texti.text 3 | texti: texti 4 | orientation: 'tb-lr' 5 | padding: 15 6 | spacing: 15 7 | FlatTextInput: 8 | id: texti 9 | height: 50 10 | size_hint: (1.0, None) 11 | FlatButton: 12 | text: 'Submit' 13 | on_release: root.close_callback() 14 | size_hint: (1.0, .1) 15 | color: (43./255., 153./255., 1.0) 16 | 17 | 18 | <-FlatTextInput>: 19 | ripple_color: app.get_color(self.ripple_color_tuple) 20 | canvas.before: 21 | Color: 22 | rgba: self.background_color 23 | Rectangle: 24 | size: self.size 25 | pos: self.pos 26 | Color: 27 | rgba: 0., 0., 0., 1. 28 | Rectangle: 29 | size: (self.size[0], sp(2)) 30 | pos: self.pos[0], self.cursor_pos[1] - self.line_height - sp(2) 31 | Color: 32 | rgba: (self.cursor_color if self.focus and not self.cursor_blink else (0, 0, 0, 0)) 33 | Rectangle: 34 | pos: [int(x) for x in self.cursor_pos] 35 | size: sp(2), -self.line_height 36 | Color: 37 | rgba: self.disabled_foreground_color if self.disabled else (self.hint_text_color if not self.text and not self.focus else self.foreground_color) 38 | 39 | 40 | 41 | : 42 | font_size: '20dp' 43 | disabled_color: (.8, .8, .8, 1.0) 44 | color: app.get_color(root.color_tuple) 45 | style_dict: app.get_style(self.style) 46 | 47 | 48 | : 49 | scroll_timeout: 75 50 | scroll_distance: 10 51 | effect_cls: ScrollEffect 52 | 53 | 54 | : 55 | color: app.get_color(self.color_tuple) 56 | ripple_color: app.get_color(self.ripple_color_tuple) 57 | canvas.before: 58 | Color: 59 | rgb: root.color_down if root.state == 'down' or root.disabled else root.color 60 | Rectangle: 61 | size: self.size 62 | pos: self.pos 63 | 64 | FlatLabel: 65 | size_hint: (1.0, 1.0) 66 | color_tuple: root.font_color_tuple 67 | text: root.text 68 | style: root.style 69 | text_size: root.size 70 | valign: 'middle' 71 | halign: 'center' 72 | font_size: root.font_size 73 | 74 | 75 | : 76 | text: app.get_icon(self.icon) 77 | valign: 'middle' 78 | font_name: 'data/font/fontawesome-webfont.ttf' 79 | halign: 'center' 80 | padding: ('5dp', '5dp') 81 | color: app.get_color(root.color_tuple) 82 | font_size: '64dp' 83 | 84 | 85 | : 86 | color: app.get_color(self.color_tuple) 87 | ripple_color: app.get_color(self.ripple_color_tuple) 88 | canvas.before: 89 | Color: 90 | rgb: root.color_down if root.state == 'down' or root.disabled else root.color 91 | Rectangle: 92 | size: self.size 93 | pos: self.pos 94 | StackLayout: 95 | orientation: 'tb-lr' 96 | id: label_space 97 | FlatIcon: 98 | id: icon 99 | size_hint: (None, 1.0) 100 | width: self.texture_size[0] 101 | icon: root.icon 102 | valign: 'middle' 103 | halign: 'right' 104 | color_tuple: root.icon_color_tuple 105 | text_size: self.size 106 | FlatLabel: 107 | width: root.size[0] - icon.size[0] 108 | size_hint: (None, 1.0) 109 | text: root.text 110 | style: root.style 111 | color_tuple: root.font_color_tuple 112 | on_texture_size: print(self.texture_size, self.size, self._label._internal_size) 113 | valign: 'middle' 114 | halign: 'left' 115 | text_size: self.size 116 | font_size: root.font_size 117 | 118 | 119 | 120 | : 121 | color: app.get_color(self.color_tuple) 122 | ripple_color: app.get_color(self.ripple_color_tuple) 123 | canvas.before: 124 | Color: 125 | rgb: root.color if root.state == 'normal' else root.color_down 126 | Rectangle: 127 | size: self.size 128 | pos: self.pos 129 | FlatLabel: 130 | size_hint: (1.0, 1.0) 131 | color_tuple: root.font_color_tuple 132 | text: root.text 133 | valign: 'middle' 134 | halign: 'center' 135 | text_size: root.size 136 | 137 | 138 | : 139 | orientation: 'tb-lr' 140 | size_hint: (1.0, 1.0) 141 | cols: 1 142 | padding: 5 143 | spacing: 5 144 | FlatLabel: 145 | text_size: self.size 146 | size_hint: (1.0, .8) 147 | font_size: '14sp' 148 | valign: 'top' 149 | text: root.option_text 150 | 151 | 152 | : 153 | orientation: 'tb-lr' 154 | size_hint: (1.0, 1.0) 155 | dismiss_button: dismiss_button 156 | cols: 1 157 | padding: 5 158 | spacing: 5 159 | FlatLabel: 160 | text_size: self.size 161 | size_hint: (1.0, .8) 162 | font_size: '14sp' 163 | valign: 'top' 164 | text: root.error_text 165 | Button: 166 | id: dismiss_button 167 | text: 'Ok' 168 | size_hint: (1.0, .2) 169 | 170 | 171 | <-FlatPopup>: 172 | _container: container 173 | title_color: (0., 0., 0., 1.) 174 | canvas.before: 175 | Color: 176 | rgba: root.background_color[:3] + [root.background_color[-1] * self._anim_alpha] 177 | Rectangle: 178 | size: self._window.size if self._window else (0, 0) 179 | Color: 180 | rgba: root.popup_color 181 | Rectangle: 182 | size: self.size 183 | pos: self.pos 184 | 185 | GridLayout: 186 | padding: 12 187 | cols: 1 188 | size_hint: None, None 189 | pos: root.pos 190 | size: root.size 191 | 192 | Label: 193 | text: root.title 194 | color: root.title_color 195 | size_hint_y: None 196 | height: self.texture_size[1] + 16 197 | text_size: self.width - 16, None 198 | font_size: root.title_size 199 | 200 | Widget: 201 | size_hint_y: None 202 | height: 4 203 | canvas: 204 | Color: 205 | rgba: root.separator_color 206 | Rectangle: 207 | pos: self.x, self.y + root.separator_height / 2. 208 | size: self.width, root.separator_height 209 | 210 | BoxLayout: 211 | id: container 212 | 213 | 214 | <-FlatCheckBox>: 215 | ripple_color: app.get_color(self.ripple_color_tuple) 216 | canvas.before: 217 | Color: 218 | rgba: app.get_color(self.outline_color_tuple) 219 | Rectangle: 220 | size: self.size 221 | pos: self.pos 222 | Color: 223 | rgba: app.get_color(self.color_tuple) 224 | Rectangle: 225 | size: self.size[0] - sp(self.outline_size), self.size[1] - sp(self.outline_size) 226 | pos: self.pos[0] + sp(self.outline_size/2.), self.pos[1] + sp(self.outline_size/2.) 227 | 228 | 229 | : 230 | icon: 'fa-check' 231 | halign: 'center' 232 | font_size: (self.size[0] + self.size[1]/2.)*self.scale 233 | 234 | 235 | 236 | : 237 | orientation: 'horizontal' 238 | size_hint: (1.0, None) 239 | height: label.height 240 | active: checkbox.active 241 | ripple_color: app.get_color(self.ripple_color_tuple) 242 | FlatLabel: 243 | id: label 244 | text: root.text 245 | size_hint: (.8, None) 246 | color: app.get_color(root.text_color_tuple) 247 | font_size: '18dp' 248 | text_size: (root.size[0]*.8, None) 249 | height: self.texture_size[1] 250 | FlatCheckBox: 251 | group: root.group 252 | id: checkbox 253 | no_interact: True 254 | size_hint: (None, 1.0) 255 | width: self.height 256 | outline_color_tuple: root.outline_color_tuple 257 | outline_size: root.outline_size 258 | check_color_tuple: root.check_color_tuple 259 | color_tuple: root.checkbox_color_tuple 260 | -------------------------------------------------------------------------------- /color_definitions.py: -------------------------------------------------------------------------------- 1 | 2 | colors = { 3 | 'Red': { 4 | '500': 'e51c23', 5 | '50': 'fde0dc', 6 | '100': 'f9bdbb', 7 | '200': 'f69988', 8 | '300': 'f36c60', 9 | '400': 'e84e40', 10 | '500': 'e51c23', 11 | '600': 'dd191d', 12 | '700': 'd01716', 13 | '800': 'c41411', 14 | '900': 'b0120a', 15 | 'A100': 'ff7997', 16 | 'A200': 'ff5177', 17 | 'A400': 'ff2d6f', 18 | 'A700': 'e00032', 19 | }, 20 | 21 | 'Pink': { 22 | '500': 'e91e63', 23 | '50': 'fce4ec', 24 | '100': 'f8bbd0', 25 | '200': 'f48fb1', 26 | '300': 'f06292', 27 | '400': 'ec407a', 28 | '500': 'e91e63', 29 | '600': 'd81b60', 30 | '700': 'c2185b', 31 | '800': 'ad1457', 32 | '900': '880e4f', 33 | 'A100': 'ff80ab', 34 | 'A200': 'ff4081', 35 | 'A400': 'f50057', 36 | 'A700': 'c51162', 37 | }, 38 | 39 | 'Purple': { 40 | '500': '9c27b0', 41 | '50': 'f3e5f5', 42 | '100': 'e1bee7', 43 | '200': 'ce93d8', 44 | '300': 'ba68c8', 45 | '400': 'ab47bc', 46 | '500': '9c27b0', 47 | '600': '8e24aa', 48 | '700': '7b1fa2', 49 | '800': '6a1b9a', 50 | '900': '4a148c', 51 | 'A100': 'ea80fc', 52 | 'A200': 'e040fb', 53 | 'A400': 'd500f9', 54 | 'A700': 'aa00ff', 55 | }, 56 | 57 | 'DeepPurple': { 58 | '500': '673ab7', 59 | '50': 'ede7f6', 60 | '100': 'd1c4e9', 61 | '200': 'b39ddb', 62 | '300': '9575cd', 63 | '400': '7e57c2', 64 | '500': '673ab7', 65 | '600': '5e35b1', 66 | '700': '512da8', 67 | '800': '4527a0', 68 | '900': '311b92', 69 | 'A100': 'b388ff', 70 | 'A200': '7c4dff', 71 | 'A400': '651fff', 72 | 'A700': '6200ea', 73 | }, 74 | 75 | 'Indigo': { 76 | '500': '3f51b5', 77 | '50': 'e8eaf6', 78 | '100': 'c5cae9', 79 | '200': '9fa8da', 80 | '300': '7986cb', 81 | '400': '5c6bc0', 82 | '500': '3f51b5', 83 | '600': '3949ab', 84 | '700': '303f9f', 85 | '800': '283593', 86 | '900': '1a237e', 87 | 'A100': '8c9eff', 88 | 'A200': '536dfe', 89 | 'A400': '3d5afe', 90 | 'A700': '304ffe', 91 | }, 92 | 93 | 'Blue': { 94 | '500': '5677fc', 95 | '50': 'e7e9fd', 96 | '100': 'd0d9ff', 97 | '200': 'afbfff', 98 | '300': '91a7ff', 99 | '400': '738ffe', 100 | '500': '5677fc', 101 | '600': '4e6cef', 102 | '700': '455ede', 103 | '800': '3b50ce', 104 | '900': '2a36b1', 105 | 'A100': 'a6baff', 106 | 'A200': '6889ff', 107 | 'A400': '4d73ff', 108 | 'A700': '4d69ff', 109 | }, 110 | 111 | 'LightBlue': { 112 | '500': '03a9f4', 113 | '50': 'e1f5fe', 114 | '100': 'b3e5fc', 115 | '200': '81d4fa', 116 | '300': '4fc3f7', 117 | '400': '29b6f6', 118 | '500': '03a9f4', 119 | '600': '039be5', 120 | '700': '0288d1', 121 | '800': '0277bd', 122 | '900': '01579b', 123 | 'A100': '80d8ff', 124 | 'A200': '40c4ff', 125 | 'A400': '00b0ff', 126 | 'A700': '0091ea', 127 | }, 128 | 129 | 'Cyan': { 130 | '500': '00bcd4', 131 | '50': 'e0f7fa', 132 | '100': 'b2ebf2', 133 | '200': '80deea', 134 | '300': '4dd0e1', 135 | '400': '26c6da', 136 | '500': '00bcd4', 137 | '600': '00acc1', 138 | '700': '0097a7', 139 | '800': '00838f', 140 | '900': '006064', 141 | 'A100': '84ffff', 142 | 'A200': '18ffff', 143 | 'A400': '00e5ff', 144 | 'A700': '00b8d4', 145 | }, 146 | 147 | 'Teal': { 148 | '500': '009688', 149 | '50': 'e0f2f1', 150 | '100': 'b2dfdb', 151 | '200': '80cbc4', 152 | '300': '4db6ac', 153 | '400': '26a69a', 154 | '500': '009688', 155 | '600': '00897b', 156 | '700': '00796b', 157 | '800': '00695c', 158 | '900': '004d40', 159 | 'A100': 'a7ffeb', 160 | 'A200': '64ffda', 161 | 'A400': '1de9b6', 162 | 'A700': '00bfa5', 163 | }, 164 | 165 | 'Green': { 166 | '500': '259b24', 167 | '50': 'd0f8ce', 168 | '100': 'a3e9a4', 169 | '200': '72d572', 170 | '300': '42bd41', 171 | '400': '2baf2b', 172 | '500': '259b24', 173 | '600': '0a8f08', 174 | '700': '0a7e07', 175 | '800': '056f00', 176 | '900': '0d5302', 177 | 'A100': 'a2f78d', 178 | 'A200': '5af158', 179 | 'A400': '14e715', 180 | 'A700': '12c700', 181 | }, 182 | 183 | 'LightGreen': { 184 | '500': '8bc34a', 185 | '50': 'f1f8e9', 186 | '100': 'dcedc8', 187 | '200': 'c5e1a5', 188 | '300': 'aed581', 189 | '400': '9ccc65', 190 | '500': '8bc34a', 191 | '600': '7cb342', 192 | '700': '689f38', 193 | '800': '558b2f', 194 | '900': '33691e', 195 | 'A100': 'ccff90', 196 | 'A200': 'b2ff59', 197 | 'A400': '76ff03', 198 | 'A700': '64dd17', 199 | }, 200 | 201 | 'Lime': { 202 | '500': 'cddc39', 203 | '50': 'f9fbe7', 204 | '100': 'f0f4c3', 205 | '200': 'e6ee9c', 206 | '300': 'dce775', 207 | '400': 'd4e157', 208 | '500': 'cddc39', 209 | '600': 'c0ca33', 210 | '700': 'afb42b', 211 | '800': '9e9d24', 212 | '900': '827717', 213 | 'A100': 'f4ff81', 214 | 'A200': 'eeff41', 215 | 'A400': 'c6ff00', 216 | 'A700': 'aeea00', 217 | }, 218 | 219 | 220 | 'Yellow': { 221 | '500': 'ffeb3b', 222 | '50': 'fffde7', 223 | '100': 'fff9c4', 224 | '200': 'fff59d', 225 | '300': 'fff176', 226 | '400': 'ffee58', 227 | '500': 'ffeb3b', 228 | '600': 'fdd835', 229 | '700': 'fbc02d', 230 | '800': 'f9a825', 231 | '900': 'f57f17', 232 | 'A100': 'ffff8d', 233 | 'A200': 'ffff00', 234 | 'A400': 'ffea00', 235 | 'A700': 'ffd600', 236 | }, 237 | 238 | 'Amber': { 239 | '500': 'ffc107', 240 | '50': 'fff8e1', 241 | '100': 'ffecb3', 242 | '200': 'ffe082', 243 | '300': 'ffd54f', 244 | '400': 'ffca28', 245 | '500': 'ffc107', 246 | '600': 'ffb300', 247 | '700': 'ffa000', 248 | '800': 'ff8f00', 249 | '900': 'ff6f00', 250 | 'A100': 'ffe57f', 251 | 'A200': 'ffd740', 252 | 'A400': 'ffc400', 253 | 'A700': 'ffab00', 254 | }, 255 | 256 | 'Orange': { 257 | '500': 'ff9800', 258 | '50': 'fff3e0', 259 | '100': 'ffe0b2', 260 | '200': 'ffcc80', 261 | '300': 'ffb74d', 262 | '400': 'ffa726', 263 | '500': 'ff9800', 264 | '600': 'fb8c00', 265 | '700': 'f57c00', 266 | '800': 'ef6c00', 267 | '900': 'e65100', 268 | 'A100': 'ffd180', 269 | 'A200': 'ffab40', 270 | 'A400': 'ff9100', 271 | 'A700': 'ff6d00', 272 | }, 273 | 'DeepOrange': { 274 | '500': 'ff5722', 275 | '50': 'fbe9e7', 276 | '100': 'ffccbc', 277 | '200': 'ffab91', 278 | '300': 'ff8a65', 279 | '400': 'ff7043', 280 | '500': 'ff5722', 281 | '600': 'f4511e', 282 | '700': 'e64a19', 283 | '800': 'd84315', 284 | '900': 'bf360c', 285 | 'A100': 'ff9e80', 286 | 'A200': 'ff6e40', 287 | 'A400': 'ff3d00', 288 | 'A700': 'dd2c00', 289 | }, 290 | 'Brown': { 291 | '500': '795548', 292 | '50': 'efebe9', 293 | '100': 'd7ccc8', 294 | '200': 'bcaaa4', 295 | '300': 'a1887f', 296 | '400': '8d6e63', 297 | '500': '795548', 298 | '600': '6d4c41', 299 | '700': '5d4037', 300 | '800': '4e342e', 301 | '900': '3e2723', 302 | }, 303 | 'Grey': { 304 | '500': '9e9e9e', 305 | '50': 'fafafa', 306 | '100': 'f5f5f5', 307 | '200': 'eeeeee', 308 | '300': 'e0e0e0', 309 | '400': 'bdbdbd', 310 | '500': '9e9e9e', 311 | '600': '757575', 312 | '700': '616161', 313 | '800': '424242', 314 | '900': '212121', 315 | '1000': '000000', 316 | '10000': 'ffffff', 317 | }, 318 | 'BlueGrey': { 319 | '500': '607d8b', 320 | '50': 'eceff1', 321 | '100': 'cfd8dc', 322 | '200': 'b0bec5', 323 | '300': '90a4ae', 324 | '400': '78909c', 325 | '500': '607d8b', 326 | '600': '546e7a', 327 | '700': '455a64', 328 | '800': '37474f', 329 | '900': '263238', 330 | }, 331 | 'Gray': { 332 | '500': '9e9e9e', 333 | '50': 'fafafa', 334 | '100': 'f5f5f5', 335 | '200': 'eeeeee', 336 | '300': 'e0e0e0', 337 | '400': 'bdbdbd', 338 | '500': '9e9e9e', 339 | '600': '757575', 340 | '700': '616161', 341 | '800': '424242', 342 | '900': '212121', 343 | '1000': '000000', 344 | '10000': 'ffffff', 345 | }, 346 | 'BlueGray': { 347 | '500': '607d8b', 348 | '50': 'eceff1', 349 | '100': 'cfd8dc', 350 | '200': 'b0bec5', 351 | '300': '90a4ae', 352 | '400': '78909c', 353 | '500': '607d8b', 354 | '600': '546e7a', 355 | '700': '455a64', 356 | '800': '37474f', 357 | '900': '263238', 358 | }, 359 | } 360 | 361 | 362 | 363 | -------------------------------------------------------------------------------- /ui_elements.py: -------------------------------------------------------------------------------- 1 | from __future__ import unicode_literals, print_function 2 | from kivy.utils import platform 3 | from kivy.lang import Builder 4 | from utils import (construct_target_file_name, get_metric_conversion, 5 | get_next_smallest_style) 6 | 7 | Builder.load_file(construct_target_file_name('ui_elements.kv', __file__)) 8 | 9 | from kivy.uix.togglebutton import ToggleButton 10 | from kivy.uix.checkbox import CheckBox 11 | from kivy.uix.stacklayout import StackLayout 12 | from kivy.uix.gridlayout import GridLayout 13 | from kivy.properties import (ObjectProperty, StringProperty, 14 | DictProperty, ListProperty, BooleanProperty, NumericProperty) 15 | from kivy.uix.image import Image 16 | from kivy.uix.boxlayout import BoxLayout 17 | from kivy.uix.behaviors import ButtonBehavior 18 | from kivy.uix.behaviors import ToggleButtonBehavior 19 | from kivy.uix.anchorlayout import AnchorLayout 20 | from kivy.animation import Animation 21 | from kivy.uix.label import Label 22 | from kivy.uix.scrollview import ScrollView 23 | from kivy.uix.popup import Popup 24 | from kivy.uix.textinput import TextInput 25 | 26 | from kivy.graphics import (StencilPush, StencilPop, StencilUse, StencilUnUse, 27 | Rectangle, Ellipse, Color) 28 | 29 | 30 | 31 | class TouchRippleBehavior(object): 32 | ripple_rad = NumericProperty(10) 33 | ripple_pos = ListProperty([0, 0]) 34 | ripple_color = ListProperty((1., 1., 1., 1.)) 35 | ripple_duration_in = NumericProperty(.4) 36 | ripple_duration_out = NumericProperty(.5) 37 | fade_to_alpha = NumericProperty(.75) 38 | ripple_scale = NumericProperty(2.0) 39 | ripple_func_in = StringProperty('in_cubic') 40 | ripple_func_out = StringProperty('out_quad') 41 | 42 | def on_touch_down(self, touch): 43 | super(TouchRippleBehavior, self).on_touch_down(touch) 44 | if self.collide_point(touch.x, touch.y): 45 | self.anim_complete(self, self) 46 | self.ripple_pos = ripple_pos = (touch.x, touch.y) 47 | Animation.cancel_all(self, 'ripple_rad', 'ripple_color') 48 | rc = self.ripple_color 49 | 50 | touch.grab(self) 51 | ripple_rad = self.ripple_rad 52 | self.ripple_color = [rc[0], rc[1], rc[2], 1.] 53 | anim = Animation( 54 | ripple_rad=max(self.width, self.height) * self.ripple_scale, 55 | t=self.ripple_func_in, 56 | ripple_color=[rc[0], rc[1], rc[2], self.fade_to_alpha], 57 | duration=self.ripple_duration_in) 58 | anim.start(self) 59 | with self.canvas.after: 60 | StencilPush() 61 | Rectangle(size=self.size, pos=self.pos) 62 | StencilUse() 63 | self.col_instruction = Color(rgba=self.ripple_color) 64 | self.ellipse = Ellipse(size=(ripple_rad, ripple_rad), 65 | pos=(ripple_pos[0] - ripple_rad/2., 66 | ripple_pos[1] - ripple_rad/2.)) 67 | StencilUnUse() 68 | StencilPop() 69 | self.bind(ripple_color=self.set_color, ripple_pos=self.set_ellipse, 70 | ripple_rad=self.set_ellipse) 71 | 72 | def set_ellipse(self, instance, value): 73 | ellipse = self.ellipse 74 | ripple_pos = self.ripple_pos 75 | ripple_rad = self.ripple_rad 76 | ellipse.size = (ripple_rad, ripple_rad) 77 | ellipse.pos = (ripple_pos[0] - ripple_rad/2., 78 | ripple_pos[1] - ripple_rad/2.) 79 | 80 | def set_color(self, instance, value): 81 | self.col_instruction.rgba = value 82 | 83 | def on_touch_up(self, touch): 84 | super(TouchRippleBehavior, self).on_touch_up(touch) 85 | if touch.grab_current is self: 86 | Animation.cancel_all(self, 'ripple_rad', 'ripple_color') 87 | rc = self.ripple_color 88 | anim = Animation(ripple_color=[rc[0], rc[1], rc[2], 0.], 89 | t=self.ripple_func_out, duration=self.ripple_duration_out) 90 | anim.bind(on_complete=self.anim_complete) 91 | anim.start(self) 92 | touch.ungrab(self) 93 | 94 | def anim_complete(self, anim, instance): 95 | self.ripple_rad = 10 96 | self.canvas.after.clear() 97 | 98 | 99 | class FlatTextInput(TouchRippleBehavior, TextInput): 100 | ripple_color_tuple = ListProperty(['Grey', '10000']) 101 | 102 | def on_touch_down(self, touch): 103 | TextInput.on_touch_down(self, touch) 104 | super(FlatTextInput, self).on_touch_down(touch) 105 | 106 | 107 | 108 | class FlatPopup(Popup): 109 | popup_color = ListProperty([1., 1., 1., 1.]) 110 | 111 | 112 | class FlatScrollView(ScrollView): 113 | 114 | def scroll_to_top(self): 115 | self.scroll_y = 1.0 116 | 117 | class FlatButton(ButtonBehavior,TouchRippleBehavior, AnchorLayout): 118 | color = ListProperty([1., 1., 1.]) 119 | color_down = ListProperty([.7, .7, .7]) 120 | text = StringProperty('') 121 | style = StringProperty(None, allownone=True) 122 | color_tuple = ListProperty(['Blue', '500']) 123 | font_color_tuple = ListProperty(['Grey', '1000']) 124 | ripple_color_tuple = ListProperty(['Grey', '10000']) 125 | font_size = NumericProperty(12) 126 | 127 | def on_color(self, instance, value): 128 | self.color_down = [x*.7 for x in value] 129 | 130 | 131 | class FlatIconButton(ButtonBehavior, TouchRippleBehavior, AnchorLayout): 132 | color = ListProperty([1., 1., 1.]) 133 | color_down = ListProperty([.7, .7, .7]) 134 | text = StringProperty('') 135 | icon = StringProperty('') 136 | style = StringProperty(None, allownone=True) 137 | font_size = NumericProperty(12) 138 | icon_color_tuple = ListProperty(['Grey', '1000']) 139 | color_tuple = ListProperty(['Blue', '500']) 140 | font_color_tuple = ListProperty(['Grey', '1000']) 141 | ripple_color_tuple = ListProperty(['Grey', '10000']) 142 | 143 | def on_color(self, instance, value): 144 | self.color_down = [x*.7 for x in value] 145 | 146 | 147 | class FlatLabel(Label): 148 | text = StringProperty(None, allownone=True) 149 | color_tuple = ListProperty(['Grey', '10000']) 150 | style = StringProperty(None, allownone=True) 151 | style_dict = DictProperty(None, allownone=True) 152 | 153 | def on_style_dict(self, instance, value): 154 | if value is not None: 155 | self.font_name = 'data/font/' + value['font'] 156 | self.font_size = font_size = get_metric_conversion( 157 | value['sizings']['mobile']) 158 | self.color[3] = value['alpha'] 159 | self.shorten = not value['wrap'] 160 | 161 | def on_texture(self, instance, value): 162 | if value is not None and not self.shorten and self.style is not None: 163 | self.calculate_fit() 164 | 165 | def calculate_fit(self): 166 | actual_size = self._label._internal_size 167 | size = self.size 168 | if actual_size[0] > size[0] or actual_size[1] > size[1]: 169 | self.style = get_next_smallest_style(self.style) 170 | 171 | class FlatIcon(FlatLabel): 172 | color_tuple = ListProperty(['Grey', '10000']) 173 | icon = StringProperty('') 174 | 175 | class Check(FlatIcon): 176 | scale = NumericProperty(1.0) 177 | 178 | 179 | class OptionButton(ToggleButton): 180 | key = StringProperty(None) 181 | 182 | 183 | class ErrorContent(GridLayout): 184 | error_text = StringProperty('Default Error Text') 185 | 186 | 187 | class OptionContent(GridLayout): 188 | option_text = StringProperty('Default Option Text') 189 | options_dict = DictProperty(None) 190 | callback = ObjectProperty(None) 191 | dismiss_func = ObjectProperty(None) 192 | 193 | def __init__(self, options_dict, **kwargs): 194 | super(OptionContent, self).__init__(**kwargs) 195 | self.options_dict = options_dict 196 | self.populate_options(options_dict) 197 | 198 | def populate_options(self, options_dict): 199 | rem_wid = self.remove_widget 200 | add_wid = self.add_widget 201 | for child in self.children: 202 | if isinstance(child, OptionButton): 203 | rem_wid(child) 204 | for key in options_dict: 205 | button = OptionButton(key=key, text=options_dict[key], 206 | on_release=self.option_callback) 207 | add_wid(button) 208 | 209 | def option_callback(self, instance): 210 | callback = self.callback 211 | if callback is not None: 212 | self.callback(instance.key) 213 | self.dismiss_func() 214 | 215 | 216 | class FlatToggleButton(ToggleButtonBehavior, 217 | TouchRippleBehavior, AnchorLayout): 218 | color = ListProperty([1., 1., 1.]) 219 | color_down = ListProperty([.7, .7, .7]) 220 | text = StringProperty('') 221 | color_tuple = ListProperty(['Blue', '500']) 222 | font_color_tuple = ListProperty(['Grey', '1000']) 223 | ripple_color_tuple = ListProperty(['Grey', '10000']) 224 | no_up = BooleanProperty(False) 225 | 226 | def on_color(self, instance, value): 227 | self.color_down = [x*.7 for x in value] 228 | 229 | def on_touch_down(self, touch): 230 | if self.no_up: 231 | if self.collide_point(touch.x, touch.y) and self.state == 'normal': 232 | return super(FlatToggleButton, self).on_touch_down(touch) 233 | else: 234 | return super(FlatToggleButton, self).on_touch_down(touch) 235 | 236 | class FlatCheckBox(TouchRippleBehavior, CheckBox): 237 | check = ObjectProperty(None) 238 | no_interact = BooleanProperty(False) 239 | check_scale = NumericProperty(.5) 240 | outline_size = NumericProperty(5) 241 | color_tuple = ListProperty(['Grey', '10000']) 242 | check_color_tuple = ListProperty(['Grey', '1000']) 243 | outline_color_tuple = ListProperty(['Grey', '1000']) 244 | ripple_color_tuple = ListProperty(['Grey', '10000']) 245 | 246 | def __init__(self, **kwargs): 247 | super(FlatCheckBox, self).__init__(**kwargs) 248 | self.check = check = Check(scale=self.check_scale, 249 | color_tuple=self.check_color_tuple) 250 | self.bind(pos=check.setter('pos'), size=check.setter('size'), 251 | check_scale=check.setter('scale'), 252 | check_color_tuple=check.setter('color_tuple')) 253 | 254 | def on_active(self, instance, value): 255 | check = self.check 256 | if value and check not in self.children: 257 | self.add_widget(check) 258 | elif not value and check in self.children: 259 | self.remove_widget(check) 260 | 261 | def on_touch_down(self, touch): 262 | if self.no_interact: 263 | if self.collide_point(touch.x, touch.y): 264 | return False 265 | else: 266 | super(FlatCheckBox, self).on_touch_down(touch) 267 | 268 | def on_touch_move(self, touch): 269 | if self.no_interact: 270 | if self.collide_point(touch.x, touch.y): 271 | return False 272 | else: 273 | super(FlatCheckBox, self).on_touch_move(touch) 274 | 275 | def on_touch_up(self, touch): 276 | if self.no_interact: 277 | if self.collide_point(touch.x, touch.y): 278 | return False 279 | else: 280 | super(FlatCheckBox, self).on_touch_up(touch) 281 | 282 | 283 | class TextInputFocus(StackLayout): 284 | close_callback = ObjectProperty(None) 285 | text = StringProperty(None, allownone=True) 286 | 287 | 288 | class CheckBoxListItem(TouchRippleBehavior, BoxLayout): 289 | text = StringProperty(None) 290 | group = StringProperty(None) 291 | outline_size = NumericProperty(5) 292 | font_color_tuple = ListProperty(['Grey', '1000']) 293 | color_tuple = ListProperty(['Blue', '500']) 294 | check_color_tuple = ListProperty(['Grey', '1000']) 295 | checkbox_color_tuple = ListProperty(['Grey', '10000']) 296 | outline_color_tuple = ListProperty(['Grey', '1000']) 297 | ripple_color_tuple = ListProperty(['Grey', '10000']) 298 | 299 | def on_touch_down(self, touch): 300 | if self.collide_point(touch.x, touch.y): 301 | self.toggle_checkbox() 302 | super(CheckBoxListItem, self).on_touch_down(touch) 303 | 304 | def on_touch_up(self, touch): 305 | super(CheckBoxListItem, self).on_touch_up(touch) 306 | 307 | def toggle_checkbox(self): 308 | self.ids.checkbox._toggle_active() -------------------------------------------------------------------------------- /fa_icon_definitions.py: -------------------------------------------------------------------------------- 1 | fa_icons = { 2 | 'fa-glass': u"\uf000", 3 | 'fa-music': u"\uf001", 4 | 'fa-search': u"\uf002", 5 | 'fa-envelope-o': u"\uf003", 6 | 'fa-heart': u"\uf004", 7 | 'fa-star': u"\uf005", 8 | 'fa-star-o': u"\uf006", 9 | 'fa-user': u"\uf007", 10 | 'fa-film': u"\uf008", 11 | 'fa-th-large': u"\uf009", 12 | 'fa-th': u"\uf00a", 13 | 'fa-th-list': u"\uf00b", 14 | 'fa-check': u"\uf00c", 15 | 'fa-times': u"\uf00d", 16 | 'fa-search-plus': u"\uf00e", 17 | 'fa-search-minus': u"\uf010", 18 | 'fa-power-off': u"\uf011", 19 | 'fa-signal': u"\uf012", 20 | 'fa-gear': u"\uf013", 21 | 'fa-cog': u"\uf013", 22 | 'fa-trash-o': u"\uf014", 23 | 'fa-home': u"\uf015", 24 | 'fa-file-o': u"\uf016", 25 | 'fa-clock-o': u"\uf017", 26 | 'fa-road': u"\uf018", 27 | 'fa-download': u"\uf019", 28 | 'fa-arrow-circle-o-down': u"\uf01a", 29 | 'fa-arrow-circle-o-up': u"\uf01b", 30 | 'fa-inbox': u"\uf01c", 31 | 'fa-play-circle-o': u"\uf01d", 32 | 'fa-rotate-right': u"\uf01e", 33 | 'fa-repeat': u"\uf01e", 34 | 'fa-refresh': u"\uf021", 35 | 'fa-list-alt': u"\uf022", 36 | 'fa-lock': u"\uf023", 37 | 'fa-flag': u"\uf024", 38 | 'fa-headphones': u"\uf025", 39 | 'fa-volume-off': u"\uf026", 40 | 'fa-volume-down': u"\uf027", 41 | 'fa-volume-up': u"\uf028", 42 | 'fa-qrcode': u"\uf029", 43 | 'fa-barcode': u"\uf02a", 44 | 'fa-tag': u"\uf02b", 45 | 'fa-tags': u"\uf02c", 46 | 'fa-book': u"\uf02d", 47 | 'fa-bookmark': u"\uf02e", 48 | 'fa-print': u"\uf02f", 49 | 'fa-camera': u"\uf030", 50 | 'fa-font': u"\uf031", 51 | 'fa-bold': u"\uf032", 52 | 'fa-italic': u"\uf033", 53 | 'fa-text-height': u"\uf034", 54 | 'fa-text-width': u"\uf035", 55 | 'fa-align-left': u"\uf036", 56 | 'fa-align-center': u"\uf037", 57 | 'fa-align-right': u"\uf038", 58 | 'fa-align-justify': u"\uf039", 59 | 'fa-list': u"\uf03a", 60 | 'fa-dedent': u"\uf03b", 61 | 'fa-outdent': u"\uf03b", 62 | 'fa-indent': u"\uf03c", 63 | 'fa-video-camera': u"\uf03d", 64 | 'fa-photo': u"\uf03e", 65 | 'fa-image': u"\uf03e", 66 | 'fa-picture-o': u"\uf03e", 67 | 'fa-pencil': u"\uf040", 68 | 'fa-map-marker': u"\uf041", 69 | 'fa-adjust': u"\uf042", 70 | 'fa-tint': u"\uf043", 71 | 'fa-edit': u"\uf044", 72 | 'fa-pencil-square-o': u"\uf044", 73 | 'fa-share-square-o': u"\uf045", 74 | 'fa-check-square-o': u"\uf046", 75 | 'fa-arrows': u"\uf047", 76 | 'fa-step-backward': u"\uf048", 77 | 'fa-fast-backward': u"\uf049", 78 | 'fa-backward': u"\uf04a", 79 | 'fa-play': u"\uf04b", 80 | 'fa-pause': u"\uf04c", 81 | 'fa-stop': u"\uf04d", 82 | 'fa-forward': u"\uf04e", 83 | 'fa-fast-forward': u"\uf050", 84 | 'fa-step-forward': u"\uf051", 85 | 'fa-eject': u"\uf052", 86 | 'fa-chevron-left': u"\uf053", 87 | 'fa-chevron-right': u"\uf054", 88 | 'fa-plus-circle': u"\uf055", 89 | 'fa-minus-circle': u"\uf056", 90 | 'fa-times-circle': u"\uf057", 91 | 'fa-check-circle': u"\uf058", 92 | 'fa-question-circle': u"\uf059", 93 | 'fa-info-circle': u"\uf05a", 94 | 'fa-crosshairs': u"\uf05b", 95 | 'fa-times-circle-o': u"\uf05c", 96 | 'fa-check-circle-o': u"\uf05d", 97 | 'fa-ban': u"\uf05e", 98 | 'fa-arrow-left': u"\uf060", 99 | 'fa-arrow-right': u"\uf061", 100 | 'fa-arrow-up': u"\uf062", 101 | 'fa-arrow-down': u"\uf063", 102 | 'fa-mail-forward': u"\uf064", 103 | 'fa-share': u"\uf064", 104 | 'fa-expand': u"\uf065", 105 | 'fa-compress': u"\uf066", 106 | 'fa-plus': u"\uf067", 107 | 'fa-minus': u"\uf068", 108 | 'fa-asterisk': u"\uf069", 109 | 'fa-exclamation-circle': u"\uf06a", 110 | 'fa-gift': u"\uf06b", 111 | 'fa-leaf': u"\uf06c", 112 | 'fa-fire': u"\uf06d", 113 | 'fa-eye': u"\uf06e", 114 | 'fa-eye-slash': u"\uf070", 115 | 'fa-warning': u"\uf071", 116 | 'fa-exclamation-triangle': u"\uf071", 117 | 'fa-plane': u"\uf072", 118 | 'fa-calendar': u"\uf073", 119 | 'fa-random': u"\uf074", 120 | 'fa-comment': u"\uf075", 121 | 'fa-magnet': u"\uf076", 122 | 'fa-chevron-up': u"\uf077", 123 | 'fa-chevron-down': u"\uf078", 124 | 'fa-retweet': u"\uf079", 125 | 'fa-shopping-cart': u"\uf07a", 126 | 'fa-folder': u"\uf07b", 127 | 'fa-folder-open': u"\uf07c", 128 | 'fa-arrows-v': u"\uf07d", 129 | 'fa-arrows-h': u"\uf07e", 130 | 'fa-bar-chart-o': u"\uf080", 131 | 'fa-twitter-square': u"\uf081", 132 | 'fa-facebook-square': u"\uf082", 133 | 'fa-camera-retro': u"\uf083", 134 | 'fa-key': u"\uf084", 135 | 'fa-gears': u"\uf085", 136 | 'fa-cogs': u"\uf085", 137 | 'fa-comments': u"\uf086", 138 | 'fa-thumbs-o-up': u"\uf087", 139 | 'fa-thumbs-o-down': u"\uf088", 140 | 'fa-star-half': u"\uf089", 141 | 'fa-heart-o': u"\uf08a", 142 | 'fa-sign-out': u"\uf08b", 143 | 'fa-linkedin-square': u"\uf08c", 144 | 'fa-thumb-tack': u"\uf08d", 145 | 'fa-external-link': u"\uf08e", 146 | 'fa-sign-in': u"\uf090", 147 | 'fa-trophy': u"\uf091", 148 | 'fa-github-square': u"\uf092", 149 | 'fa-upload': u"\uf093", 150 | 'fa-lemon-o': u"\uf094", 151 | 'fa-phone': u"\uf095", 152 | 'fa-square-o': u"\uf096", 153 | 'fa-bookmark-o': u"\uf097", 154 | 'fa-phone-square': u"\uf098", 155 | 'fa-twitter': u"\uf099", 156 | 'fa-facebook': u"\uf09a", 157 | 'fa-github': u"\uf09b", 158 | 'fa-unlock': u"\uf09c", 159 | 'fa-credit-card': u"\uf09d", 160 | 'fa-rss': u"\uf09e", 161 | 'fa-hdd-o': u"\uf0a0", 162 | 'fa-bullhorn': u"\uf0a1", 163 | 'fa-bell': u"\uf0f3", 164 | 'fa-certificate': u"\uf0a3", 165 | 'fa-hand-o-right': u"\uf0a4", 166 | 'fa-hand-o-left': u"\uf0a5", 167 | 'fa-hand-o-up': u"\uf0a6", 168 | 'fa-hand-o-down': u"\uf0a7", 169 | 'fa-arrow-circle-left': u"\uf0a8", 170 | 'fa-arrow-circle-right': u"\uf0a9", 171 | 'fa-arrow-circle-up': u"\uf0aa", 172 | 'fa-arrow-circle-down': u"\uf0ab", 173 | 'fa-globe': u"\uf0ac", 174 | 'fa-wrench': u"\uf0ad", 175 | 'fa-tasks': u"\uf0ae", 176 | 'fa-filter': u"\uf0b0", 177 | 'fa-briefcase': u"\uf0b1", 178 | 'fa-arrows-alt': u"\uf0b2", 179 | 'fa-group': u"\uf0c0", 180 | 'fa-users': u"\uf0c0", 181 | 'fa-chain': u"\uf0c1", 182 | 'fa-link': u"\uf0c1", 183 | 'fa-cloud': u"\uf0c2", 184 | 'fa-flask': u"\uf0c3", 185 | 'fa-cut': u"\uf0c4", 186 | 'fa-scissors': u"\uf0c4", 187 | 'fa-copy': u"\uf0c5", 188 | 'fa-files-o': u"\uf0c5", 189 | 'fa-paperclip': u"\uf0c6", 190 | 'fa-save': u"\uf0c7", 191 | 'fa-floppy-o': u"\uf0c7", 192 | 'fa-square': u"\uf0c8", 193 | 'fa-navicon': u"\uf0c9", 194 | 'fa-reorder': u"\uf0c9", 195 | 'fa-bars': u"\uf0c9", 196 | 'fa-list-ul': u"\uf0ca", 197 | 'fa-list-ol': u"\uf0cb", 198 | 'fa-strikethrough': u"\uf0cc", 199 | 'fa-underline': u"\uf0cd", 200 | 'fa-table': u"\uf0ce", 201 | 'fa-magic': u"\uf0d0", 202 | 'fa-truck': u"\uf0d1", 203 | 'fa-pinterest': u"\uf0d2", 204 | 'fa-pinterest-square': u"\uf0d3", 205 | 'fa-google-plus-square': u"\uf0d4", 206 | 'fa-google-plus': u"\uf0d5", 207 | 'fa-money': u"\uf0d6", 208 | 'fa-caret-down': u"\uf0d7", 209 | 'fa-caret-up': u"\uf0d8", 210 | 'fa-caret-left': u"\uf0d9", 211 | 'fa-caret-right': u"\uf0da", 212 | 'fa-columns': u"\uf0db", 213 | 'fa-unsorted': u"\uf0dc", 214 | 'fa-sort': u"\uf0dc", 215 | 'fa-sort-down': u"\uf0dd", 216 | 'fa-sort-desc': u"\uf0dd", 217 | 'fa-sort-up': u"\uf0de", 218 | 'fa-sort-asc': u"\uf0de", 219 | 'fa-envelope': u"\uf0e0", 220 | 'fa-linkedin': u"\uf0e1", 221 | 'fa-rotate-left': u"\uf0e2", 222 | 'fa-undo': u"\uf0e2", 223 | 'fa-legal': u"\uf0e3", 224 | 'fa-gavel': u"\uf0e3", 225 | 'fa-dashboard': u"\uf0e4", 226 | 'fa-tachometer': u"\uf0e4", 227 | 'fa-comment-o': u"\uf0e5", 228 | 'fa-comments-o': u"\uf0e6", 229 | 'fa-flash': u"\uf0e7", 230 | 'fa-bolt': u"\uf0e7", 231 | 'fa-sitemap': u"\uf0e8", 232 | 'fa-umbrella': u"\uf0e9", 233 | 'fa-paste': u"\uf0ea", 234 | 'fa-clipboard': u"\uf0ea", 235 | 'fa-lightbulb-o': u"\uf0eb", 236 | 'fa-exchange': u"\uf0ec", 237 | 'fa-cloud-download': u"\uf0ed", 238 | 'fa-cloud-upload': u"\uf0ee", 239 | 'fa-user-md': u"\uf0f0", 240 | 'fa-stethoscope': u"\uf0f1", 241 | 'fa-suitcase': u"\uf0f2", 242 | 'fa-bell-o': u"\uf0a2", 243 | 'fa-coffee': u"\uf0f4", 244 | 'fa-cutlery': u"\uf0f5", 245 | 'fa-file-text-o': u"\uf0f6", 246 | 'fa-building-o': u"\uf0f7", 247 | 'fa-hospital-o': u"\uf0f8", 248 | 'fa-ambulance': u"\uf0f9", 249 | 'fa-medkit': u"\uf0fa", 250 | 'fa-fighter-jet': u"\uf0fb", 251 | 'fa-beer': u"\uf0fc", 252 | 'fa-h-square': u"\uf0fd", 253 | 'fa-plus-square': u"\uf0fe", 254 | 'fa-angle-double-left': u"\uf100", 255 | 'fa-angle-double-right': u"\uf101", 256 | 'fa-angle-double-up': u"\uf102", 257 | 'fa-angle-double-down': u"\uf103", 258 | 'fa-angle-left': u"\uf104", 259 | 'fa-angle-right': u"\uf105", 260 | 'fa-angle-up': u"\uf106", 261 | 'fa-angle-down': u"\uf107", 262 | 'fa-desktop': u"\uf108", 263 | 'fa-laptop': u"\uf109", 264 | 'fa-tablet': u"\uf10a", 265 | 'fa-mobile-phone': u"\uf10b", 266 | 'fa-mobile': u"\uf10b", 267 | 'fa-circle-o': u"\uf10c", 268 | 'fa-quote-left': u"\uf10d", 269 | 'fa-quote-right': u"\uf10e", 270 | 'fa-spinner': u"\uf110", 271 | 'fa-circle': u"\uf111", 272 | 'fa-mail-reply': u"\uf112", 273 | 'fa-reply': u"\uf112", 274 | 'fa-github-alt': u"\uf113", 275 | 'fa-folder-o': u"\uf114", 276 | 'fa-folder-open-o': u"\uf115", 277 | 'fa-smile-o': u"\uf118", 278 | 'fa-frown-o': u"\uf119", 279 | 'fa-meh-o': u"\uf11a", 280 | 'fa-gamepad': u"\uf11b", 281 | 'fa-keyboard-o': u"\uf11c", 282 | 'fa-flag-o': u"\uf11d", 283 | 'fa-flag-checkered': u"\uf11e", 284 | 'fa-terminal': u"\uf120", 285 | 'fa-code': u"\uf121", 286 | 'fa-mail-reply-all': u"\uf122", 287 | 'fa-reply-all': u"\uf122", 288 | 'fa-star-half-empty': u"\uf123", 289 | 'fa-star-half-full': u"\uf123", 290 | 'fa-star-half-o': u"\uf123", 291 | 'fa-location-arrow': u"\uf124", 292 | 'fa-crop': u"\uf125", 293 | 'fa-code-fork': u"\uf126", 294 | 'fa-unlink': u"\uf127", 295 | 'fa-chain-broken': u"\uf127", 296 | 'fa-question': u"\uf128", 297 | 'fa-info': u"\uf129", 298 | 'fa-exclamation': u"\uf12a", 299 | 'fa-superscript': u"\uf12b", 300 | 'fa-subscript': u"\uf12c", 301 | 'fa-eraser': u"\uf12d", 302 | 'fa-puzzle-piece': u"\uf12e", 303 | 'fa-microphone': u"\uf130", 304 | 'fa-microphone-slash': u"\uf131", 305 | 'fa-shield': u"\uf132", 306 | 'fa-calendar-o': u"\uf133", 307 | 'fa-fire-extinguisher': u"\uf134", 308 | 'fa-rocket': u"\uf135", 309 | 'fa-maxcdn': u"\uf136", 310 | 'fa-chevron-circle-left': u"\uf137", 311 | 'fa-chevron-circle-right': u"\uf138", 312 | 'fa-chevron-circle-up': u"\uf139", 313 | 'fa-chevron-circle-down': u"\uf13a", 314 | 'fa-html5': u"\uf13b", 315 | 'fa-css3': u"\uf13c", 316 | 'fa-anchor': u"\uf13d", 317 | 'fa-unlock-alt': u"\uf13e", 318 | 'fa-bullseye': u"\uf140", 319 | 'fa-ellipsis-h': u"\uf141", 320 | 'fa-ellipsis-v': u"\uf142", 321 | 'fa-rss-square': u"\uf143", 322 | 'fa-play-circle': u"\uf144", 323 | 'fa-ticket': u"\uf145", 324 | 'fa-minus-square': u"\uf146", 325 | 'fa-minus-square-o': u"\uf147", 326 | 'fa-level-up': u"\uf148", 327 | 'fa-level-down': u"\uf149", 328 | 'fa-check-square': u"\uf14a", 329 | 'fa-pencil-square': u"\uf14b", 330 | 'fa-external-link-square': u"\uf14c", 331 | 'fa-share-square': u"\uf14d", 332 | 'fa-compass': u"\uf14e", 333 | 'fa-toggle-down': u"\uf150", 334 | 'fa-caret-square-o-down': u"\uf150", 335 | 'fa-toggle-up': u"\uf151", 336 | 'fa-caret-square-o-up': u"\uf151", 337 | 'fa-toggle-right': u"\uf152", 338 | 'fa-caret-square-o-right': u"\uf152", 339 | 'fa-euro': u"\uf153", 340 | 'fa-eur': u"\uf153", 341 | 'fa-gbp': u"\uf154", 342 | 'fa-dollar': u"\uf155", 343 | 'fa-usd': u"\uf155", 344 | 'fa-rupee': u"\uf156", 345 | 'fa-inr': u"\uf156", 346 | 'fa-cny': u"\uf157", 347 | 'fa-rmb': u"\uf157", 348 | 'fa-yen': u"\uf157", 349 | 'fa-jpy': u"\uf157", 350 | 'fa-ruble': u"\uf158", 351 | 'fa-rouble': u"\uf158", 352 | 'fa-rub': u"\uf158", 353 | 'fa-won': u"\uf159", 354 | 'fa-krw': u"\uf159", 355 | 'fa-bitcoin': u"\uf15a", 356 | 'fa-btc': u"\uf15a", 357 | 'fa-file': u"\uf15b", 358 | 'fa-file-text': u"\uf15c", 359 | 'fa-sort-alpha-asc': u"\uf15d", 360 | 'fa-sort-alpha-desc': u"\uf15e", 361 | 'fa-sort-amount-asc': u"\uf160", 362 | 'fa-sort-amount-desc': u"\uf161", 363 | 'fa-sort-numeric-asc': u"\uf162", 364 | 'fa-sort-numeric-desc': u"\uf163", 365 | 'fa-thumbs-up': u"\uf164", 366 | 'fa-thumbs-down': u"\uf165", 367 | 'fa-youtube-square': u"\uf166", 368 | 'fa-youtube': u"\uf167", 369 | 'fa-xing': u"\uf168", 370 | 'fa-xing-square': u"\uf169", 371 | 'fa-youtube-play': u"\uf16a", 372 | 'fa-dropbox': u"\uf16b", 373 | 'fa-stack-overflow': u"\uf16c", 374 | 'fa-instagram': u"\uf16d", 375 | 'fa-flickr': u"\uf16e", 376 | 'fa-adn': u"\uf170", 377 | 'fa-bitbucket': u"\uf171", 378 | 'fa-bitbucket-square': u"\uf172", 379 | 'fa-tumblr': u"\uf173", 380 | 'fa-tumblr-square': u"\uf174", 381 | 'fa-long-arrow-down': u"\uf175", 382 | 'fa-long-arrow-up': u"\uf176", 383 | 'fa-long-arrow-left': u"\uf177", 384 | 'fa-long-arrow-right': u"\uf178", 385 | 'fa-apple': u"\uf179", 386 | 'fa-windows': u"\uf17a", 387 | 'fa-android': u"\uf17b", 388 | 'fa-linux': u"\uf17c", 389 | 'fa-dribbble': u"\uf17d", 390 | 'fa-skype': u"\uf17e", 391 | 'fa-foursquare': u"\uf180", 392 | 'fa-trello': u"\uf181", 393 | 'fa-female': u"\uf182", 394 | 'fa-male': u"\uf183", 395 | 'fa-gittip': u"\uf184", 396 | 'fa-sun-o': u"\uf185", 397 | 'fa-moon-o': u"\uf186", 398 | 'fa-archive': u"\uf187", 399 | 'fa-bug': u"\uf188", 400 | 'fa-vk': u"\uf189", 401 | 'fa-weibo': u"\uf18a", 402 | 'fa-renren': u"\uf18b", 403 | 'fa-pagelines': u"\uf18c", 404 | 'fa-stack-exchange': u"\uf18d", 405 | 'fa-arrow-circle-o-right': u"\uf18e", 406 | 'fa-arrow-circle-o-left': u"\uf190", 407 | 'fa-toggle-left': u"\uf191", 408 | 'fa-caret-square-o-left': u"\uf191", 409 | 'fa-dot-circle-o': u"\uf192", 410 | 'fa-wheelchair': u"\uf193", 411 | 'fa-vimeo-square': u"\uf194", 412 | 'fa-turkish-lira': u"\uf195", 413 | 'fa-try': u"\uf195", 414 | 'fa-plus-square-o': u"\uf196", 415 | 'fa-space-shuttle': u"\uf197", 416 | 'fa-slack': u"\uf198", 417 | 'fa-envelope-square': u"\uf199", 418 | 'fa-wordpress': u"\uf19a", 419 | 'fa-openid': u"\uf19b", 420 | 'fa-institution': u"\uf19c", 421 | 'fa-bank': u"\uf19c", 422 | 'fa-university': u"\uf19c", 423 | 'fa-mortar-board': u"\uf19d", 424 | 'fa-graduation-cap': u"\uf19d", 425 | 'fa-yahoo': u"\uf19e", 426 | 'fa-google': u"\uf1a0", 427 | 'fa-reddit': u"\uf1a1", 428 | 'fa-reddit-square': u"\uf1a2", 429 | 'fa-stumbleupon-circle': u"\uf1a3", 430 | 'fa-stumbleupon': u"\uf1a4", 431 | 'fa-delicious': u"\uf1a5", 432 | 'fa-digg': u"\uf1a6", 433 | 'fa-pied-piper-square': u"\uf1a7", 434 | 'fa-pied-piper': u"\uf1a7", 435 | 'fa-pied-piper-alt': u"\uf1a8", 436 | 'fa-drupal': u"\uf1a9", 437 | 'fa-joomla': u"\uf1aa", 438 | 'fa-language': u"\uf1ab", 439 | 'fa-fax': u"\uf1ac", 440 | 'fa-building': u"\uf1ad", 441 | 'fa-child': u"\uf1ae", 442 | 'fa-paw': u"\uf1b0", 443 | 'fa-spoon': u"\uf1b1", 444 | 'fa-cube': u"\uf1b2", 445 | 'fa-cubes': u"\uf1b3", 446 | 'fa-behance': u"\uf1b4", 447 | 'fa-behance-square': u"\uf1b5", 448 | 'fa-steam': u"\uf1b6", 449 | 'fa-steam-square': u"\uf1b7", 450 | 'fa-recycle': u"\uf1b8", 451 | 'fa-automobile': u"\uf1b9", 452 | 'fa-car': u"\uf1b9", 453 | 'fa-cab': u"\uf1ba", 454 | 'fa-taxi': u"\uf1ba", 455 | 'fa-tree': u"\uf1bb", 456 | 'fa-spotify': u"\uf1bc", 457 | 'fa-deviantart': u"\uf1bd", 458 | 'fa-soundcloud': u"\uf1be", 459 | 'fa-database': u"\uf1c0", 460 | 'fa-file-pdf-o': u"\uf1c1", 461 | 'fa-file-word-o': u"\uf1c2", 462 | 'fa-file-excel-o': u"\uf1c3", 463 | 'fa-file-powerpoint-o': u"\uf1c4", 464 | 'fa-file-photo-o': u"\uf1c5", 465 | 'fa-file-picture-o': u"\uf1c5", 466 | 'fa-file-image-o': u"\uf1c5", 467 | 'fa-file-zip-o': u"\uf1c6", 468 | 'fa-file-archive-o': u"\uf1c6", 469 | 'fa-file-sound-o': u"\uf1c7", 470 | 'fa-file-audio-o': u"\uf1c7", 471 | 'fa-file-movie-o': u"\uf1c8", 472 | 'fa-file-video-o': u"\uf1c8", 473 | 'fa-file-code-o': u"\uf1c9", 474 | 'fa-vine': u"\uf1ca", 475 | 'fa-codepen': u"\uf1cb", 476 | 'fa-jsfiddle': u"\uf1cc", 477 | 'fa-life-bouy': u"\uf1cd", 478 | 'fa-life-saver': u"\uf1cd", 479 | 'fa-support': u"\uf1cd", 480 | 'fa-life-ring': u"\uf1cd", 481 | 'fa-circle-o-notch': u"\uf1ce", 482 | 'fa-ra': u"\uf1d0", 483 | 'fa-rebel': u"\uf1d0", 484 | 'fa-ge': u"\uf1d1", 485 | 'fa-empire': u"\uf1d1", 486 | 'fa-git-square': u"\uf1d2", 487 | 'fa-git': u"\uf1d3", 488 | 'fa-hacker-news': u"\uf1d4", 489 | 'fa-tencent-weibo': u"\uf1d5", 490 | 'fa-qq': u"\uf1d6", 491 | 'fa-wechat': u"\uf1d7", 492 | 'fa-weixin': u"\uf1d7", 493 | 'fa-send': u"\uf1d8", 494 | 'fa-paper-plane': u"\uf1d8", 495 | 'fa-send-o': u"\uf1d9", 496 | 'fa-paper-plane-o': u"\uf1d9", 497 | 'fa-history': u"\uf1da", 498 | 'fa-circle-thin': u"\uf1db", 499 | 'fa-header': u"\uf1dc", 500 | 'fa-paragraph': u"\uf1dd", 501 | 'fa-sliders': u"\uf1de", 502 | 'fa-share-alt': u"\uf1e0", 503 | 'fa-share-alt-square': u"\uf1e1", 504 | 'fa-bomb': u"\uf1e2", 505 | } --------------------------------------------------------------------------------