Пример #1
0
	def stroke_popup(cls, painter, function):
		popup = cls(title='Set Stroke Size',title_align='center', size_hint = (None, None), size = (400, 200))
		
		slider = Slider(value = painter.rad, value_track=True, value_track_color=[1,0,1,1], size_hint = (1.1, 1))	
		slider.range = (5, 50)
		slider.bind(on_touch_up=function)
		
		popup.add_widget(slider)
		
		return popup
Пример #2
0
    def __init__(self, width, height, foldername, mainlayout):
        
        super(FilePane, self).__init__()
    
        # Add Option bar to top of right panel -----
        #topOptionBar =  RelativeLayout(size = (width, resY *.04), size_hint_y = None)

        self.size = (width, height)
        self.size_hint = (None,None)
        self.startPath = foldername
        self.auto_bring_to_front = False
        self.mainlayout = mainlayout


        self.orientation = 'horizontal'

        self.tiles = StackLayout(size = (width*.9, height), size_hint_x = None, padding=10, spacing=10)
        #print self.tiles.size    
        #print self.tiles.minimum_height


        self.tiles.bind(minimum_height = self.tiles.setter('height'))



        self.add_widget(self.tiles)


        r = RelativeLayout(height = self.height)
        scrollbar = Slider(orientation = 'vertical')
        

        r.add_widget(scrollbar)
        self.add_widget(r)



        print self.tiles.height

        try:
            dirs = os.listdir( foldername )

            # This would print all the files and directories
            for file in dirs:
                if(self.isImage(file)):
                    self.addFile(self.startPath+ "\\" + file, file)
        except OSError:
            print OSError
            print "FilePane: no files found"

        print self.tiles.height


        scrollbar.range = (0, self.tiles.height)
        scrollbar.bind(value = self.updatePos)
Пример #3
0
 def build_progress_bar(self):
     progressBar = Slider(size_hint=(.7, 1))
     progressBar.range = (0, 100)
     progressBar.value = 0
     progressBar.ortientation = 'horizontal'
     progressBar.value_track = True
     progressBar.value_track_color = [0, 0.5, 0.5, 1]
     progressBar.value_track_width = 5
     progressBar.cursor_size = (0, 0)
     progressBar.background_width = 20
     return progressBar