-
-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FloatingTextField added #261
base: develop
Are you sure you want to change the base?
Conversation
|
||
color: Material.hintTextColor | ||
anchors.topMargin: offset * 2 | ||
font.pointSize: Qt.application.font.pointSize + 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this line needed ? Shouldn't we keep the font size the same as the textfield font size ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
according to guideline it's needed
PropertyChanges { | ||
target: placeholder | ||
|
||
font.pointSize: Qt.application.font.pointSize |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using font.pointSize
makes the animation choppy here, maybe use scale instead ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works on my linux and windows systems
NumberAnimation {
properties: "anchors.topMargin,font.pointSize"
duration: Units.shortDuration
easing.type: Easing.InOutQuad
}
import QtQuick 2.11 | ||
import QtQuick.Controls 2.4 | ||
import QtQuick.Controls.Material 2.4 | ||
import QtQuick.Templates 2.4 as T |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keep the import version compatible with Qt 5.10 ?
2.10 and 2.3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
didn't think about that, I'm using latest qt. I'm not sure it's necessary to support 5.10
Pull Request check-list
test (or a benchmark) included?
existing APIs, or introduces new ones)
Affected core subsystem(s)
Controls
Description of change
Inherits QQC2.Templates.TextField like default QQC2.Controls.TextField with placeholder behaviour changes as described here #253.
Material.Grey changed to Material.hintTextColor.
Also I still don't know how to use it :) (#259)