Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove popup title in kivy

Tags:

python

kivy

I've been wondering if there is a way to remove the title bar of a popup window:

From this

To this

Thanks in advance!

Edit: Code reference for future use:

<MyPopup@Popup>:
size_hint: None, None
size: 300, 200
title: 'Close'
title_color: 0.7, 0, 0, 0.9
separator_color: 0.4, 0.4, 0.4, 1
title_align: 'center'
BoxLayout:
    orientation: 'vertical'
    padding: 5, 5, 5, 5
    cols: 2
    Label:
        color: 0.7, 0, 0, 0.9
        center_x: root.center_x
        center_y: root.center_y
        text: 'Are you sure you want to exit?'
    BoxLayout:
        size_hint: 1, 0.6
        Button:
            color: 0.7, 0, 0, 0.9
            background_color: 0.4, 0.4, 0.4, 0.05
            text: 'Yes'
            on_release: exit()
        Button:
            color: 0.7, 0, 0, 0.9
            background_color: 0.4, 0.4, 0.4, 0.05
            text: 'No'
            on_release: root.dismiss()
like image 695
Takusui Avatar asked Jan 01 '18 15:01

Takusui


1 Answers

Use a ModalView instead. This is the base class for popup-style behaviour, Popup is a ModalView with the title added.

like image 123
inclement Avatar answered Sep 22 '22 13:09

inclement