Hi, > On 11 Mar 2016, at 16:42, Ronan Jouchet <[email protected]> > wrote: > >> On 2016-03-10 19:09, Nikita Krupenko wrote: >> 2016-03-10 17:19 GMT+02:00 Ronan Jouchet <[email protected]>: >>> -> That sounds nice for users wanting total control over the complete >>> style. But suppose instead I'm mostly happy with Material and >>> only want to *override some attributes*, much like I would do >>> with CSS in a webapp, and as opposed to wholly defining control >>> sub-items {label, background, ...}. >>> >>> Is there a way to do that? Following the documentation sentence >>> quoted above, I'd just copy the whole `material` folder and start >>> tweaking, but then I'd have to merge my tweaks with upstream >>> changes brought by each Qt release. >>> Correct? Is this the workflow you have in mind? >> >> You don't need to copy anything, you can just use button with Material >> theme and override it's background or label. You can also tweak some >> properties, like font or padding, that is used for creating and >> positioning default background and label. > > Hi. Two things: > > 1. Sure, that works for a one-time, isolated tweak. But I'm talking > about tweaking *all* instances of a control. Thus the need to > "overlay" or fork my own variant of Material. > > 2. Even in the case of a one-time change, remains the question of the > granularity of tweaks. Suppose I have a checkbox for which I want a > green-colored label. Is there a way to only override the color > property like I could with CSS? > > I am totally able to wholly re-define the `label` property: > label: Text { > // dozens of attributes I don't want to touch but have to > // copy-paste from the reference Material implementation > color: "green" > } > > Whereas I would like to simply > // fails and logs `Cannot assign to non-existent property "color"` > label.color: "green" > > So in this case I could `property alias labelColor: label.color` > and later on set `labelColor: "green"` > ... but the alias would have to be in the source CheckBox > implementation, and I'm back at modifying Material, which was what > I wanted to avoid initially. > > Am I missing something? More generally I created > https://bugreports.qt.io/browse/QTBUG-51785 > >> Also, note, that Qt Labs Controls is a TP in 5.6. The label already >> became contentItem in 5.7. > > Yup, no problem with that, the documentation and "labs" namespace are pretty > clear that the API isn't stable. > >>> 3. With upcoming desktop support in mind, would it be interesting to >>> add a third customization axis (alongside theme & accent) called >>> "density" that would adjust paddings like the [GMAIL] feature does? >> >> There is opened BR: https://bugreports.qt.io/browse/QTBUG-51109 > > Thanks! Keeping an eye on this one. > _______________________________________________ > Interest mailing list > [email protected] > http://lists.qt-project.org/mailman/listinfo/interest
Sorry for a late and short reply. Busy times... :) This forum thread describes the main reason why things are the way they are: http://forum.qt.io/topic/64198/qt-labs-controls-cusomization/4 -- J-P Nurmi _______________________________________________ Interest mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/interest
