[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Fit Grid elements in Item
From:       Luiz_Romário_Santana_Rios <luizromario () gmail ! com>
Date:       2012-09-24 3:05:45
Message-ID: CABCW-kpTo5ShBh0RT4DtREUNvMmLa_3a5NA664W_h0AbC9-8yw () mail ! gmail ! com
[Download RAW message or body]

Hello.

I'm trying to port the Calculator plasmoid to QML, but I'm stuck
trying to make the buttons fit their parent item. I'm doing this:

Item {
    anchors {
        top: resultArea.bottom
        bottom: parent.bottom
        left: parent.left
        right: parent.right
    }

    Grid {
        columns: 4
        spacing: 2

        anchors.fill: parent

        Repeater {
            model: ["C", "=F7", "=D7", "AC",
                    "7", "8", "9", "-",
                    "4", "5", "6", "+"]

            PlasmaComponents.Button {
                id: buttonC
                text: modelData
            }
        }
    }
}

But I get this:

http://i47.tinypic.com/1z33z3o.png

Trying to anchor the buttons doesn't work either.

What should I do?

-- =

Luiz Rom=E1rio Santana Rios
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic