| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As it stood, if you e.g did:
control.background.shadow.visible: true
control.hovered.background.shadow.visible: false
Then the shadow would stay visible also when the control
was hovered. The reason was because the shadow was already
created in the normal state, and toggling visiblity after
that point had no effect.
This patch will fix this, so that we hide the shadow if
its visibility is set to false after first having been
created. We refrain from destroying it again, since doing so
has a higher cost, and most likely, the hiding of
the shadow is just temporarily.
Task-number: QTBUG-130067
Pick-to: 6.11
Change-Id: Ib107b11b7f7fa638d7ac439348b9ccb75bf1bb1a
Reviewed-by: Doris Verria <doris.verria@qt.io>
|
|
|
This patch introduces a new styling API for Controls called
StyleKit. StyleKit provides a higher-level, key–value–based
approach to styling applications, serving as an alternative
to working directly with the lower-level Templates API.
The primary goal of StyleKit is to offer a unified API for
styling both Controls and Widgets. The current Templates-based
approach relies heavily on JavaScript, which makes it unsuitable
for use with Widgets. This initial version supports Controls
only; support for Widgets will be added in a future update.
StyleKit is designed to make it easier for designers and UI
developers to:
- Focus on visual styling rather than Template logic (such as
geometry, delegate positioning, and handle placement).
- Allow style properties to propagate, enabling you to factor
out common styling into shared control types and override only
what differs in the more specific control types.
- Style controls independently in each of their states, without
needing nested ternary expressions to check state.
- Define and apply multiple themes with minimal effort.
- Provide different style variations depending on context.
For example, styling a Switch differently when it appears
inside a ToolBar.
[ChangeLog][Qt labs] Introduced new QML module 'StyleKit'.
StyleKit provides a flexible styling framework for Qt Quick
Controls, enabling developers to define reusable styles and
themes using a simple key-value property format.
Change-Id: Iae25324486aea7a7b9b2ce52135327ec7e9b6f59
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|