aboutsummaryrefslogtreecommitdiffstats
path: root/src/labs/stylekit/impl
Commit message (Collapse)AuthorAgeFilesLines
* StyleKit: ensure we hide delegates upon setting 'visible: false'Richard Moe Gustavsen13 days1-4/+7
| | | | | | | | | | | | | | | | | | | | | | | 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>
* StyleKit: don't bind to the palette from the Fallback styleRichard Moe Gustavsen2025-12-091-137/+207
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We used to bind several of the colors in the Fallback style the palette. This turns out to be not such a good idea. The reason is that the palette differs across platforms, which means that a style created on e.g macOS can end up looking completly different when running on Ubuntu. While this might be wanted sometimes, more often it has the potential to come as a surprise at a late stage during development, and contributes to a "write once, debug everywhere" scenario. This patch will therefore change this. We now choose to follow the Basic style approach, and "hard-code" the colors in the Fallback style to be the same on all platforms. This gives developers a stable platform to build their own styles on top of. It's still fully possible to bind all colors in their own style to the palette, if they want a more dynamic style that respects the platform palette. Task-number: QTBUG-130067 Pick-to: 6.11 Change-Id: Ibeeedacb35b5a4c68c827b66baf0298a42b2948a Reviewed-by: Doris Verria <doris.verria@qt.io>
* StyleKit Example: improve the example after recent StyleKit fixesRichard Moe Gustavsen2025-12-061-1/+1
| | | | | Change-Id: I01bcdaea8a7014c3bd2f1c65b7d00a048700b91f Reviewed-by: Doris Verria <doris.verria@qt.io>
* StyleKit: Add ApplicationWindowDoris Verria2025-12-051-1/+5
| | | | | Change-Id: I9cc429c5a5e229983cb68648df239260903a0af4 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* StyleKit: Add ToolSeparatorDoris Verria2025-12-052-1/+10
| | | | | Change-Id: If1285165aa28fea401bbff061fcdfd4563bce334 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* StyleKit: respect theme paletteRichard Moe Gustavsen2025-12-051-0/+6
| | | | | | | | | | | | | | | | A Qt Quick Control will use StyleKitControl.text.color as its text color. But as it stood, it was not initialized to anything in the FallbackStyle. The result was that all controls got a black text color, regardless of what was set in the theme palette. It would also not respect any palette overrides done from the app. This patch will make sure that we, by default, bind text.color for the various control types to the matching color in the Qt Quick Control's palette. This color will, unless overriden by the app, be initialized to the color set by the theme. Change-Id: I6d4f67c81c57c9a30940a720816fa4ed2675b8bd Reviewed-by: Doris Verria <doris.verria@qt.io>
* StyleKit: Implement ScrollView, ScrollBar and ScrollIndicatorRichard Moe Gustavsen2025-12-041-0/+25
| | | | | | | | | | This patch will implement support for styling ScrollBar and ScrollIndicator. It also includes ScrollView, since otherwise, if we inherited the one from the Basic style, it would also use the ScrollBars from the Basic style. Change-Id: I8163824aec61ce3c84303b6add3fdb1b7701532e Reviewed-by: Doris Verria <doris.verria@qt.io>
* StyleKit: implement ProgressBarRichard Moe Gustavsen2025-12-042-1/+6
| | | | | | | | This patch will implement support for styling ProgressBar. Change-Id: Ic6d48bbb61b068ff967289736236f2d21992dc0a Reviewed-by: Doris Verria <doris.verria@qt.io>
* StyleKit: Add padding properties to textDoris Verria2025-12-041-1/+1
| | | | | Change-Id: I8a7fc86482e2083a24d1e7159737fd0ababc8e0b Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* StyleKit: Add GroupBox controlDoris Verria2025-12-041-0/+6
| | | | | Change-Id: I0177d20c381d83d2a816199a89b6fc9150fa4766 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* StyleKit: Add Label controlDoris Verria2025-12-041-0/+5
| | | | | Change-Id: I3594798dfb475118cad046948ccc4fe180bbd9a3 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* StyleKit: implement ToolBar and ToolButtonRichard Moe Gustavsen2025-12-031-0/+3
| | | | | | | | This patch will implement support for styling ToolBar and ToolButton. Change-Id: Ie8cbda5a1ee361e8f2ee1a78ec5634e52811e0cd Reviewed-by: Doris Verria <doris.verria@qt.io>
* StyleKit: add StyleKit to labsRichard Moe Gustavsen2025-11-2711-0/+1381
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>