[Interest] [Qt Labs Controls 5.6] Customization recommendations

Nurmi J-P jpnurmi at theqtcompany.com
Fri Mar 11 22:52:18 CET 2016


Hi,

We're applying some bug fixes to Qt Quick Controls 1.x, but the development focus has been on the new controls for a good while. The goal is to have the first stable release in Qt 5.7. We still have some important features (such as text selection handles) missing, but it's looking pretty promising overall.

--
J-P Nurmi

On 11 Mar 2016, at 17:20, Jérôme Godbout <jerome at bodycad.com<mailto:jerome at bodycad.com>> wrote:

Sorry don't want to hijack the thread, but I just watched the video, that's a great news that Qt is heading that way, we have many styles created and it's painful to maintain and size them properly in every case. I'm super happy about that feature coming. Is this will replace the full Controls module or will it be into it's own module? Are you aiming to Qt 5.7 for stable release?

Thanks, sorry again to jumping into that thread.

On Fri, Mar 11, 2016 at 10:42 AM, Ronan Jouchet <ronan.jouchet at cadensimaging.com<mailto:ronan.jouchet at cadensimaging.com>> wrote:
On 2016-03-10 19:09, Nikita Krupenko wrote:
2016-03-10 17:19 GMT+02:00 Ronan Jouchet <ronan.jouchet at cadensimaging.com<mailto:ronan.jouchet at cadensimaging.com>>:
   -> 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
Interest at qt-project.org<mailto:Interest at qt-project.org>
http://lists.qt-project.org/mailman/listinfo/interest

_______________________________________________
Interest mailing list
Interest at qt-project.org<mailto:Interest at qt-project.org>
http://lists.qt-project.org/mailman/listinfo/interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160311/53822f6a/attachment.html>


More information about the Interest mailing list