Index: /trunk/src/VBox/Frontends/VirtualBox/src/extensions/QILineEdit.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/extensions/QILineEdit.cpp	(revision 104545)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/extensions/QILineEdit.cpp	(revision 104546)
@@ -201,6 +201,5 @@
 
 UIMarkableLineEdit::UIMarkableLineEdit(QWidget *pParent /* = 0 */)
-    :QWidget(pParent)
-    , m_pLineEdit(0)
+    : QLineEdit(pParent)
     , m_pIconLabel(0)
 {
@@ -208,51 +207,39 @@
 }
 
-void UIMarkableLineEdit::setText(const QString &strText)
-{
-    if (m_pLineEdit)
-        m_pLineEdit->setText(strText);
-}
-
-void UIMarkableLineEdit::setToolTip(const QString &strText)
-{
-    if (m_pLineEdit)
-        m_pLineEdit->setToolTip(strText);
-}
-
-QString UIMarkableLineEdit::text() const
-{
-    if (!m_pLineEdit)
-        return QString();
-    return m_pLineEdit->text();
-}
-
-void UIMarkableLineEdit::setValidator(const QValidator *pValidator)
-{
-    if (m_pLineEdit)
-        m_pLineEdit->setValidator(pValidator);
-}
-
-bool UIMarkableLineEdit::hasAcceptableInput() const
-{
-    if (!m_pLineEdit)
-        return false;
-    return m_pLineEdit->hasAcceptableInput();
-}
-
-void UIMarkableLineEdit::setPlaceholderText(const QString &strText)
-{
-    if (m_pLineEdit)
-        m_pLineEdit->setPlaceholderText(strText);
-}
-
-void UIMarkableLineEdit::mark(bool fError, const QString &strErrorMessage /* = QString() */)
+
+void UIMarkableLineEdit::mark(bool fError, const QString &strErrorMessage, const QString &strNoErrorMessage)
+{
+    const QIcon icon = fError ? UIIconPool::iconSet(":/status_error_16px.png") : UIIconPool::iconSet(":/status_check_16px.png");
+    const QString strToolTip = fError ? strErrorMessage : strNoErrorMessage;
+    const int iIconMetric = QApplication::style()->pixelMetric(QStyle::PM_LargeIconSize);
+    const qreal fDevicePixelRatio = gpDesktop->devicePixelRatio(m_pIconLabel);
+    QPixmap iconPixmap = icon.pixmap(QSize(iIconMetric, iIconMetric), fDevicePixelRatio);
+    m_iIconMargin = QApplication::style()->pixelMetric(QStyle::PM_LayoutTopMargin);
+    int iHeight = height() -  m_iIconMargin;
+    iconPixmap = iconPixmap.scaledToHeight(iHeight, Qt::SmoothTransformation);
+    m_pIconLabel->setPixmap(iconPixmap);
+    m_pIconLabel->setToolTip(strToolTip);
+
+    update();
+}
+
+void UIMarkableLineEdit::paintEvent(QPaintEvent *pEvent)
+{
+    QLineEdit::paintEvent(pEvent);
+    moveIconLabel();
+}
+void UIMarkableLineEdit::moveIconLabel()
 {
     AssertPtrReturnVoid(m_pIconLabel);
     m_pIconLabel->setVisible(true);
-    const QIcon icon = fError ? UIIconPool::iconSet(":/status_error_16px.png") : UIIconPool::iconSet(":/status_check_16px.png");
-    const int iIconMetric = QApplication::style()->pixelMetric(QStyle::PM_SmallIconSize);
-    const qreal fDevicePixelRatio = gpDesktop->devicePixelRatio(m_pIconLabel);
-    m_pIconLabel->setPixmap(icon.pixmap(QSize(iIconMetric, iIconMetric), fDevicePixelRatio));
-    m_pIconLabel->setToolTip(strErrorMessage);
+    int iHeight = height() -  m_iIconMargin;
+    m_pIconLabel->setGeometry(width() - iHeight - 0.5 * m_iIconMargin, 0.5 * m_iIconMargin, iHeight, iHeight);
+}
+
+void UIMarkableLineEdit::resizeEvent(QResizeEvent *pResizeEvent)
+{
+    /* Call to base-class: */
+    QLineEdit::resizeEvent(pResizeEvent);
+    moveIconLabel();
 }
 
@@ -262,13 +249,5 @@
     AssertReturnVoid(pMainLayout);
     pMainLayout->setContentsMargins(0, 0, 0, 0);
-    m_pLineEdit = new QILineEdit;
-    AssertReturnVoid(m_pLineEdit);
-    m_pIconLabel = new QLabel;
+    m_pIconLabel = new QLabel(this);
     AssertReturnVoid(m_pIconLabel);
-    /* Show the icon label only if line edit is marked for error/no error.*/
-    m_pIconLabel->hide();
-    pMainLayout->addWidget(m_pLineEdit);
-    pMainLayout->addWidget(m_pIconLabel);
-    setFocusProxy(m_pLineEdit);
-    connect(m_pLineEdit, &QILineEdit::textChanged, this, &UIMarkableLineEdit::textChanged);
-}
+}
Index: /trunk/src/VBox/Frontends/VirtualBox/src/extensions/QILineEdit.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/extensions/QILineEdit.h	(revision 104545)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/extensions/QILineEdit.h	(revision 104546)
@@ -97,5 +97,5 @@
 };
 
-class SHARED_LIBRARY_STUFF UIMarkableLineEdit : public QWidget
+class SHARED_LIBRARY_STUFF UIMarkableLineEdit : public QLineEdit
 {
     Q_OBJECT;
@@ -103,27 +103,26 @@
 signals:
 
-    void textChanged(const QString &strText);
 
 public:
 
     UIMarkableLineEdit(QWidget *pParent = 0);
-    void mark(bool fError, const QString &strErrorMessage = QString());
+    void mark(bool fError, const QString &strErrorMessage, const QString &strNoErrorMessage);
 
     /** @name Pass through functions for QILineEdit.
       * @{ */
-        void setText(const QString &strText);
-        void setToolTip(const QString &strText);
-        QString text() const;
-        void setValidator(const QValidator *pValidator);
-        bool hasAcceptableInput() const;
-        void setPlaceholderText(const QString &strText);
+
+
     /** @} */
 
 private:
 
+    /** Handles resize @a pEvent. */
+    virtual void resizeEvent(QResizeEvent *pResizeEvent) RT_OVERRIDE;
+    virtual void paintEvent(QPaintEvent *pEvent) RT_OVERRIDE;
+    void moveIconLabel();
     void prepare();
 
-    QILineEdit *m_pLineEdit;
     QLabel *m_pIconLabel;
+    int m_iIconMargin;
 };
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UINameAndSystemEditor.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UINameAndSystemEditor.cpp	(revision 104545)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UINameAndSystemEditor.cpp	(revision 104546)
@@ -237,5 +237,5 @@
 {
     if (m_pEditorName)
-        m_pEditorName->mark(fError, fError ? tr("Invalid name") : QString("Name is valid"));
+        m_pEditorName->mark(fError, tr("Invalid guest machine name"), tr("Guest machine name is valid"));
 }
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIHostnameDomainNameEditor.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIHostnameDomainNameEditor.cpp	(revision 104545)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIHostnameDomainNameEditor.cpp	(revision 104546)
@@ -75,9 +75,11 @@
         m_pHostnameLineEdit->mark(!m_pHostnameLineEdit->hasAcceptableInput(),
                                   tr("Hostname should be at least 2 character long. "
-                                     "Allowed characters are alphanumerics, \"-\" and \".\""));
+                                     "Allowed characters are alphanumerics, \"-\" and \".\""),
+                                  tr("Hostname is valid"));
     if (m_pDomainNameLineEdit)
         m_pDomainNameLineEdit->mark(!m_pDomainNameLineEdit->hasAcceptableInput(),
                                     tr("Domain name should be at least 2 character long. "
-                                       "Allowed characters are alphanumerics, \"-\" and \".\""));
+                                       "Allowed characters are alphanumerics, \"-\" and \".\""),
+                                    tr("Domain name is valid"));
 }
 
@@ -136,6 +138,5 @@
 }
 
-template<class T>
-void UIHostnameDomainNameEditor::addLineEdit(int &iRow, QLabel *&pLabel, T *&pLineEdit, QGridLayout *pLayout)
+void UIHostnameDomainNameEditor::addLineEdit(int &iRow, QLabel *&pLabel, UIMarkableLineEdit *&pLineEdit, QGridLayout *pLayout)
 {
     AssertReturnVoid(pLayout);
@@ -146,9 +147,7 @@
     AssertReturnVoid(pLabel);
     pLabel->setAlignment(Qt::AlignRight);
-    //pLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
-
     pLayout->addWidget(pLabel, iRow, 0, 1, 1);
 
-    pLineEdit = new T;
+    pLineEdit = new UIMarkableLineEdit;
     AssertReturnVoid(pLineEdit);
 
@@ -156,5 +155,4 @@
     pLabel->setBuddy(pLineEdit);
     ++iRow;
-    return;
 }
 
@@ -168,6 +166,6 @@
     setLayout(m_pMainLayout);
     int iRow = 0;
-    addLineEdit<UIMarkableLineEdit>(iRow, m_pHostnameLabel, m_pHostnameLineEdit, m_pMainLayout);
-    addLineEdit<UIMarkableLineEdit>(iRow, m_pDomainNameLabel, m_pDomainNameLineEdit, m_pMainLayout);
+    addLineEdit(iRow, m_pHostnameLabel, m_pHostnameLineEdit, m_pMainLayout);
+    addLineEdit(iRow, m_pDomainNameLabel, m_pDomainNameLineEdit, m_pMainLayout);
 
     /* Host name and domain should be strings of minimum length of 2 and composed of alpha numerics, '-', and '.'
@@ -190,5 +188,6 @@
     m_pHostnameLineEdit->mark(!m_pHostnameLineEdit->hasAcceptableInput(),
                               tr("Hostname should be at least 2 character long. "
-                                 "Allowed characters are alphanumerics, \"-\" and \".\""));
+                                 "Allowed characters are alphanumerics, \"-\" and \".\""),
+                              tr("Hostname is valid"));
     emit sigHostnameDomainNameChanged(hostnameDomainName(), isComplete());
 }
@@ -198,5 +197,6 @@
     m_pDomainNameLineEdit->mark(!m_pDomainNameLineEdit->hasAcceptableInput(),
                                 tr("Domain name should be at least 2 character long. "
-                                   "Allowed characters are alphanumerics, \"-\" and \".\""));
+                                   "Allowed characters are alphanumerics, \"-\" and \".\""),
+                                tr("Domain name is valid"));
     emit sigHostnameDomainNameChanged(hostnameDomainName(), isComplete());
 }
Index: /trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIHostnameDomainNameEditor.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIHostnameDomainNameEditor.h	(revision 104545)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIHostnameDomainNameEditor.h	(revision 104546)
@@ -79,6 +79,5 @@
 
     void prepare();
-    template<class T>
-    void addLineEdit(int &iRow, QLabel *&pLabel, T *&pLineEdit, QGridLayout *pLayout);
+    void addLineEdit(int &iRow, QLabel *&pLabel, UIMarkableLineEdit *&pLineEdit, QGridLayout *pLayout);
 
     UIMarkableLineEdit *m_pHostnameLineEdit;
Index: /trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIUserNamePasswordEditor.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIUserNamePasswordEditor.cpp	(revision 104545)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIUserNamePasswordEditor.cpp	(revision 104546)
@@ -228,5 +228,6 @@
     bool fComplete = (m_pUserNameLineEdit && !m_pUserNameLineEdit->text().isEmpty());
     if (m_pUserNameLineEdit)
-        m_pUserNameLineEdit->mark(!fComplete, UIUserNamePasswordEditor::tr("Invalid username"));
+        m_pUserNameLineEdit->mark(!fComplete, UIUserNamePasswordEditor::tr("Username cannot be an empty string."),
+                                  UIUserNamePasswordEditor::tr("Username is valid"));
     return fComplete;
 }
Index: /trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardCloneVMEditors.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardCloneVMEditors.cpp	(revision 104545)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardCloneVMEditors.cpp	(revision 104546)
@@ -70,5 +70,5 @@
 
     bool fInvalidName = m_pNameLineEdit->text().isEmpty();
-    m_pNameLineEdit->mark(fInvalidName, UIWizardCloneVM::tr("Clone name cannot be empty"));
+    m_pNameLineEdit->mark(fInvalidName, UIWizardCloneVM::tr("Clone name cannot be empty"), UIWizardCloneVM::tr("Clone name is valid"));
 
     const QString &strPath = m_pPathSelector->path();
@@ -85,5 +85,5 @@
             vbox.ComposeMachineFilename(m_pNameLineEdit->text(), strMachineGroup, QString(), m_pPathSelector->path());
         fExists = QDir(QDir::toNativeSeparators(QFileInfo(strCloneFilePath).absolutePath())).exists();
-        m_pNameLineEdit->mark(fExists, UIWizardCloneVM::tr("The clone name is not unique"));
+        m_pNameLineEdit->mark(fExists, UIWizardCloneVM::tr("The clone name is not unique"), UIWizardCloneVM::tr("The clone name is valid"));
     }
 
