Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a strange problem. When I fix the backgroundColor in a MainView to "#F1E1A3" it doesn't show me the good color since when I draw a rectangle in the page with the same color, I see a difference (see picture). When you fix both to "black" there are no difference. What am I doing wrong? Is a background color clearer than the color you ask? Or is it a bug?

The picture is drawn using the "simple Touch UI" in Qt creator.Image with the color I want in the rectangle and a bad color on the background

import QtQuick 2.0
import Ubuntu.Components 0.1

MainView {
backgroundColor: "#F1E1A3"

width: units.gu(100)
height: units.gu(75)

Page {
    title: i18n.tr("Simple")

    Column {
        spacing: units.gu(1)
        anchors {
            margins: units.gu(2)
            fill: parent
        }

        Button {
            text: i18n.tr("Tap me!")
            color: "#F1E1A3"
        }
    }
}
}
share|improve this question
    
Could you paste your code somewhere? This might make it easier to spot if there's any typo in the code or if it's an SDK issue. –  David Planella Jul 17 '13 at 10:11
    
Thank you @DavidPlanella, I've just edited my question. I used the simple example from "Qt creator" –  londumas Jul 17 '13 at 13:30
add comment

1 Answer

The color of the background is faitful to what you set to backgroundColor. What is not though is Button. Button does some clever uses of the color you give it. Try Rectangle instead of Button and you will see.

share|improve this answer
    
Thank you @Kaleo for your answer but I don't think you're right since the color of a rectangle is the same than the button: Rectangle{ width: units.gu(10) height: units.gu(10) color: "#F1E1A3" } Also, when you set the color to "black", "blue" you don't have a different color between background and button and rectangle. And also the small square displaded when overing the "#F1E1A3" with the mouse has the color of the button and not the background –  londumas Jul 18 '13 at 1:23
    
I have filled a bug repport because I have tested and the problem only occures with yellow based collor. here is the link –  londumas Jul 19 '13 at 14:22
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.