Commit Graph

6 Commits

Author SHA1 Message Date
Bartlomiej Moskal e709946314 Material: Fix FloatingPlaceholderText X position
In cb7eb15220, we stopped
using the leftPadding value for FloatingPlaceholderText.

As a result, the text is now misaligned with the placeholder.

This commit restores the FloatingPlaceholderText X position to
leftPadding. If leftPadding is not set, it defaults to
Material.textFieldHorizontalPadding.

To prevent regressions (such as QTBUG-120149), a new X position
animation has been added to FloatingPlaceholderText.

Fixes: QTBUG-133492
Pick-to: 6.9 6.8
Change-Id: I5c80dcedd7c2beec0891b524fc55388fa5456f2a
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2025-02-28 09:29:02 +01:00
Mitch Curtis cb7eb15220 Material: fix floating placeholder text x position
Don't set it to control.leftPadding, because we don't want it to change
if the user changes leftPadding.

Fixes: QTBUG-120149
Pick-to: 6.5 6.6 6.7
Change-Id: I67bbc22192fef386fe088398b67d3eb0a10421ba
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2024-03-07 09:32:12 +08:00
Lucie Gérard 9c5fc88388 Correct license for test files
According to QUIP-18 [1], all test files should be
LicenseRef-Qt-Commercial OR GPL-3.0-only

[1]: https://contribute.qt-project.org/quips/18

Pick-to: 6.7
Task-number: QTBUG-121787
Change-Id: I26d72e8de04d4c7c57b3b7838af5d033265de5ba
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2024-02-27 10:32:21 +01:00
Mitch Curtis 4ab11d03ac Material: fix placeholder text alignment
The placeholder text should always be aligned to the left
according to my tests on native Android via an emulator.

Fixes: QTBUG-113172
Pick-to: 6.5 6.5.1
Change-Id: I75ae31e1e6b9846d90ab5034c43f8684698e0ab7
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2023-05-03 08:06:05 +08:00
Mitch Curtis 2d99c70f98 Material: fix TextArea decorations when in a Flickable
This patch fixes the following issues when the Material TextArea is
attached to a Flickable:
- Floating placeholder text scrolls with the Flickable.
- When text is cleared without the control having focus:
  - Floating placeholder text is positioned incorrectly.
  - The floating text background outline gap is still open.
- The background outline color is incorrect when the control has focus
  (used primaryTextColor instead of accentColor).

Pick-to: 6.5
Task-number: QTBUG-112650
Change-Id: Icfa3517e4abcb1209ea2291dabdec225011f19ef
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2023-04-19 10:57:41 +08:00
Mitch Curtis 5704741a40 Update Material TextArea to Material 3
Fixes: QTBUG-110231
Pick-to: 6.5
Change-Id: I8b6e5a2bc8e91c7003206e8a651b133f3a541617
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2023-02-21 19:13:59 +08:00