lirios / fluid

:book: Library for QtQuick apps with Material Design
https://docs.liri.io/sdk/fluid/develop/
Other
810 stars 112 forks source link

BodyLabel does not respect level #114

Closed rmallah closed 7 years ago

rmallah commented 7 years ago

looks like BodyLabel as a fixed font.pixelSize and not dependent on level , unlike DisplayLabel

T.Label {
    /*!
        \qmlproperty int level

        This property holds the label level that controls
        font style and size.

        It can be either 1 or 2.

        Default value is 1.
    */
    property int level: 1

    font.pixelSize: 14
    color: "#26282a"
    linkColor: "#45a7d7"
    onLevelChanged: {
        if (level < 1 || level > 2)
            console.error("BodyLabel level must be either 1 or 2")
    }
}
plfiorini commented 7 years ago

That is the default unstyled version, the material styled version is https://github.com/lirios/fluid/blob/develop/src/imports/controls/%2Bmaterial/BodyLabel.qml

According to MD the pixel size is the same, only the font weight changes: https://material.io/guidelines/style/typography.html#typography-styles

rmallah commented 7 years ago

yep agreed! , I was also going through the same doc, pixel size is the same.

Shall i submit a pull for adjusting the weight as per http://doc.qt.io/qt-5/qml-qtquick-text.html#font.weight-prop ?

plfiorini commented 7 years ago

font weight is already set: see https://github.com/lirios/fluid/blob/develop/src/imports/controls/%2Bmaterial/BodyLabel.qml#L23

rmallah commented 7 years ago

I am so sorry for the noise, the version i was looking at is

T.Label {
    /*!
        \qmlproperty int level

        This property holds the label level that controls
        font style and size.

        It can be either 1 or 2.

        Default value is 1.
    */
    property int level: 1

    font.pixelSize: 14
    color: "#26282a"
    linkColor: "#45a7d7"
    onLevelChanged: {
        if (level < 1 || level > 2)
            console.error("BodyLabel level must be either 1 or 2")
    }
}

i shall close this issue .

rmallah commented 7 years ago

I was actually looking at a different file https://github.com/lirios/fluid/blob/develop/src/imports/controls/BodyLabel.qml and not

https://github.com/lirios/fluid/blob/develop/src/imports/controls/%2Bmaterial/BodyLabel.qml