Skip to content

Instantly share code, notes, and snippets.

@onslauth
Last active October 18, 2017 13:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save onslauth/85f0431464cd70095415eae6b4b81ad9 to your computer and use it in GitHub Desktop.
Save onslauth/85f0431464cd70095415eae6b4b81ad9 to your computer and use it in GitHub Desktop.
FileChooser display bug

Hi,

Currently a user is experiencing the following issue with software I have written using kivy.

Screenshot 1

Screenshot 2

<SaveDialog>:
text_input: text_input
filechooser: filechooser
BoxLayout:
size: root.size
pos: root.pos
orientation: "vertical"
BoxLayout:
size_hint_y: None
height: '35dp'
ToggleButton:
text: "Icon"
state: "down"
group: "filechooser"
on_release: filechooser.view_mode = 'icon'
ToggleButton:
text: "List"
group: "filechooser"
on_release: filechooser.view_mode = 'list'
FileChooser:
id: filechooser
path: "~"
on_selection: text_input.text = self.selection and self.selection[0] or ""
FileChooserIconLayout
FileChooserListLayout
TextInput:
id: text_input
size_hint_y: None
height: '24dp'
multiline: False
BoxLayout:
size_hint_y: None
height: '35dp'
Button:
text: "Cancel"
on_release: root.cancel( )
Button:
text: "Save"
on_release: root.save( filechooser.path, text_input.text )
def show_dialog( ):
content = SaveDialog( save = self.save, cancel = self.dismiss_popup )
content.filechooser.path = os.path.expanduser( "~" )
self._popup = Popup( title = "Save File", content = content, size_hint = ( 0.9, 0.9 ) )
self._popup.open( )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment