示例#1
0
    def on_path(self, *a):
        if os.path.isdir(self.path):
            self.display_icon = icon('fa-caret-right', 16)
        elif os.path.isfile(self.path):
            self.display_icon = icon('fa-file-code-o', 16)

        self.display_name = os.path.split(self.path)[1]
示例#2
0
 def on_state(self, *args):
     if self.state == 'down' and not self.saved:
         self.ids.indicator.text = '%s' % (icon('fa-circle'))
         self.ids.indicator.font_size = '12dp'
     elif self.state == 'down' and self.saved:
         self.ids.indicator.text = '%s' % (icon('fa-close'))
         self.ids.indicator.font_size = '16dp'
     elif self.state == 'normal':
         self.ids.indicator.source = ''
示例#3
0
 def on_hover(self, *a):
     if self.hover:
         self.text = '%s' % (icon('fa-close'))
         self.font_size = '16dp'
     if not self.hover and not self.parent.saved:
         self.text = '%s' % (icon('fa-circle'))
         self.font_size = '12dp'
     if not self.hover and self.parent.saved and self.parent.state == 'normal':
         self.text = ''
     if not self.hover and self.parent.saved and self.parent.state == 'down':
         self.text = '%s' % (icon('fa-close'))
         self.font_size = '16dp'
示例#4
0
    def on_hover(self, *a):
        if self.hover:
            self.text = '%s' % (icon('fa-close'))
            self.font_size = '16dp'
        if not self.hover and not self.parent.saved:
            self.text = '%s' % (icon('fa-circle'))
            self.font_size = '12dp'
        if not self.hover and self.parent.saved and self.parent.state == 'normal':
            self.text = ''
        if not self.hover and self.parent.saved and self.parent.state == 'down':
            self.text = '%s' % (icon('fa-close'))
            self.font_size = '16dp'

        return super(TabPannelIndicator, self).on_hover(*a)
示例#5
0
class FileWidget(FileWidgetBase):

    file_icon = StringProperty(icon('fa-file-code-o', 16))
示例#6
0
 def on_saved(self, *args):
     if self.saved:
         self.ids.indicator.text = ''
     elif not self.saved:
         self.ids.indicator.text = '%s' % (icon('fa-circle'))
         self.ids.indicator.font_size = '12dp'