Skip to content
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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

FloatingTextField added #261

wants to merge 1 commit into from

Conversation

luntik2012
Copy link
Contributor

@luntik2012 luntik2012 commented Jun 13, 2018

Pull Request check-list

  • Does the code keep building with this change?
  • Do the unit tests pass with this change?
  • Is the commit message formatted according to CONTRIBUTING.MD?
  • If this change fixes a bug (or a performance problem), is a regression
    test (or a benchmark) included?
  • Is a documentation update included (if this change modifies
    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)


color: Material.hintTextColor
anchors.topMargin: offset * 2
font.pointSize: Qt.application.font.pointSize + 2
Copy link
Contributor

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 ?

Copy link
Contributor Author

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
Copy link
Contributor

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 ?

Copy link
Contributor Author

@luntik2012 luntik2012 Jul 7, 2018

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
Copy link
Contributor

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

Copy link
Contributor Author

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

@plfiorini plfiorini self-requested a review August 27, 2018 12:09
@plfiorini plfiorini added this to the 1.2.0 milestone Aug 27, 2018
@plfiorini plfiorini modified the milestones: 1.2.0, Post 1.0 Jan 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants