def build(self): root = Builder.load_string(kv) Window.custom_titlebar = True title_bar = TitleBar() root.add_widget(title_bar) if Window.set_custom_titlebar(title_bar): Logger.info("Window: setting custom titlebar successful") else: Logger.info("Window: setting custom titlebar " "Not allowed on this system ") self.title = "MyApp" return root